tutorials
tutorials copied to clipboard
GST-9 - Initial commit, created quarkus-testcontainers submodule
Seeing this in CI:
[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.8.2:build (default) on project order-service: Execution default of goal io.quarkus.platform:quarkus-maven-plugin:3.8.2:build failed: Unable to load the mojo 'build' (or one of its required components) from the plugin 'io.quarkus.platform:quarkus-maven-plugin:3.8.2': 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.BuildMojo
[ERROR] at ClassRealm[extension>io.quarkus.platform:quarkus-maven-plugin:3.8.2, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@30946e09] (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.platform:quarkus-maven-plugin:3.8.2:build")
[ERROR]
[ERROR] 1 error
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: io.quarkus.platform:quarkus-maven-plugin:3.8.2:build
[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/PluginContainerException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :order-service
@theangrydev I'm not sure whats going on here but I am fine locally and was able to resolve the issue in the spring-project module. Not sure if its the Java version Jenkins is using that is causing issues or not. It looks like it is using 17.0.1 and I'd think the quarkus-maven-plugin 3.8.2 wouldn't take issue with that.
@pauldpearson ok let me ping someone on our side to investigate, feel free to proceed with the article in the meantime if you're ready to
https://github.com/quarkusio/quarkus/issues/32379 might be relevant
@pauldpearson we use Maven 3.6.0 in CI and that seems to be the cause of the error - I'm asking the team if we can upgrade to 3.9.6
@theangrydev Okay sounds good. If not then we can try downgrading Quarkus?
retest this please
@asif-anwar one thing I'm still missing - what changes do we need to make here to respect the usual LiveTest skip mechanism?
Never mind, I can see the parent is not being specified in the two child modules, that should do it
🤞 Pushed up suggested changes
@theangrydev Do we need to add the surefire plugin back to the spring project? Otherwise I did notice the versions on that differed from what you made me change in my modules.
@pauldpearson quarkus-modules/quarkus-vs-springboot/spring-project/pom.xml is a module for another article, so I wouldn't expect any changes at all there vs master
@asif-anwar we are now seeing:
[INFO] quarkus-project 0.1-SNAPSHOT ....................... SUCCESS [ 15.408 s]
[INFO] spring-project 0.1-SNAPSHOT ........................ FAILURE [ 3.196 s]
[INFO] quarkus-funqy 1.0.0-SNAPSHOT ....................... SKIPPED
[INFO] quarkus-testcontainers 1.0.0-SNAPSHOT .............. SKIPPED
[INFO] order-service 1.0.0-SNAPSHOT ....................... SKIPPED
[INFO] customer-service 1.0.0-SNAPSHOT .................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:43 min
[INFO] Finished at: 2024-03-27T12:25:27Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project spring-project: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test failed: java.lang.NoClassDefFoundError: org/junit/platform/launcher/core/LauncherFactory: org.junit.platform.launcher.core.LauncherFactory -> [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/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :spring-project
Failure at module unrelated to this PR spring-project
This also reproduces on origin/master (without these PR changes) with mvn 3.6.3 and java 17.0.10
@pauldpearson I'm not clear how quarkus-modules/quarkus-vs-springboot/spring-project/pom.xml was working before but looks like your change does fix it
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
</plugin>
So let's go back to that sorry - and extract a ${maven-surefire-plugin.version} property for the version there
Victory!
retest this please
retest this please
@theangrydev I'm getting the same failure locally as what is showing in Jenkins
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on project spring-project: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test failed: org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests: ClassSelector [className = 'com.baeldung.spring_project.SpringContextTest'] resolution failed: 'java.util.stream.Stream org.junit.platform.commons.support.ReflectionSupport.streamNestedClasses(java.lang.Class, java.util.function.Predicate)' -> [Help 1]
retest this please
retest this please