Skip to content

Quarkus 3.20 LTS does not handle pom.xml quarkus.application.version the same way as 3.15 LTS #48257

@andrewazores

Description

@andrewazores

Describe the bug

When setting quarkus.application.version as a property in pom.xml, Quarkus versions prior to 3.18 allowed interpolation of other (even dynamically generated) property values. Since 3.18 this no longer works and config property resolution fails.

Expected behavior

The configuration property should be resolved the same way that it was previously.

Actual behavior

2025-06-05 15:41:24,088 INFO  [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure
Failed to load config value of type class java.lang.String for: quarkus.application.version

2025-06-05 15:41:25,830 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (vert.x-worker-thread-2) Failed to start quarkus: io.quarkus.dev.appstate.ApplicationStartException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.dev.appstate.ApplicationStateNotification.waitForApplicationStart(ApplicationStateNotification.java:63)
	at io.quarkus.runner.bootstrap.StartupActionImpl.runMainClass(StartupActionImpl.java:142)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.restartApp(IsolatedDevModeMain.java:202)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.restartCallback(IsolatedDevModeMain.java:183)
	at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:555)
	at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:455)
	at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$6.call(VertxHttpHotReplacementSetup.java:163)
	at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$6.call(VertxHttpHotReplacementSetup.java:150)
	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$4(ContextImpl.java:192)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:270)
	at io.vertx.core.impl.ContextImpl$1.execute(ContextImpl.java:221)
	at io.vertx.core.impl.WorkerTask.run(WorkerTask.java:56)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1591)
	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
	at io.quarkus.runtime.Application.start(Application.java:101)
	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:121)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:77)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:48)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:137)
	at io.quarkus.runner.GeneratedMain.main(Unknown Source)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:116)
	... 1 more
Caused by: jakarta.enterprise.inject.spi.DeploymentException: io.quarkus.runtime.configuration.ConfigurationException: Failed to load config value of type class java.lang.String for: quarkus.application.version

	at io.quarkus.arc.runtime.ConfigRecorder.validateConfigProperties(ConfigRecorder.java:70)
	at io.quarkus.runner.recorded.ConfigBuildStep$validateRuntimeConfigProperty1282080724.deploy_0(Unknown Source)
	at io.quarkus.runner.recorded.ConfigBuildStep$validateRuntimeConfigProperty1282080724.deploy(Unknown Source)
	... 11 more
	Suppressed: java.util.NoSuchElementException: SRCFG00011: Could not expand value app.imageVersionLower in property quarkus.application.version
		at io.smallrye.config.ExpressionConfigSourceInterceptor$1.accept(ExpressionConfigSourceInterceptor.java:94)
		at io.smallrye.config.ExpressionConfigSourceInterceptor$1.accept(ExpressionConfigSourceInterceptor.java:71)
		at io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22)
		at io.smallrye.common.expression.Expression.evaluateException(Expression.java:56)
		at io.smallrye.common.expression.Expression.evaluate(Expression.java:70)
		at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:71)
		at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:45)
		at io.smallrye.config.SmallRyeConfig$SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfig.java:1223)
		at io.smallrye.config.FallbackConfigSourceInterceptor.getValue(FallbackConfigSourceInterceptor.java:24)
		at io.smallrye.config.SmallRyeConfig$SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfig.java:1223)
		at io.smallrye.config.SmallRyeConfig.getConfigValue(SmallRyeConfig.java:520)
		at io.smallrye.config.inject.ConfigProducerUtil.lambda$getConfigValue$2(ConfigProducerUtil.java:170)
		at io.smallrye.config.SecretKeys.doUnlocked(SecretKeys.java:28)
		at io.smallrye.config.inject.ConfigProducerUtil.getConfigValue(ConfigProducerUtil.java:170)
		at io.smallrye.config.inject.ConfigProducerUtil.getValue(ConfigProducerUtil.java:91)
		at io.quarkus.arc.runtime.ConfigRecorder.validateConfigProperties(ConfigRecorder.java:60)
		... 13 more
Caused by: io.quarkus.runtime.configuration.ConfigurationException: Failed to load config value of type class java.lang.String for: quarkus.application.version

	... 14 more

How to Reproduce?

See https://github.com/andrewazores/quarkus-3.20-sysprop-substitution

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

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

No response

Additional information

The actual use case where I encountered this is in https://github.com/cryostat/cryostat . We use a similar cryostat.imageVersionLower trick in the pom.xml using the same build-helper-maven-plugin. The reason to do that is that we also have this in the application.properties:

quarkus.application.name=cryostat
quarkus.container-image.build=true
quarkus.container-image.push=false
quarkus.container-image.registry=quay.io
quarkus.container-image.group=cryostat
quarkus.container-image.name=cryostat
quarkus.container-image.tag=${quarkus.application.version}
quarkus.container-image.additional-tags=dev,latest

ie we want to use a lowercased form of the pom.xml <version> as a container image tag, ex. 4.1.0-snapshot. This has been working in Cryostat for a long time, but now that I am upgrading from Quarkus 3.15 to 3.20 I am hitting this issue.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions