Comments (34)
Actually now that I look at it, the absolute paths should not be recorded at all...
So we will probably need an improved version of the fix anyway...
from quarkus.
Thanks for the heads-up. I had a quick look and here is my assessment why you traced this back to the 23.1.0 SDK bump. Since 23.1, the graal-sdk
bump is a pom only dependency pulling in 4 actual dependencies. One of which is org.graalvm.polyglot:polyglot
(more about that below). This triggers new code in 738a24d: The truffleUsed
conditional would be always true since 4d05306
From 738a24d we have
boolean truffleUsed = curateOutcome.getApplicationModel().getDependencies().stream()
.anyMatch(d -> d.getGroupId().equals("org.graalvm.polyglot"));
Makes truffleUsed = true
for anything pulling in graal-sdk
, which itself is a pom-only dependency since 23.1+ pulling in org.graalvm.polyglot:polyglot
, org.graalvm.sdk:collections
, org.graalvm.sdk:nativeimage
and org.graalvm.sdk:word
. So the truffleUsed
heuristics seem wrong. Not sure what should be used instead, perhaps if any of the languages are in the dep tree?
See:
https://www.graalvm.org/release-notes/JDK_21/#polyglot-embedding
Next question. Wouldn't #39319 make this worse?
/cc @zakkak #39322 (comment) and #37423 are related as well.
from quarkus.
Makes truffleUsed = true for anything pulling in graal-sdk, which itself is a pom-only dependency since 23.1+ pulling in org.graalvm.polyglot:polyglot, org.graalvm.sdk:collections, org.graalvm.sdk:nativeimage and org.graalvm.sdk:word. So the truffleUsed heuristics seem wrong. Not sure what should be used instead, perhaps if any of the languages are in the dep tree?
I think the right thing to do would be to stop depending on graal-sdk
and depend on the actual artifacts we use in Quarkus, that way the truffleUsed
logic would be restored.
We just need to make sure that doing so won't break compatibility with Mandrel < 23.1 (which it shouldn't). I will prepare a Draft PR and test things out.
from quarkus.
I agree depending on nativeimage
only makes perfect sense if it contains all the substitution stuff we need.
Now that won't solve this comment by @geoand:
Actually now that I look at it, the absolute paths should not be recorded at all...
from quarkus.
3.6.1 is out of supported range. I think the lowest supported is 3.8.2 but 3.9.x would be recommended.
In that case https://github.com/quarkus-qe/beefy-scenarios/blob/main/.mvn/wrapper/maven-wrapper.properties needs an update.
Please build Quarkus with -Prelocations
That and the newer mvn did the trick! Thanks @geoand and @rsvoboda
from quarkus.
/cc @Sanne (core), @aloubyansky (core), @gsmet (core), @radcortez (core), @stuartwdouglas (core)
from quarkus.
Lovely :)
from quarkus.
Perhaps we should consider creating an empty JAR with the classpath manifest entry referencing everything necessary.
from quarkus.
Interesting idea!
from quarkus.
So the truffleUsed heuristics seem wrong
I'm open to suggestions to making it correct
from quarkus.
So the truffleUsed heuristics seem wrong
I'm open to suggestions to making it correct
Perhaps add a filter on the org.graalvm.polyglot:polyglot
artefact here?
boolean truffleUsed = curateOutcome.getApplicationModel().getDependencies().stream()
.filter( d -> !(d.groupId().equals("org.graalvm.polyglot") && d.artifactId().equals("polyglot")))
.anyMatch(d -> d.getGroupId().equals("org.graalvm.polyglot"));
I.e. if any non-polyglot artefact id with org.graalvm.polyglot
group id is present, assume truffle => true.
That is assuming that if anyone uses truffle, something like org.graalvm.polyglot:js-community
or so would be there.
from quarkus.
That is assuming that if anyone uses truffle, something like
org.graalvm.polyglot:js-community
or so would be there.
I am afraid that's not necessarily true, as someone might be just using the truffle API, e.g. to implement their own language, instead of a truffle language implementation.
from quarkus.
That is assuming that if anyone uses truffle, something like
org.graalvm.polyglot:js-community
or so would be there.I am afraid that's not necessarily true, as someone might be just using the truffle API, e.g. to implement their own language, instead of a truffle language implementation.
I'd argue that the issue you describe would be pre-existing (to the pre 23.1.2 update state). You are right, though. Only depending on org.graalvm.sdk:nativeimage
is probably best going forward. However, that has also a compatibility impact. Users depending on all of graal-sdk to be there might see surprises and would need to depend on the extra artefacts themselves.
from quarkus.
Just for reference, there was quite a push to move to org.graalvm.sdk:graal-sdk
a few months ago (#34145). So the change to org.graalvm.sdk:nativeimage
should be well thought of, maybe even worth checking with Oracle if they don't plan to do another split as they did in 23.1 with graal-sdk
.
from quarkus.
Just for reference, there was quite a push to move to
org.graalvm.sdk:graal-sdk
a few months ago (#34145).
@rsvoboda, that was before org.graalvm.sdk:nativeimage
was made public API, and it was regarding moving from the internal org.graalvm.nativeimage:svm
to the public org.graalvm.sdk:graal-sdk
. After that, org.graalvm.sdk:graal-sdk
was split in four artifacts that each contain a different set of public APIs. The current suggestion is that people should use org.graalvm.sdk:nativeimage
and gradually move away from org.graalvm.sdk:graal-sdk
as it is just a wrapper kept for backwards compatibility.
So the change to
org.graalvm.sdk:nativeimage
should be well thought of, maybe even worth checking with Oracle if they don't plan to do another split as they did in 23.1 withgraal-sdk
.
+1 and that's why we avoided moving to org.graalvm.sdk:nativeimage
in the first place, but at this point I think we are introducing much more overhead/complexity by being defensive thatn it's probably worth since there is no plan to further split or change the artifacts as far as we know.
from quarkus.
Yeah, there are least two different things we need to fix in relation to this
from quarkus.
@rsvoboda trying to reproduce this I am getting:
[INFO] --- quarkus-maven-plugin:3.8.0:generate-code (default) @ 002-quarkus-all-extensions ---
[WARNING] Error injecting: io.quarkus.maven.GenerateCodeMojo
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) No implementation for io.quarkus.maven.QuarkusBootstrapProvider was bound.
while locating io.quarkus.maven.GenerateCodeMojo
1 error
at com.google.inject.internal.InternalProvisionException.toProvisionException (InternalProvisionException.java:226)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053)
at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:39)
at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:122)
at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:61)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.594 s
[INFO] Finished at: 2024-03-12T20:58:02+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:3.8.0:generate-code (default) on project 002-quarkus-all-extensions: Execution default of goal io.quarkus:quarkus-maven-plugin:3.8.0:generate-code failed: Unable to load the mojo 'generate-code' (or one of its required components) from the plugin 'io.quarkus:quarkus-maven-plugin:3.8.0': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) No implementation for io.quarkus.maven.QuarkusBootstrapProvider was bound.
[ERROR] while locating io.quarkus.maven.GenerateCodeMojo
[ERROR] at ClassRealm[plugin>io.quarkus:quarkus-maven-plugin:3.8.0, parent: java.net.URLClassLoader@20ad9418] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value="io.quarkus:quarkus-maven-plugin:3.8.0:generate-code")
[ERROR]
[ERROR] 1 error
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: io.quarkus:quarkus-maven-plugin:3.8.0:generate-code
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
Any ideas what I am doing wrong?
Adding -X -e
to the build gives:
[DEBUG] Included: org.jboss.slf4j:slf4j-jboss-logmanager:jar:2.0.0.Final
[DEBUG] Configuring mojo io.quarkus:quarkus-maven-plugin:3.8.0:generate-code from plugin realm ClassRealm[plugin>io.quarkus:quarkus-maven-plugin:3.8.0, parent: java.net.URLClassLoader@20ad9418]
[WARNING] Error injecting: io.quarkus.maven.GenerateCodeMojo
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) No implementation for io.quarkus.maven.QuarkusBootstrapProvider was bound.
while locating io.quarkus.maven.GenerateCodeMojo
1 error
at com.google.inject.internal.InternalProvisionException.toProvisionException (InternalProvisionException.java:226)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053)
at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:39)
at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:122)
at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:61)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.181 s
[INFO] Finished at: 2024-03-12T21:15:33+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:3.8.0:generate-code (default) on project 002-quarkus-all-extensions: Execution default of goal io.quarkus:quarkus-maven-plugin:3.8.0:generate-code failed: Unable to load the mojo 'generate-code' (or one of its required components) from the plugin 'io.quarkus:quarkus-maven-plugin:3.8.0': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) No implementation for io.quarkus.maven.QuarkusBootstrapProvider was bound.
[ERROR] while locating io.quarkus.maven.GenerateCodeMojo
[ERROR] at ClassRealm[plugin>io.quarkus:quarkus-maven-plugin:3.8.0, parent: java.net.URLClassLoader@20ad9418] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value="io.quarkus:quarkus-maven-plugin:3.8.0:generate-code")
[ERROR]
[ERROR] 1 error
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: io.quarkus:quarkus-maven-plugin:3.8.0:generate-code
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.quarkus:quarkus-maven-plugin:3.8.0:generate-code (default) on project 002-quarkus-all-extensions: Execution default of goal io.quarkus:quarkus-maven-plugin:3.8.0:generate-code failed: Unable to load the mojo 'generate-code' (or one of its required components) from the plugin 'io.quarkus:quarkus-maven-plugin:3.8.0'
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:39)
at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:122)
at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:61)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal io.quarkus:quarkus-maven-plugin:3.8.0:generate-code failed: Unable to load the mojo 'generate-code' (or one of its required components) from the plugin 'io.quarkus:quarkus-maven-plugin:3.8.0'
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:39)
at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:122)
at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:61)
Caused by: org.apache.maven.plugin.PluginContainerException: Unable to load the mojo 'generate-code' (or one of its required components) from the plugin 'io.quarkus:quarkus-maven-plugin:3.8.0'
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:557)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:39)
at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:122)
at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:61)
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) No implementation for io.quarkus.maven.QuarkusBootstrapProvider was bound.
while locating io.quarkus.maven.GenerateCodeMojo
at ClassRealm[plugin>io.quarkus:quarkus-maven-plugin:3.8.0, parent: java.net.URLClassLoader@20ad9418] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value="io.quarkus:quarkus-maven-plugin:3.8.0:generate-code")
1 error
role: org.apache.maven.plugin.Mojo
roleHint: io.quarkus:quarkus-maven-plugin:3.8.0:generate-code
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:267)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:39)
at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:122)
at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:61)
Caused by: com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) No implementation for io.quarkus.maven.QuarkusBootstrapProvider was bound.
while locating io.quarkus.maven.GenerateCodeMojo
at ClassRealm[plugin>io.quarkus:quarkus-maven-plugin:3.8.0, parent: java.net.URLClassLoader@20ad9418] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value="io.quarkus:quarkus-maven-plugin:3.8.0:generate-code")
1 error
at com.google.inject.internal.InternalProvisionException.toProvisionException (InternalProvisionException.java:226)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053)
at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:39)
at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:122)
at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:61)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
from quarkus.
Make sure you are using Java 17 @zakkak
from quarkus.
Make sure you are using Java 17 @zakkak
Same failures wit Java 17
❯ $JAVA_HOME/bin/java -version
openjdk version "17.0.10-beta" 2024-01-16
OpenJDK Runtime Environment Temurin-17.0.10+6-202312142331 (build 17.0.10-beta+6-202312142331)
OpenJDK 64-Bit Server VM Temurin-17.0.10+6-202312142331 (build 17.0.10-beta+6-202312142331, mixed mode, sharing)
from quarkus.
com.google.inject.ProvisionException
is strange @zakkak
from quarkus.
And which Maven version?
from quarkus.
And which Maven version?
❯ ./mvnw --version
Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-04T22:00:29+03:00)
Maven home: /home/zakkak/.m2/wrapper/dists/apache-maven-3.6.1-bin/38pn40mp89t5c94bjdbeod370m/apache-maven-3.6.1
Java version: 17.0.10-beta, vendor: Eclipse Adoptium, runtime: /home/zakkak/jvms/jdk-17.0.10+6
Default locale: en_IE, platform encoding: UTF-8
OS name: "linux", version: "6.7.7-200.fc39.x86_64", arch: "amd64", family: "unix"
I also tried with:
❯ mvn --version
Apache Maven 3.9.1 (Red Hat 3.9.1-3)
Maven home: /usr/share/maven
Java version: 17.0.10-beta, vendor: Eclipse Adoptium, runtime: /home/zakkak/jvms/jdk-17.0.10+6
Default locale: en_IE, platform encoding: UTF-8
OS name: "linux", version: "6.7.7-200.fc39.x86_64", arch: "amd64", family: "unix"
and it gives a different error:
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project 002-quarkus-all-extensions: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.smallrye.reactivemessaging.deployment.SmallRyeReactiveMessagingProcessor#feature threw an exception: java.lang.NoSuchFieldError: SMALLRYE_REACTIVE_MESSAGING
[ERROR] at io.quarkus.smallrye.reactivemessaging.deployment.SmallRyeReactiveMessagingProcessor.feature(SmallRyeReactiveMessagingProcessor.java:106)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR] at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
[ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1512)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:840)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
My Quarkus 999-SNAPSHOT buils is based on cbe14da
from quarkus.
3.6.1 is out of supported range. I think the lowest supported is 3.8.2 but 3.9.x would be recommended.
from quarkus.
[ERROR] [error]: Build step io.quarkus.smallrye.reactivemessaging.deployment.SmallRyeReactiveMessagingProcessor#feature threw an exception: java.lang.NoSuchFieldError: SMALLRYE_REACTIVE_MESSAGING
[ERROR] at io.quarkus.smallrye.reactivemessaging.deployment.SmallRyeReactiveMessagingProcessor.feature(SmallRyeReactiveMessagingProcessor.java:106)
is a different issue and i've seen yesterday with another processor impl in a Gradle project. There is something wrong going on. I'll try to create a simple reproducer.
from quarkus.
Please build Quarkus with -Prelocations
from quarkus.
If -Prelocations
is now required then it should be enabled by default, it wasn't the case before
from quarkus.
It is not strictly required, however after the Big Rename ™️ , the reproducers we use for testing + debugging that will inevitable use 999-SNAPSHOT
, will need them.
I think @gsmet had some reason to not enable them by default
from quarkus.
I confirm that #39372 resolves the beefy-scenarios 002-quarkus-all-extensions
test case, but the issue will still manifest if someone includes org.graalvm.polyglot:polyglot
in a project with many dependencies.
from quarkus.
There is still issue with absolute path that @geoand noticed and @gsmet reminded. New GH issue for that?
from quarkus.
Sure, feel free to open one
from quarkus.
from quarkus.
Thanks
from quarkus.
@zakkak to use Truffle, do we need the artifact in the runtime classpath or is it also a provided one? I was wondering if we should exclude the provided dependencies when detecting Truffle?
from quarkus.
AFAIK org.graalvm.polyglot:polyglot
is provided in Mandrel/GraalVM 23.0 (that's why we need #39397) but not in 23.1. So removing it won't work for both versions.
from quarkus.
Related Issues (20)
- Change default OpenTelemetry protocol to `http/protobuf` HOT 1
- Customizing the JSON logging formatter HOT 1
- Log records show the hostname on which the native executable was generated HOT 2
- Allow adding labels to routes HOT 3
- Make sure Quarkus is referenced with recent examples in the htmx ecosystem
- Documentation: Clarify possible self-invocation as CDI extension HOT 5
- Restore access to HttpSecurityPolicy retriever for current RoutingContext HOT 12
- Redis error: Pool initialized with SSL but connection requested plain socket HOT 9
- App fails to start when connection to OIDC server times out HOT 9
- Add documentation for Vertx and Qute integration HOT 1
- Can't use other dataformat of Jackson like xml for Jackson Rest Client HOT 4
- Missing OIDC enabled property for tenants HOT 2
- Quarkus REST abstract resources with @Path requires impl. to be CDI beans while RESTEasy does not
- The LOCAL class has a scope annotation but it must be ignored per the CDI rules HOT 11
- PostgreSQL DevServices with embedding Vectors HOT 1
- REST Client reporting "false negative" unrecognized URL configuration keys on startup HOT 4
- no post-process filtering in native image tracing agent HOT 2
- Use conditional dependencies for Flyway HOT 5
- Problem with @ConfigProperty in null when using a process in Apache Camel Quarkus HOT 1
- GraphQL Query generated from windows doesn't work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quarkus.