Bug 988977 - maven-plugin-testing: Undeclared dependency on Aether
Summary: maven-plugin-testing: Undeclared dependency on Aether
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: maven-plugin-testing
Version: 22
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michal Srb
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 988561
TreeView+ depends on / blocked
 
Reported: 2013-07-26 20:17 UTC by Orion Poplawski
Modified: 2016-07-19 19:26 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-19 19:26:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Orion Poplawski 2013-07-26 20:17:05 UTC
Description of problem:

This the previous issue with building tests seems to have been addressed, I trying again but it is failing in a different way:

[INFO] RAT Maven Plugin .................................. FAILURE [10.011s]
[INFO] RAT Ant Tasks ..................................... SKIPPED
[INFO] RAT Application ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.363s
[INFO] Finished at: Fri Jul 26 14:02:13 MDT 2013
[INFO] Final Memory: 36M/201M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.15:test (default-test) on project apache-rat-plugin: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.15:test failed: There was an error in the forked process
[ERROR] java.lang.NoClassDefFoundError: org/sonatype/aether/RepositorySystemSession
[ERROR] at java.lang.Class.getDeclaredMethods0(Native Method)
[ERROR] at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
[ERROR] at java.lang.Class.getMethod0(Class.java:2764)
[ERROR] at java.lang.Class.getMethod(Class.java:1653)
[ERROR] at org.apache.maven.surefire.common.junit3.JUnit3Reflector.createInstanceFromSuiteMethod(JUnit3Reflector.java:152)
[ERROR] at org.apache.maven.surefire.common.junit3.JUnit3Reflector.constructTestObject(JUnit3Reflector.java:121)
[ERROR] at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:70)
[ERROR] at org.apache.maven.surefire.junit.JUnit3Provider.executeTestSet(JUnit3Provider.java:131)
[ERROR] at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:108)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.RepositorySystemSession
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[ERROR] ... 12 more
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.15:test (default-test) on project apache-rat-plugin: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.15:test failed: There was an error in the forked process
java.lang.NoClassDefFoundError: org/sonatype/aether/RepositorySystemSession
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
        at java.lang.Class.getMethod0(Class.java:2764)
        at java.lang.Class.getMethod(Class.java:1653)
        at org.apache.maven.surefire.common.junit3.JUnit3Reflector.createInstanceFromSuiteMethod(JUnit3Reflector.java:152)
        at org.apache.maven.surefire.common.junit3.JUnit3Reflector.constructTestObject(JUnit3Reflector.java:121)
        at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:70)
        at org.apache.maven.surefire.junit.JUnit3Provider.executeTestSet(JUnit3Provider.java:131)
        at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:108)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.RepositorySystemSession
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 12 more
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.15:test failed: There was an error in the forked process
java.lang.NoClassDefFoundError: 


        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
        at java.lang.Class.getMethod0(Class.java:2764)
        at java.lang.Class.getMethod(Class.java:1653)
        at org.apache.maven.surefire.common.junit3.JUnit3Reflector.createInstanceFromSuiteMethod(JUnit3Reflector.java:152)
        at org.apache.maven.surefire.common.junit3.JUnit3Reflector.constructTestObject(JUnit3Reflector.java:121)
        at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:70)
        at org.apache.maven.surefire.junit.JUnit3Provider.executeTestSet(JUnit3Provider.java:131)
        at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:108)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.RepositorySystemSession
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 12 more
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: java.lang.RuntimeException: There was an error in the forked process
java.lang.NoClassDefFoundError: org/sonatype/aether/RepositorySystemSession
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
        at java.lang.Class.getMethod0(Class.java:2764)
        at java.lang.Class.getMethod(Class.java:1653)
        at org.apache.maven.surefire.common.junit3.JUnit3Reflector.createInstanceFromSuiteMethod(JUnit3Reflector.java:152)
        at org.apache.maven.surefire.common.junit3.JUnit3Reflector.constructTestObject(JUnit3Reflector.java:121)
        at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:70)
        at org.apache.maven.surefire.junit.JUnit3Provider.executeTestSet(JUnit3Provider.java:131)
        at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:108)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.RepositorySystemSession
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 12 more
        at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:479)
        at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:352)
        at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:158)
        at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:883)
        at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:747)
        at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:645)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
        ... 20 more
[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/PluginExecutionException

Version-Release number of selected component (if applicable):
maven-3.1.0-2.fc20.noarch

org/sonatype/aether/RepositorySystemSession seems to be in aether-api.jar which is installed.  Perhaps maven-surefire isn't expressing its dependencies correctly?

Comment 1 Orion Poplawski 2013-08-15 18:13:02 UTC
Hmm, seems to be working no on F20, but not F19...

Comment 2 Orion Poplawski 2013-08-15 19:30:08 UTC
Scratch that, still seeing:

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.074 sec <<< FAILURE! - in org.apache.rat.mp.RatCheckMojoTest
initializationError(org.apache.rat.mp.RatCheckMojoTest)  Time elapsed: 0.013 sec  <<< ERROR!
java.lang.NoClassDefFoundError: org/eclipse/aether/RepositorySystemSession

Comment 3 Mikolaj Izdebski 2014-01-06 21:49:44 UTC
Reassigning to maven-plugin-testing.  The cause of this seems to be Fedora-specific patch we are carying in maven-plugin-testing:

0001-Port-to-Maven-3.1.0.patch
Author: Michal Srb <msrb>
Date:   Tue Aug 6 13:21:34 2013 +0200

    Port to Maven 3.1.0 (Resolves: #988253, #991860)

This patch adds dependency on Eclipse Aether API without declaring this dependency in POM files.  As a result clients of  get NoClassDefFoundError when trying to load AbstractMojoTestCase.  (RatCheckMojoTest extends AbstractMojoTestCase.)

Comment 4 Mikolaj Izdebski 2014-01-06 22:13:18 UTC
Assigned to myself by mistake.  Moving back to NEW.

Comment 5 Michal Srb 2014-01-07 14:20:14 UTC
Update to maven-plugin-testing 3.0.0 solved the problem with org.sonatype.aether.RepositorySystemSession ClassDefNotFound exception. Although I am still not quite sure where the real problem was. Same problem was reported against upstream maven-plugin-testing 2.1 without fedora-specific patch [1]. Tests in apache-rat now fail from different reason [2]. Possibly still due to maven-plugin-testing bug/incompatibility. I'm keeping this bug open because it needs more investigation.

[1]: http://jira.codehaus.org/browse/MPLUGINTESTING-27
[2]: http://kojipkgs.fedoraproject.org//work/tasks/9093/6369093/build.log

Comment 6 Michal Srb 2014-01-07 15:47:52 UTC
Looks like maven-plugin-testing upstream changed, from some reason, scope of some important dependencies from compile to provided. Bug filed upstream: http://jira.codehaus.org/browse/MPLUGINTESTING-35

Comment 7 Mikolaj Izdebski 2014-03-28 09:48:04 UTC
Is this fixed in Fedora?  If not, what needs to be done?

I would like to use m-p-t for XMvn 2.0, but if it is not usable then I may have to find another solution.

Comment 8 Michal Srb 2014-03-31 06:33:02 UTC
The package should work just fine, but you might need to explicitly specify plugin-testing's dependencies in your POM, because in upstream POM they have scope "provided".

Comment 9 Mikolaj Izdebski 2014-03-31 06:51:30 UTC
So it is fixed? Can you close this bug then?

Comment 10 Michal Srb 2014-03-31 07:13:25 UTC
There is nothing wrong with the package (IMO) and thus there is nothing to fix right now. Although it can cause ClassNotFoundException in some cases, it is how upstream version behaves. Upstream changed scope of the dependencies from compile to provided from some reason. I filed upstream bug for it (see comment #6) and since it can cause some problems I would keep this bug open for now and wait for their response.

Comment 11 Fedora End Of Life 2015-01-09 22:13:37 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Fedora End Of Life 2015-05-29 09:13:27 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 13 Fedora End Of Life 2015-11-04 15:32:19 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 14 Fedora End Of Life 2016-07-19 19:26:48 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.