Hi,
I am developing a Mojo and trying to test it using the
maven-plugin-testing-harness and i use Maven 3.0.x as my maven platform,
The following is the pom.xml snippet of my plugin where maven.version =
2.0.10
....
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>${maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>${maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>${maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-invoker</artifactId>
<version>${maven.version}</version>
</dependency>
.....
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.5.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>2.0-alpha-1</version>
<scope>test</scope>
</dependency>
When i execute the test case i get the error as
java.lang.NoSuchMethodError:
org.codehaus.plexus.configuration.PlexusConfiguration.setName(Ljava/lang/String;)V
at
org.codehaus.plexus.configuration.DefaultPlexusConfiguration.addChild(DefaultPlexusConfiguration.java:222)
at
org.codehaus.plexus.configuration.DefaultPlexusConfiguration.getChild(DefaultPlexusConfiguration.java:165)
at
org.codehaus.plexus.configuration.DefaultPlexusConfiguration.getChild(DefaultPlexusConfiguration.java:149)
at
org.codehaus.plexus.container.initialization.InitializeComponentRegistryPhase.getComponentRepository(InitializeComponentRegistryPhase.java:66)
at
org.codehaus.plexus.container.initialization.InitializeComponentRegistryPhase.execute(InitializeComponentRegistryPhase.java:41)
at
org.codehaus.plexus.DefaultPlexusContainer.initializePhases(DefaultPlexusContainer.java:644)
at
org.codehaus.plexus.DefaultPlexusContainer.initialize(DefaultPlexusContainer.java:556)
at
org.codehaus.plexus.DefaultPlexusContainer.construct(DefaultPlexusContainer.java:281)
at
org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:172)
at
org.apache.maven.plugin.testing.AbstractMojoTestCase.setupContainer(AbstractMojoTestCase.java:128)
at
org.apache.maven.plugin.testing.AbstractMojoTestCase.getContainer(AbstractMojoTestCase.java:141)
at
org.apache.maven.plugin.testing.AbstractMojoTestCase.setUp(AbstractMojoTestCase.java:87)
.....
Not sure what is the cause of the issue , can someone help to fix this
pointing out what is wrong and how to fix this and test mojo with maven
3.0.3 and also ensure backward compatibility to a extent possible
~Kamesh
--
View this message in context:
http://maven.40175.n5.nabble.com/Maven-Test-Harness-issue-tp5495578p5495578.html
Sent from the Maven Developers mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]