[ http://jira.codehaus.org/browse/MANT-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dennis Lundberg closed MANT-25. ------------------------------- Resolution: Won't Fix This plugin is for Maven 2. It will not read a Maven 1.x project.xml file. > The plugin generates bad test targets when the project.xml has include and > exclude rules > ---------------------------------------------------------------------------------------- > > Key: MANT-25 > URL: http://jira.codehaus.org/browse/MANT-25 > Project: Maven 2.x Ant Plugin > Issue Type: Bug > Environment: maven-ant-plugin trunk using maven trunk > Last Changed Rev: 494359 > Reporter: Petteri Räty > Priority: Critical > > From commons-dbunit-2.2 project.xml: > <unitTest> > <includes> > <include>org/dbunit/AllTests.java</include> > </includes> > <excludes> > <exclude>**/*Test</exclude> > </excludes> > </unitTest> > The maven-build.xml created: > <batchtest todir="${maven.test.reports}"> > <fileset dir="${maven.build.testDir.0}"> > <include name="**/*Test.java"/> > <exclude name="**/*Abstract*Test.java"/> > </fileset> > </batchtest> > So trying to run ant test fails (mvn test works fine): > The ' characters around the executable and arguments are > not part of the command. > [junit] Running org.apache.tools.ant.taskdefs.TaskdefsTest > [junit] Testsuite: org.apache.tools.ant.taskdefs.TaskdefsTest > [junit] junit.framework.TestListener: tests to run: 1 > [junit] junit.framework.TestListener: startTest(warning) > [junit] junit.framework.TestListener: addFailure(warning, No tests found > in org.apache.tools.ant.taskdefs.TaskdefsTest) > [junit] junit.framework.TestListener: endTest(warning) > [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.172 sec > [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.172 sec > [junit] > [junit] Testcase: warning took 0.003 sec > [junit] FAILED > [junit] No tests found in org.apache.tools.ant.taskdefs.TaskdefsTest > [junit] > BUILD FAILED > /var/tmp/portage/dev-java/dbunit-2.2/work/dbunit-2.2/maven-build.xml:116: > Test org.apache.tools.ant.taskdefs.TaskdefsTest failed > at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.actOnTestResult(JUnitTask.java:1712) > at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:820) > at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1657) > at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:764) > at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:357) > at org.apache.tools.ant.Target.performTasks(Target.java:385) > at > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > at org.apache.tools.ant.Project.executeTarget(Project.java:1298) > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) > at org.apache.tools.ant.Project.executeTargets(Project.java:1181) > at org.apache.tools.ant.Main.runBuild(Main.java:698) > at org.apache.tools.ant.Main.startAnt(Main.java:199) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) > It should be easy to add this to the maven-ant-plugin unit tests. -- 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