[ http://jira.codehaus.org/browse/MSUREFIRE-126?page=comments#action_66400 ]
Roger Butenuth commented on MSUREFIRE-126: ------------------------------------------ You don't need to develop a new emma plugin, we have already done it for our project. Send me your email and I can send you the code. I announced it once on the maven list, but there was no interest... My mail: First name dot second name at sdm dot de. > classesDirectory set in pom.xml is ignored > ------------------------------------------ > > Key: MSUREFIRE-126 > URL: http://jira.codehaus.org/browse/MSUREFIRE-126 > Project: Maven 2.x Surefire Plugin > Type: Bug > Versions: 2.2 > Environment: Maven 2.0.4, Windows XP, jdk1.5.0_06 > Reporter: Roger Butenuth > Priority: Critical > Attachments: maven-surefire-plugin-trunk-410868.patch, > surefire-booter-trunk-410867.patch > > > 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 = > {org.codehaus.plexus:plexus-utils=org.codehaus.plexus:plexus-utils:jar:1.1:runtime, > > org.apache.maven.surefire:surefire-api=org.apache.maven.surefire:surefire-api:jar:2.0:runtime, > > org.apache.maven:maven-artifact=org.apache.maven:maven-artifact:jar:2.0:runtime, > > org.apache.maven:maven-plugin-api=org.apache.maven:maven-plugin-api:jar:2.0:runtime, > > org.apache.maven.surefire:surefire-booter=org.apache.maven.surefire:surefire-booter:jar:2.0:runtime} > [DEBUG] (f) printSummary = false > [DEBUG] (f) projectArtifactMap = > {de.sdm.calculator:interface=de.sdm.calculator:interface:jar:1.0-SNAPSHOT:compile, > emma:emma=emma:emma:jar:2.0.5312:test, > junit:junit=junit:junit:jar:3.8.1:test} > [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] -- 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