Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Duplicate
-
2.0 (2.2 plugin)
-
None
-
None
-
None
-
Maven 2.0.4, Windows XP, jdk1.5.0_06
Description
The configuration of classesDirectory in the surefire configuration in the pom is ignored. This bug is new in 2.2, everything worked fine with surefire 2.1.3.
Snippet from pom:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.2</version>
<inherited>true</inherited>
<configuration>
<forkMode>once</forkMode>
<reportFormat>xml</reportFormat>
<classesDirectory>${project.build.directory}/emma-classes</classesDirectory>
<printSummary>false</printSummary>
</configuration>
</plugin>
Debug output:
First, with surefire 2.1.3:
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-surefire-plugin:2.1.3:test' -->
[DEBUG] (f) basedir = c:\example\server
[DEBUG] (f) childDelegation = true
[DEBUG] (f) classesDirectory = c:\example\server\target\emma-classes
[DEBUG] (f) classpathElements = [c:\example\server\target\classes, c:\example\server\target\test-classes, C:\WINDOWS\Profiles\butenuth\.m2\repository\emma\emma\2.0.5312\emma-2.0.5312.jar, C:\WINDOWS\Profiles\butenuth\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar, C:\WINDOWS\Profiles\butenuth\.m2\repository\de\sdm\calculator\interface\1.0-SNAPSHOT\interface-1.0-SNAPSHOT.jar]
[DEBUG] (f) forkMode = once
[DEBUG] (f) jvm = java
[DEBUG] (f) localRepository = [local] -> file://C:\WINDOWS\Profiles\butenuth\.m2\repository
[DEBUG] (f) pluginArtifacts = [junit:junit:jar:3.8.1:runtime, org.apache.maven.surefire:surefire:jar:1.5.3:runtime, org.apache.maven.surefire:surefire-booter:jar:1.5.3:runtime, org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime, org.apache.maven:maven-plugin-api:jar:2.0:runtime, org.apache.maven:maven-artifact:jar:2.0:runtime]
[DEBUG] (f) printSummary = false
[DEBUG] (f) reportFormat = xml
[DEBUG] (f) reportsDirectory = c:\example\server\target/surefire-reports
[DEBUG] (f) testClassesDirectory = c:\example\server\target\test-classes
[DEBUG] (f) testFailureIgnore = true
[DEBUG] (f) useFile = true
[DEBUG] – end configuration –
[INFO] [surefire:test]
[INFO] Setting reports dir: c:\example\server\target/surefire-reports
[DEBUG] Test Classpath :
[DEBUG] c:\example\server\target\test-classes
[DEBUG] c:\example\server\target\emma-classes <----- my classes before default classes
[DEBUG] c:\example\server\target\classes <----- is it correct they are still in classpath?
[DEBUG] c:\example\server\target\test-classes
Next, with surefire 2.2, classesDirectory is completely ignored:
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-surefire-plugin:2.2:test' -->
[DEBUG] (f) basedir = c:\example\server
[DEBUG] (f) childDelegation = false
[DEBUG] (f) classesDirectory = c:\example\server\target\emma-classes
[DEBUG] (f) classpathElements = [c:\example\server\target\classes, c:\example\server\target\test-classes, C:\WINDOWS\Profiles\butenuth\.m2\repository\emma\emma\2.0.5312\emma-2.0.5312.jar, C:\WINDOWS\Profiles\butenuth\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar, C:\WINDOWS\Profiles\butenuth\.m2\repository\de\sdm\calculator\interface\1.0-SNAPSHOT\interface-1.0-SNAPSHOT.jar]
[DEBUG] (f) disableXmlReport = false
[DEBUG] (f) forkMode = once
[DEBUG] (f) jvm = java
[DEBUG] (f) localRepository = [local] -> file://C:\WINDOWS\Profiles\butenuth\.m2\repository
[DEBUG] (f) parallel = false
[DEBUG] (f) pluginArtifactMap =
[DEBUG] (f) printSummary = false
[DEBUG] (f) projectArtifactMap =
[DEBUG] (f) remoteRepositories = [[central] -> http://dussalsaseu1.dus.sdm.de:5003/maven-proxy/repository]
[DEBUG] (f) reportFormat = xml
[DEBUG] (f) reportsDirectory = c:\example\server\target\surefire-reports
[DEBUG] (f) testClassesDirectory = c:\example\server\target\test-classes
[DEBUG] (f) testFailureIgnore = true
[DEBUG] (f) testSourceDirectory = c:\example\server\src\test\java
[DEBUG] (f) threadCount = 5
[DEBUG] (f) trimStackTrace = true
[DEBUG] (f) useFile = true
[DEBUG] – end configuration –
[INFO] [surefire:test]
[DEBUG] dummy:dummy:jar:1.0 (selected for null)
...
[DEBUG] Test Classpath :
[DEBUG] c:\example\server\target\classes
[DEBUG] c:\example\server\target\test-classes
[DEBUG] C:\WINDOWS\Profiles\butenuth\.m2\repository\emma\emma\2.0.5312\emma-2.0.5312.jar
[DEBUG] C:\WINDOWS\Profiles\butenuth\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar
[DEBUG] C:\WINDOWS\Profiles\butenuth\.m2\repository\de\sdm\calculator\interface\1.0-SNAPSHOT\interface-1.0-SNAPSHOT.jar
[DEBUG] Setting system property [localRepository]=[C:\WINDOWS\Profiles\butenuth\.m2\repository]
[DEBUG] Setting system property [basedir]=[c:\example\server]
Attachments
Attachments
Issue Links
- relates to
-
SUREFIRE-333 testClassesDirectory not added to classpath
- Closed