You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/01/10 16:55:51 UTC

[GitHub] [maven-mvnd] jglick opened a new issue #579: `java.lang.NoSuchMethodError: org.apache.maven.project.MavenProject.setArtifacts(Ljava/util/Set;)V`

jglick opened a new issue #579:
URL: https://github.com/apache/maven-mvnd/issues/579


   While trying to use mvnd from my IDE (https://github.com/apache/netbeans/pull/3210) I found that #420 seems to have broken some mojos:
   
   ```console
   $ gh repo clone jenkinsci/build-token-root-plugin
   Cloning into 'build-token-root-plugin'...
   …
   $ cd build-token-root-plugin/
   $ git rev-parse HEAD
   4993b965c0f7026cecd8bf67e7a1371fc846c089
   $ mvn -version
   Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
   Maven home: /home/jglick/.sdkman/candidates/maven/current
   Java version: 1.8.0_312, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
   Default locale: en_US, platform encoding: UTF-8
   OS name: "linux", version: "5.13.0-23-generic", arch: "amd64", family: "unix"
   $ mvn hpi:run
   [INFO] Scanning for projects...
   …
   [INFO] --- maven-hpi-plugin:3.20:run (default-cli) @ build-token-root ---
   …
   [INFO] Started @8088ms
   [INFO] Started Jetty Server
   [INFO] Console reloading is ENABLED. Hit ENTER on the console to restart the context.
   …
   2022-01-10 16:42:29.401+0000 [id=28]	INFO	hudson.WebAppMain$3#run: Jenkins is fully up and running
   ^C
   $ mvnd -version
   mvnd native client 0.7.1-linux-amd64 (97c587c11383a67b5bd0ff8388bd94c694b91c1e)
   Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jansi.linux.LinuxNativePty
   Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
   Maven home: /home/jglick/.sdkman/candidates/mvnd/0.7.1/mvn
   Java version: 1.8.0_312, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
   Default locale: en_US, platform encoding: UTF-8
   OS name: "linux", version: "5.13.0-23-generic", arch: "amd64", family: "unix"
   $ mvnd hpi:run -e
   [INFO] Error stacktraces are turned on.
   [INFO] Processing build on daemon a7876fd1
   [INFO] Scanning for projects...
   [INFO] BuildTimeEventSpy is registered.
   [INFO] 
   [INFO] Using the SmartBuilder implementation with a thread count of 11
   [INFO] Task segments : [hpi:run]
   [INFO] Build maximum degree of concurrency is 11
   [INFO] Total number of projects is 1
   [INFO] 
   [INFO] --------------< org.jenkins-ci.plugins:build-token-root >---------------
   [INFO] Building Build Authorization Token Root Plugin 1.10-SNAPSHOT
   …
   [INFO] --- maven-hpi-plugin:3.20:run (default-cli) @ build-token-root ---
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  0.688 s (Wall Clock)
   [INFO] Finished at: 2022-01-10T11:42:57-05:00
   [INFO] ------------------------------------------------------------------------
   [ERROR] Failed to execute goal org.jenkins-ci.tools:maven-hpi-plugin:3.20:run (default-cli) on project build-token-root: Execution default-cli of goal org.jenkins-ci.tools:maven-hpi-plugin:3.20:run failed: An API incompatibility was encountered while executing org.jenkins-ci.tools:maven-hpi-plugin:3.20:run: java.lang.NoSuchMethodError: org.apache.maven.project.MavenProject.setArtifacts(Ljava/util/Set;)V
   [ERROR] -----------------------------------------------------
   [ERROR] realm =    plugin>org.jenkins-ci.tools:maven-hpi-plugin:3.20
   [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
   [ERROR] urls[0] = file:/home/jglick/.m2/repository/org/jenkins-ci/tools/maven-hpi-plugin/3.20/maven-hpi-plugin-3.20.jar
   …
   [ERROR] Number of foreign imports: 1
   [ERROR] import: Entry[import  from realm ClassRealm[project>org.jenkins-ci.plugins:build-token-root:1.10-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
   [ERROR] 
   [ERROR] -----------------------------------------------------
   [ERROR] 
   [ERROR] -> [Help 1]
   org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jenkins-ci.tools:maven-hpi-plugin:3.20:run (default-cli) on project build-token-root: Execution default-cli of goal org.jenkins-ci.tools:maven-hpi-plugin:3.20:run failed: An API incompatibility was encountered while executing org.jenkins-ci.tools:maven-hpi-plugin:3.20:run: java.lang.NoSuchMethodError: org.apache.maven.project.MavenProject.setArtifacts(Ljava/util/Set;)V
   -----------------------------------------------------
   realm =    plugin>org.jenkins-ci.tools:maven-hpi-plugin:3.20
   …
   -----------------------------------------------------
   
   	at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:274)
   	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:196)
   	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:160)
   	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
   	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
   	at org.mvndaemon.mvnd.builder.SmartBuilderImpl.buildProject(SmartBuilderImpl.java:178)
   	at org.mvndaemon.mvnd.builder.SmartBuilderImpl$ProjectBuildTask.run(SmartBuilderImpl.java:198)
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.jenkins-ci.tools:maven-hpi-plugin:3.20:run failed: An API incompatibility was encountered while executing org.jenkins-ci.tools:maven-hpi-plugin:3.20:run: java.lang.NoSuchMethodError: org.apache.maven.project.MavenProject.setArtifacts(Ljava/util/Set;)V
   …
   	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:186)
   	at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:271)
   	... 11 common frames omitted
   Caused by: org.apache.maven.plugin.PluginContainerException: An API incompatibility was encountered while executing org.jenkins-ci.tools:maven-hpi-plugin:3.20:run: java.lang.NoSuchMethodError: org.apache.maven.project.MavenProject.setArtifacts(Ljava/util/Set;)V
   …
   	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:184)
   	... 12 common frames omitted
   Caused by: java.lang.NoSuchMethodError: org.apache.maven.project.MavenProject.setArtifacts(Ljava/util/Set;)V
   	at org.jenkinsci.maven.plugins.hpi.RunMojo.execute(RunMojo.java:262)
   	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
   	... 12 common frames omitted
   [ERROR] 
   [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
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-mvnd] gnodet commented on issue #579: `java.lang.NoSuchMethodError: org.apache.maven.project.MavenProject.setArtifacts(Ljava/util/Set;)V`

Posted by GitBox <gi...@apache.org>.
gnodet commented on issue #579:
URL: https://github.com/apache/maven-mvnd/issues/579#issuecomment-1009669911


   I think this should be already fixed with https://github.com/apache/maven-mvnd/pull/566


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-mvnd] jglick commented on issue #579: `java.lang.NoSuchMethodError: org.apache.maven.project.MavenProject.setArtifacts(Ljava/util/Set;)V`

Posted by GitBox <gi...@apache.org>.
jglick commented on issue #579:
URL: https://github.com/apache/maven-mvnd/issues/579#issuecomment-1065368840


   Any plans to release 0.7.2?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-mvnd] jglick commented on issue #579: `java.lang.NoSuchMethodError: org.apache.maven.project.MavenProject.setArtifacts(Ljava/util/Set;)V`

Posted by GitBox <gi...@apache.org>.
jglick commented on issue #579:
URL: https://github.com/apache/maven-mvnd/issues/579#issuecomment-1009977696


   https://github.com/apache/maven-mvnd/suites/4840771252/artifacts/137146082 indeed seems to work. Looking forward to 0.7.2. Thanks for the fast response!
   
   (`mvnd` still does not work well for this mojo, apparently due to a difference in stdio forwarding behavior compared to `mvn`, but that is another issue. The mojo does run without error.)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-mvnd] gnodet closed issue #579: `java.lang.NoSuchMethodError: org.apache.maven.project.MavenProject.setArtifacts(Ljava/util/Set;)V`

Posted by GitBox <gi...@apache.org>.
gnodet closed issue #579:
URL: https://github.com/apache/maven-mvnd/issues/579


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-mvnd] gnodet commented on issue #579: `java.lang.NoSuchMethodError: org.apache.maven.project.MavenProject.setArtifacts(Ljava/util/Set;)V`

Posted by GitBox <gi...@apache.org>.
gnodet commented on issue #579:
URL: https://github.com/apache/maven-mvnd/issues/579#issuecomment-1010017090


   > (`mvnd` still does not work well for this mojo, apparently due to a difference in stdio forwarding behavior compared to `mvn`, but that is another issue. The mojo does run without error.)
   
   That could be the same issue than #541, the main reason being that input forwarding is not currently supported.  I'm working on it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org