Hi all,
I'm in the process of making Drools and Kogito ready for Quarkus 3, trying to align them with the new set of dependencies used by Quarkus 3 and of course with the jakarta namespace.
Related to this, I bumped into a problem related with our use of maven-core and the other transitive dependencies [1] it brings in. In particular maven-core relies on the eclipse:sisu-plexus dependency injection framework to wire together its components that is
still using the old javax namespace and seems
not to have any plan to migrate to the jakarta one in a reasonable future. For this reason when I try to run our tests against an environment importing the jakarta namespace we get tons of exceptions like the one in [2].
I believe (correct me if I'm wrong) that also Quarkus needs to resolve programmatically, in some way, the dependencies of the project of a user and for that it should use maven-core in a similar way to what we do. If so, I guess that you may have also bumped into my same problem and possibly found a clever way to solve or workaround it? If so could you please give me some hint on what you did in this regard?
An alternative that I'm evaluating at the moment is giving a try to
Jeka, that seems to have
specific features to address a similar problem, but I'm a bit reluctant in adding another, potentially huge, dependency and however following this path would require a quite extensive rewriting of all our maven integration layer that I can very hardly afford in this period. Do you have any experience with this library?
Thanks in advance for any help or suggestion,
Mario
-----------------
[1]
[INFO] +- org.apache.maven:maven-core:jar:3.8.6:compile
[INFO] | +- org.apache.maven:maven-model:jar:3.8.6:provided
[INFO] | +- org.apache.maven:maven-settings:jar:3.8.6:compile
[INFO] | +- org.apache.maven:maven-settings-builder:jar:3.8.6:compile
[INFO] | | \- org.codehaus.plexus:plexus-sec-dispatcher:jar:2.0:compile
[INFO] | | \- org.codehaus.plexus:plexus-cipher:jar:2.0:compile
[INFO] | +- org.apache.maven:maven-builder-support:jar:3.8.6:compile
[INFO] | +- org.apache.maven:maven-repository-metadata:jar:3.8.6:compile
[INFO] | +- org.apache.maven:maven-artifact:jar:3.8.6:compile
[INFO] | +- org.apache.maven:maven-plugin-api:jar:3.8.6:compile
[INFO] | +- org.apache.maven:maven-model-builder:jar:3.8.6:compile
[INFO] | +- org.apache.maven:maven-resolver-provider:jar:3.8.6:compile
[INFO] | +- org.apache.maven.resolver:maven-resolver-impl:jar:1.7.3:compile
[INFO] | | \- org.apache.maven.resolver:maven-resolver-named-locks:jar:1.7.3:compile
[INFO] | +- org.apache.maven.resolver:maven-resolver-api:jar:1.7.3:compile
[INFO] | +- org.apache.maven.resolver:maven-resolver-spi:jar:1.7.3:compile
[INFO] | +- org.apache.maven.resolver:maven-resolver-util:jar:1.6.3:compile
[INFO] | +- org.apache.maven.shared:maven-shared-utils:jar:3.3.4:compile
[INFO] | +- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.5:compile
[INFO] | +- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.5:compile
[INFO] | +- org.codehaus.plexus:plexus-utils:jar:3.3.1:compile
[INFO] | +- org.codehaus.plexus:plexus-classworlds:jar:2.6.0:compile
[INFO] | +- org.codehaus.plexus:plexus-interpolation:jar:1.26:compile
[INFO] | +- org.codehaus.plexus:plexus-component-annotations:jar:2.1.0:compile
[INFO] | \- org.apache.commons:commons-lang3:jar:3.12.0:compile
[2]
[2023-03-10T16:37:27.245Z] java.lang.NoClassDefFoundError: javax/inject/Provider
[2023-03-10T16:37:27.245Z] at org.kie.maven.integration.embedder.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:160)
[2023-03-10T16:37:27.245Z] at org.kie.maven.integration.embedder.MavenEmbedderUtils.buildPlexusContainer(MavenEmbedderUtils.java:134)
[2023-03-10T16:37:27.245Z] at org.kie.maven.integration.embedder.PlexusComponentProvider.<init>(PlexusComponentProvider.java:37)
[2023-03-10T16:37:27.245Z] at org.kie.maven.integration.embedder.MavenEmbedderUtils.buildComponentProvider(MavenEmbedderUtils.java:50)
[2023-03-10T16:37:27.245Z] at org.kie.maven.integration.embedder.MavenEmbedder.<init>(MavenEmbedder.java:91)
[2023-03-10T16:37:27.245Z] at org.kie.maven.integration.embedder.MavenEmbedder.<init>(MavenEmbedder.java:85)
[2023-03-10T16:37:27.245Z] at org.kie.maven.integration.embedder.MavenProjectLoader.newMavenEmbedder(MavenProjectLoader.java:148)
[2023-03-10T16:37:27.245Z] at org.kie.maven.integration.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:90)
[2023-03-10T16:37:27.245Z] at org.kie.maven.integration.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:84)
[2023-03-10T16:37:27.245Z] at org.kie.maven.integration.MavenPomModelGenerator.parse(MavenPomModelGenerator.java:34)
[2023-03-10T16:37:27.245Z] at org.kie.util.maven.support.PomModel$Parser.parse(PomModel.java:110)
[2023-03-10T16:37:27.246Z] Caused by: java.lang.ClassNotFoundException: javax.inject.Provider
[2023-03-10T16:37:27.246Z] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
[2023-03-10T16:37:27.246Z] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
[2023-03-10T16:37:27.246Z] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[2023-03-10T16:37:27.246Z] ... 60 more