Skip to content

Maven Plugin - Fix issues with our singletons#52016

Merged
gsmet merged 3 commits intoquarkusio:mainfrom
gsmet:fix-singleton-maven
Jan 16, 2026
Merged

Maven Plugin - Fix issues with our singletons#52016
gsmet merged 3 commits intoquarkusio:mainfrom
gsmet:fix-singleton-maven

Conversation

@gsmet
Copy link
Member

@gsmet gsmet commented Jan 15, 2026

Thanks a lot to @cstamas for fighting this one with me.

While I can understand most of the patch, the reason why I had to add the Jackson packages for the analytics to work is a bit of a mystery...
I think maybe the main Jackson classes were at the extension level already but not these particular additional artifacts/packages.

I think we should probably try to simplify the build analytics stuff to drop the dependency on Jackson and use lower level JSON constructs such as the ones Alexey recently committed. But that's for another day.

@gsmet gsmet requested a review from aloubyansky January 15, 2026 14:50
@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven labels Jan 15, 2026
Copy link
Member

@aloubyansky aloubyansky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gsmet and @cstamas

@geoand geoand added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 15, 2026
@geoand
Copy link
Contributor

geoand commented Jan 15, 2026

I think we should probably try to simplify the build analytics stuff to drop the dependency on Jackson and use lower level JSON constructs such as the ones Alexey recently committed.

+100

geoand added a commit to geoand/quarkus that referenced this pull request Jan 15, 2026
geoand added a commit to geoand/quarkus that referenced this pull request Jan 15, 2026
@quarkus-bot

This comment has been minimized.

geoand added a commit to geoand/quarkus that referenced this pull request Jan 16, 2026
@gsmet
Copy link
Member Author

gsmet commented Jan 16, 2026

So the issue we have now is due to the registry client:

Exception in thread "main" java.util.ServiceConfigurationError: io.quarkus.registry.client.spi.RegistryClientFactoryProvider: io.quarkus.devtools.testing.registry.client.TestRegistryClientFactoryProvider not a subtype

It seems to work in a non-test environment but faild with the test provider.
Not entirely sure how we can fix it tbh. There's really something weird with class loading.

@aloubyansky I will need you to have a look at this issue as I apparently won't be able to fix it all by myself.

@gsmet
Copy link
Member Author

gsmet commented Jan 16, 2026

Exporting the following gets us further:

<extension>
    <exportedPackages>
        <exportedPackage>io.quarkus.maven</exportedPackage>
        <exportedPackage>io.quarkus.maven.components</exportedPackage>
        <exportedPackage>com.fasterxml.jackson.datatype.jdk8</exportedPackage>
        <exportedPackage>com.fasterxml.jackson.datatype.jsr310</exportedPackage>
        <exportedPackage>io.quarkus.registry</exportedPackage>
        <exportedPackage>io.quarkus.registry.catalog</exportedPackage>
        <exportedPackage>io.quarkus.registry.catalog.selection</exportedPackage>
        <exportedPackage>io.quarkus.registry.client</exportedPackage>
        <exportedPackage>io.quarkus.registry.client.maven</exportedPackage>
        <exportedPackage>io.quarkus.registry.client.spi</exportedPackage>
        <exportedPackage>io.quarkus.registry.config</exportedPackage>
        <exportedPackage>io.quarkus.registry.json</exportedPackage>
        <exportedPackage>io.quarkus.registry.util</exportedPackage>
    </exportedPackages>
</extension>

but then it's a slippery slope and it complains about io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver. And I think we will end up having to export everything... and it's going to be extremely brittle.

Not sure exactly what would be the way to go. /cc @cstamas

@aloubyansky
Copy link
Member

What do you get with that config @gsmet ?

@gsmet
Copy link
Member Author

