Skip to content

Projects with Gradle build relative paths issue #49792

@Fuzzo

Description

@Fuzzo

Describe the bug

Hi,
i've a project with Gradle as build system with this config props:

quarkus.log.file.enabled=true
quarkus.log.file.path=./log/myApp.log

Once I start quarkusDev gradle task, I see no <prj-root>/log/myApp.log file.
As I didn't get any error, i searched for myApp.log file anywhere under <prj-root>, and i found it, but in a path I didn't expect: <prj-root-dir>\build\classes\java\main\log\myApp.log.

Testing the behaviour with a quarkus create app <name> project, with same props, produces the file at the expected path <prj-root>/log/myApp.log.

Expected behavior

Retive paths resolved against <prj-root> in Gradle-based builds

Actual behavior

Relative paths are resolved against Gradle build subdir: <prj-root-dir>\build\classes\java\main

How to Reproduce?

  1. Run quarkus create app test --gradle
  2. Add the following rows to application.properties to enable file logging:
quarkus.log.file.enabled=true
quarkus.log.file.path=./log/app.log
  1. Run .\gradlew quarkusDev
  2. Look that nothing exists in ./log

Do the same omitting --gradle in step 1 to create a Maven project; run quarkus dev at step 3, log file exists in ./log as expected.

Output of uname -a or ver

Windows 11

Output of java -version

OpenJDK 64-Bit Server VM Temurin-21+35 (build 21+35-LTS, mixed mode, sharing)

Quarkus version or git rev

3.26.0

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 9.0.0

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions