[ http://jira.codehaus.org/browse/MPTEST-68?page=all ]
Dennis Lundberg updated MPTEST-68: ---------------------------------- Attachment: MPTEST-68.patch By using another name for the property than maven-java-plugin does, the effects of this issue is minimized. > SourceModifications sometimes does not work for test classes > ------------------------------------------------------------ > > Key: MPTEST-68 > URL: http://jira.codehaus.org/browse/MPTEST-68 > Project: maven-test-plugin > Issue Type: Bug > Affects Versions: 1.6.2 > Environment: Win XP, Maven 1.0.2 > Reporter: Dennis Lundberg > Attachments: maven-test-plugin-sourceModifications.zip, > MPTEST-68.patch > > > First off run: > maven -X test > Then look at the "[javac] [DEBUG] fileset:" entry for test:compile. Mine > looks like this: > [javac] [DEBUG] fileset: Setup scanner in dir > G:\test\maven-test-plugin-sourceModifications\src\test with patternSet{ > includes: [org/apache/commons/logging/*.java, > org/apache/commons/logging/impl/LogFactoryImpl.java, > org/apache/commons/logging/impl/WeakHashtable.java, > org/apache/commons/logging/impl/SimpleLog.java, > org/apache/commons/logging/impl/NoOpLog.java, > org/apache/commons/logging/impl/Jdk14Logger.java, > test/org/apache/commons/logging/SimpleLogTestCase.java] excludes: > [test/org/apache/commons/logging/servlet/*TestCase.java, **/package.html] } > Now go to the pom and remove the comments as specified in there. Run it again: > maven -X clean test > This time the build fails. Look at the fileset again. Mine looks like this: > [javac] [DEBUG] fileset: Setup scanner in dir > G:\test\maven-test-plugin-sourceModifications\src\test with patternSet{ > includes: [] excludes: [**/package.html] } > Now that is the default values. What has happend here is that the section > that was un-commented from the pom will cause the property called > "classPresent" to be set during java:compile. That property can not be unset > using ant. Because the java-plugin and test-plugin uses the same > property-name, it is highjacked and test:compile will fail because of it. > I fiddled around in the test-plugin and managed to solve this problem. Will > attach patch shortly. -- 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