gsmet commented Jan 16, 2026

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:list-extensions (default-cli) on project acme: Execution default-cli of goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:list-extensions failed: An API incompatibility was encountered while executing io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:list-extensions: java.lang.LinkageError: loader constraint violation: loader java.net.URLClassLoader @68a5aadd wants to load class io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver. A different class with the same name was previously loaded by org.codehaus.plexus.classworlds.realm.ClassRealm @63884e4. (io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @63884e4, parent loader 'bootstrap')"

@aloubyansky
Copy link
Member

Ok, so this is a test setup issue. Basically, our current mechanism of providing an alternative registry client factory isn't compatible with Maven classloading.

@aloubyansky
Copy link
Member

I was trying to add a dependency to the test project's plugin and not create a new URL classloader if the URL is already found in the TCCL (URLClassLoader). But it's not enough, apparently.
The TCCL in this case ClassRealm[plugin>io.quarkus:quarkus-maven-plugin:999-SNAPSHOT, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@5ffd2b27]
The classloader that loaded RegistryClientFactoryProvider is ClassRealm[extension>io.quarkus:quarkus-maven-plugin:999-SNAPSHOT, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@5ffd2b27]

geoand added a commit to geoand/quarkus that referenced this pull request Jan 16, 2026
@aloubyansky
Copy link
Member

It looks like I have a fix. I'll push a commit.

@quarkus-bot quarkus-bot bot added the area/platform Issues related to definition and interaction with Quarkus Platform label Jan 16, 2026
@gsmet
Copy link
Member Author

gsmet commented Jan 16, 2026

@aloubyansky you also tried it on a real application outside of the test infra, right?

@aloubyansky
Copy link
Member

This last issue is specific to our testsuite. We setup a custom registry client for the tests that uses an alternative factory. The default factory initialization isn't affected by this.

@aloubyansky
Copy link
Member

I just tried quarkus:list in a project based on 999-SNAPSHOT, it worked.

@gsmet
Copy link
Member Author

gsmet commented Jan 16, 2026

Awesome, thanks for taking care of it!

@quarkus-bot
Copy link

quarkus-bot bot commented Jan 16, 2026

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 9337945.

Failing Jobs

Status Name Step Failures Logs Raw logs Build scan
JVM Tests - JDK 17 Build Failures Logs Raw logs 🔍
✔️ JVM Tests - JDK 21 Logs Raw logs 🔍
JVM Tests - JDK 21 Semeru Build Failures Logs Raw logs 🔍
✔️ JVM Tests - JDK 25 Logs Raw logs 🔍
JVM Tests - JDK 17 Windows Build Failures Logs Raw logs 🔍
MicroProfile TCKs Tests Verify Failures Logs Raw logs 🔍

Full information is available in the Build summary check run.
You can consult the Develocity build scans.

Failures

⚙️ JVM Tests - JDK 17 #

- Failing: devtools/gradle/gradle-application-plugin 

📦 devtools/gradle/gradle-application-plugin

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.6.3:exec (gradle) on project io.quarkus.gradle.plugin: Command execution failed.


⚙️ JVM Tests - JDK 21 Semeru #

- Failing: extensions/panache/hibernate-orm-panache-kotlin/runtime 
! Skipped: extensions/panache/hibernate-orm-panache-kotlin/deployment 

📦 extensions/panache/hibernate-orm-panache-kotlin/runtime

Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:2.3.0:compile (compile) on project quarkus-hibernate-orm-panache-kotlin: Compilation failure


⚙️ JVM Tests - JDK 17 Windows #

- Failing: extensions/opentelemetry/deployment 
! Skipped: extensions/liquibase/liquibase-mongodb/deployment extensions/micrometer-opentelemetry/deployment extensions/micrometer-registry-prometheus/deployment and 10 more

📦 extensions/opentelemetry/deployment

io.quarkus.opentelemetry.deployment.logs.OtelLoggingTest. - History - More details - Source on GitHub

Details
java.lang.RuntimeException: 
io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: java.lang.NullPointerException: Cannot invoke "io.quarkus.arc.processor.InjectionPointInfo.isProgrammaticLookup()" because "injectionPoint" is null
	at io.quarkus.arc.processor.UnusedBeans.findRemovableBeans(UnusedBeans.java:44)
	at io.quarkus.arc.processor.BeanDeployment.removeUnusedBeans(BeanDeployment.java:501)
	at io.quarkus.arc.processor.BeanDeployment.removeUnusedComponents(BeanDeployment.java:410)
	at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:357)
	at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:177)

⚙️ MicroProfile TCKs Tests #

- Failing: tcks/microprofile-lra 

📦 tcks/microprofile-lra

org.eclipse.microprofile.lra.tck.TckRecoveryTests.testCancelWhenParticipantIsRestarted - History - More details - Source on GitHub

Details
java.lang.IllegalArgumentException: argument type mismatch
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)

org.eclipse.microprofile.lra.tck.TckRecoveryTests.testCancelWhenParticipantIsUnavailable - History - More details - Source on GitHub

Details
java.lang.IllegalArgumentException: argument type mismatch
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)

Flaky tests - Develocity

⚙️ JVM Tests - JDK 21

📦 extensions/quartz/deployment

io.quarkus.quartz.test.PausedSchedulerTest.testSchedulerPauseResume - History

  • expected: <false> but was: <true> - org.opentest4j.AssertionFailedError
Details
org.opentest4j.AssertionFailedError: expected: <false> but was: <true>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertFalse.failNotFalse(AssertFalse.java:69)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:41)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:35)
	at org.junit.jupiter.api.Assertions.assertFalse(Assertions.java:246)
	at io.quarkus.quartz.test.PausedSchedulerTest.testSchedulerPauseResume(PausedSchedulerTest.java:47)

📦 extensions/smallrye-reactive-messaging/deployment

io.quarkus.smallrye.reactivemessaging.hotreload.ConnectorChangeTest.testUpdatingConnector - History

  • Expecting actual: ["-3","-5","-6","-7","-8","-9","-10","-11"] to start with: ["-3", "-4", "-5", "-6"] - java.lang.AssertionError
Details
java.lang.AssertionError: 

Expecting actual:
  ["-3","-5","-6","-7","-8","-9","-10","-11"]
to start with:
  ["-3", "-4", "-5", "-6"]

	at io.quarkus.smallrye.reactivemessaging.hotreload.ConnectorChangeTest.testUpdatingConnector(ConnectorChangeTest.java:36)

⚙️ Maven Tests - JDK 17

📦 integration-tests/maven

io.quarkus.maven.it.CreateProjectMojoIT.generateNewProjectAndRun - History

  • Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 3 minutes. - org.awaitility.core.ConditionTimeoutException
Details
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 3 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at io.quarkus.test.devmode.util.DevModeClient.getHttpResponse(DevModeClient.java:97)
	at io.quarkus.test.devmode.util.DevModeClient.getHttpResponse(DevModeClient.java:88)

io.quarkus.maven.it.CreateProjectMojoIT.generateNewProjectAndRun - History

  • Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 3 minutes. - org.awaitility.core.ConditionTimeoutException
Details
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 3 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at io.quarkus.test.devmode.util.DevModeClient.getHttpResponse(DevModeClient.java:97)
	at io.quarkus.test.devmode.util.DevModeClient.getHttpResponse(DevModeClient.java:88)

@gsmet gsmet merged commit 411c341 into quarkusio:main Jan 16, 2026
62 of 66 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.32 - main milestone Jan 16, 2026
@quarkus-bot quarkus-bot bot added kind/bugfix and removed triage/waiting-for-ci Ready to merge when CI successfully finishes labels Jan 16, 2026
geoand added a commit to geoand/quarkus that referenced this pull request Jan 17, 2026
@gsmet gsmet modified the milestones: 3.32 - main, 3.31.0 Jan 19, 2026
gsmet pushed a commit to gsmet/quarkus that referenced this pull request Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven area/platform Issues related to definition and interaction with Quarkus Platform kind/bugfix triage/flaky-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quarkus:build complains about missing "<extensions>true</extensions>" when it's in pom.xml

3 participants