Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build-time configuration values for quarkus.application.name are ignored #40444

Closed
med01-flutter-uki opened this issue May 3, 2024 · 3 comments · Fixed by #41337
Closed

Build-time configuration values for quarkus.application.name are ignored #40444

med01-flutter-uki opened this issue May 3, 2024 · 3 comments · Fixed by #41337
Labels
Milestone

Comments

@med01-flutter-uki
Copy link

Describe the bug

According to https://quarkus.io/guides/gradle-tooling#configuring-quarkus-builds, build config can be provided by passing system properties to Gradle, but providing a value for quarkus.application.name does not have any effect.

The output of the quarkusShowEffectiveConfig task shows that the value is ignored, and the banner printed on app start uses the default project name: 2024-05-03 17:44:40,384 INFO [io.quarkus] (main) code-with-quarkus 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.10.0) started in 0.395s. Listening on: http://0.0.0.0:8080

Expected behavior

The output of ./gradlew -Dquarkus.application.name=my-overridden-app-name quarkusShowEffectiveConfig should show the value of the quarkus.application.name property to be my-overridden-app-name

Actual behavior

The output of ./gradlew -Dquarkus.application.name=my-overridden-app-name quarkusShowEffectiveConfig shows the value of the quarkus.application.name property to be the default, which is code-with-quarkus

How to Reproduce?

  1. Generate a Quarkus project via https://code.quarkus.io/ using Gradle as the build tool and add the Kotlin extension
  2. Run the quarkusShowEffectiveConfig from the root, providing a value for quarkus.application.name via the system property: ./gradlew -Dquarkus.application.name=my-overridden-app-name quarkusShowEffectiveConfig

Output of uname -a or ver

Darwin UKIMG9M7DG60QR 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64

Output of java -version

openjdk version "21.0.2" 2024-01-16 LTS OpenJDK Runtime Environment Corretto-21.0.2.13.1 (build 21.0.2+13-LTS) OpenJDK 64-Bit Server VM Corretto-21.0.2.13.1 (build 21.0.2+13-LTS, mixed mode, sharing)

Quarkus version or git rev

3.10.0

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

Gradle 8.6

Additional information

No response

@med01-flutter-uki med01-flutter-uki added the kind/bug Something isn't working label May 3, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented May 3, 2024

/cc @geoand (kotlin), @radcortez (config)

@dmlloyd dmlloyd added the area/gradle Gradle label May 3, 2024
@jekkel
Copy link

jekkel commented Jun 6, 2024

Encountered a closely related issue as quarkus.application.name put into application.yml also gets ignored. Already found the same code fragment to be responsible for it. As a workaround the property can be added as extra property on the gradle project which makes it end up in AbstractQuarkusExtension.forcedProperties which has a higher priority in EffectiveConfig:

project.ext.set("quarkus.application.name", "my-overridden-app-name")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants