Hi,

currently i'm faced with a strange thing which i currently don't understand...

I'm trying to upgrade maven-war-plugin to Maven 2.2.1 dependencies...

So i have changed mavenVersion property in maven-war-plugin pom to 2.2.1 and compiled but i got a compile error:


[ERROR] /Users/kama/apache-maven/maven-plugins/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/stub/AbstractArtifactStub.java:[72,16] name clash: compareTo(java.lang.Object) in org.apache.maven.plugin.war.stub.AbstractArtifactStub and compareTo(T) in java.lang.Comparable have the same erasure, yet neither overrides the other
[INFO] 1 error
[INFO] ---------

Ok...

Changed the implementation of AbstractArtifactStub like this:

    public int compareTo( Artifact o )

Got the following:

[ERROR] /Users/kama/apache-maven/maven-plugins/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/stub/AbstractArtifactStub.java:[72,16] name clash: compareTo(org.apache.maven.artifact.Artifact) in org.apache.maven.plugin.war.stub.AbstractArtifactStub overrides a method whose erasure is the same as another method, yet neither overrides the other first method: compareTo(java.lang.Object) in org.apache.maven.plugin.testing.stubs.ArtifactStub
  second method: compareTo(T) in java.lang.Comparable
[INFO] 1 error

After searching a little bit i found out that maven-testing-harness is an old version (1.2) and updated to 2.1 looks better and got a successful compile but all the tests fail....with messages similar to this:

ests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec <<< FAILURE! - in org.apache.maven.plugin.war.WarMojoTest initializationError(org.apache.maven.plugin.war.WarMojoTest) Time elapsed: 0 sec <<< ERROR!
java.lang.NoClassDefFoundError: org/sonatype/aether/RepositorySystemSession
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
        at java.lang.Class.getMethod0(Class.java:2694)
        at java.lang.Class.getMethod(Class.java:1622)
at org.junit.internal.builders.SuiteMethodBuilder.hasSuiteMethod(SuiteMethodBuilder.java:18) at org.junit.internal.builders.SuiteMethodBuilder.runnerForClass(SuiteMethodBuilder.java:10) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
        at 
org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:262) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) 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


I have tried to add sonatype.aether dependency but this doesn't help ...

I've got the impression that i'm misunderstanding / oversight something or just running into the wrong direction ?

Can someone give me a hint how to solve that?

Many thanks in advance...

Kind regards
Karl-Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to