You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jorg Heymans (JIRA)" <ji...@codehaus.org> on 2006/05/27 09:26:41 UTC
[jira] Reopened: (MNG-1823) dependencies with classifier mask
transitive dependencies of same dependency without classifier
[ http://jira.codehaus.org/browse/MNG-1823?page=all ]
Jorg Heymans reopened MNG-1823:
-------------------------------
even when using test-jar it does not behave as it should.
In cocoon we have exactly this case eg here : http://svn.apache.org/repos/asf/cocoon/trunk/blocks/cocoon-midi/cocoon-midi-impl/pom.xml
When i comment out the test dependencies that are normally passed on transitively by cocoon-core i get :
powerbook:~/src/cocoon-trunk/blocks/cocoon-midi/cocoon-midi-impl jheymans$ mvn -s ../../../settings.xml clean install
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building midi Block Implementation
[INFO] task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /Users/jheymans/src/cocoon-trunk/blocks/cocoon-midi/cocoon-midi-impl/target
[INFO] Deleting directory /Users/jheymans/src/cocoon-trunk/blocks/cocoon-midi/cocoon-midi-impl/target/classes
[INFO] Deleting directory /Users/jheymans/src/cocoon-trunk/blocks/cocoon-midi/cocoon-midi-impl/target/test-classes
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
Compiling 5 source files to /Users/jheymans/src/cocoon-trunk/blocks/cocoon-midi/cocoon-midi-impl/target/classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
Compiling 2 source files to /Users/jheymans/src/cocoon-trunk/blocks/cocoon-midi/cocoon-midi-impl/target/test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: /Users/jheymans/src/cocoon-trunk/blocks/cocoon-midi/cocoon-midi-impl/target/surefire-reports
org.apache.maven.surefire.booter.SurefireExecutionException: org/custommonkey/xmlunit/Diff; nested exception is java.lang.NoClassDefFoundError: org/custommonkey/xmlunit/Diff
java.lang.NoClassDefFoundError: org/custommonkey/xmlunit/Diff
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
at java.lang.Class.getMethod0(Class.java:2611)
at java.lang.Class.getMethod0(Class.java:2620)
at java.lang.Class.getMethod(Class.java:1579)
at org.apache.maven.surefire.junit.JUnitTestSet.createInstanceFromSuiteMethod(JUnitTestSet.java:173)
at org.apache.maven.surefire.junit.JUnitTestSet.constructTestObject(JUnitTestSet.java:137)
at org.apache.maven.surefire.junit.JUnitTestSet.getTestCount(JUnitTestSet.java:244)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:101)
at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:147)
at org.apache.maven.surefire.Surefire.run(Surefire.java:108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12 seconds
[INFO] Finished at: Sat May 27 09:17:45 CEST 2006
[INFO] Final Memory: 6M/20M
[INFO] ------------------------------------------------------------------------
I find it strange that the tests compile but somehow don't run. I tried with both 2.0.4 and 2.0.5-snapshot.
> dependencies with classifier mask transitive dependencies of same dependency without classifier
> -----------------------------------------------------------------------------------------------
>
> Key: MNG-1823
> URL: http://jira.codehaus.org/browse/MNG-1823
> Project: Maven 2
> Type: Bug
> Components: Inheritence and Interpolation
> Versions: 2.0.1
> Reporter: Jorg Heymans
> Assignee: Carlos Sanchez
>
>
> A module in cocoon has following dependencies :
> <dependency>
> <groupId>org.apache.cocoon</groupId>
> <artifactId>cocoon-core</artifactId>
> <version>2.2.0-SNAPSHOT</version>
> <classifier>tests</classifier>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.apache.cocoon</groupId>
> <artifactId>cocoon-core</artifactId>
> <version>2.2.0-SNAPSHOT</version>
> </dependency>
> The first dependency is created by the core module using :
> <plugin>
> <artifactId>maven-jar-plugin</artifactId>
> <executions>
> <execution>
> <goals>
> <goal>test-jar</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> Now i would like the module to depend on the jar with classifier "tests" during the testing phase ie cocoon-core-2.2.0-SNAPSHOT-tests.jar, and during the normal compilation phase it should just use cocoon-core-2.2.0-SNAPSHOT.jar. IMO above dependencies express exactly this.
> The problem is that maven somehow removes all transitive dependencies from cocoon-core-2.2.0-SNAPSHOT.jar when both dependencies are in place, breaking compilation. When i remove the dependency with the classifier, then all is fine (but ofcourse my tests can't run)
> I hope above is clear, otherwise just ping me on irc
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira