Hi, if I´m running JUnit Tests with Surefire-2.4 I got the following classpath:
[DEBUG] Adding managed dependencies for unknown:surefire-junit4 [DEBUG] org.apache.maven.surefire:surefire-api:jar:2.4 [DEBUG] org.apache.maven.surefire:surefire-booter:jar:2.4 [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.4.9 [DEBUG] org.apache.maven.surefire:surefire-junit4:jar:2.4:test (selected for test) [DEBUG] junit:junit:jar:4.0:test (selected for test) [DEBUG] org.apache.maven.surefire:surefire-api:jar:2.4:test (selected for test) [DEBUG] Adding to surefire test classpath: s:\mavenrepo\org\apache\maven\surefire\surefire-junit4\2.4\surefire-junit4-2.4.jar [DEBUG] Adding to surefire test classpath: s:\mavenrepo\junit\junit\4.0\junit-4.0.jar [DEBUG] Adding to surefire test classpath: s:\mavenrepo\org\apache\maven\surefire\surefire-api\2.4\surefire-api-2.4.jar [DEBUG] Test Classpath : [DEBUG] s:\mavenrepo\log4j\log4j\1.2.13\log4j-1.2.13.jar [DEBUG] s:\mavenrepo\javax\xml\ws\jaxws-api\2.1\jaxws-api-2.1.jar [DEBUG] s:\mavenrepo\javax\xml\bind\jaxb-api\2.1\jaxb-api-2.1.jar ... ... [DEBUG] s:\mavenrepo\org\objectstyle\ashwood\ashwood\1.1\ashwood-1.1.jar [DEBUG] s:\mavenrepo\com\gide\gdcams\pip\gdcams-pip-srv-common\2.7.1-SNAPSHOT\gdcams-pip-srv-common-2.7.1-SNAPSHOT-tests.jar [DEBUG] s:\mavenrepo\com\gide\gdcams\pip\gdcams-pip-server-ts\2.7.1-SNAPSHOT\gdcams-pip-server-ts-2.7.1-SNAPSHOT.jar [DEBUG] s:\mavenrepo\org\apache\xmlsec\1.4.1\xmlsec-1.4.1.jar [DEBUG] S:\pdv_cms\GDCAMS\src\pip\gdcams-pip-itest\target\classes [DEBUG] S:\pdv_cms\GDCAMS\src\pip\gdcams-pip-itest\target\test-classes As you can see, the classes and test-classes are at the end of the "test classpath", which now causes some problems. The only thing I changed was the following snippet, added to my own parent pom.xml: <properties> <target.dir>target</target.dir> </properties> <build> .... <!-- special (output)Directory for Eclipse --> <!-- see http://docs.codehaus.org/display/M2ECLIPSE/Project+FAQ#ProjectFAQ-HowtoconfigureMavenprojecttouseseparateoutputfoldersinEclipse-- > <outputDirectory>${project.basedir}/${target.dir}/classes</outputDirectory> <testOutputDirectory>${project.basedir}/${target.dir}/test-classes</testOutputDirectory> .... </build> <profiles> <profile> <id>eclipse-folders</id> <properties> <target.dir>target-eclipse</target.dir> </properties> </profile> </profiles> Any idea, what´s going wrong here ? Why are the classes and test-classes added to the end of the classpath ? thanx, Torsten