Maven 3 and Surefire plugin 2.6 fail to execute tests that use a custom runner
(e.g ClasspathSuite)
---------------------------------------------------------------------------------------------------
Key: MNG-4861
URL: http://jira.codehaus.org/browse/MNG-4861
Project: Maven 2 & 3
Issue Type: Bug
Affects Versions: 3.0
Reporter: Vincent Massol
In XWiki we're using ClasspathSuite
(http://johanneslink.net/projects/cpsuite.jsp) in a AllTests file. This works
fine with Maven 2.2.1 and Surefire plugin 2.6.
When using Maven 3.0 the test fails to run with the following error:
{noformat}
java.lang.Exception: Custom runner class ClasspathSuite should have a public
constructor with signature ClasspathSuite(Class testClass)
at
org.junit.internal.runners.InitializationError.<init>(InitializationError.java:19)
at
org.junit.internal.requests.ClassRequest.buildRunner(ClassRequest.java:36)
at
org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:28)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:51)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:103)
at org.apache.maven.surefire.Surefire.run(Surefire.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
{noformat}
To reproduce you can check out and build (you'll need to have XWiki's remote
repo in your settings.xml, see
http://dev.xwiki.org/xwiki/bin/view/Community/Building):
http://svn.xwiki.org/svnroot/xwiki/enterprise/trunk/distribution-test/ui-tests/
Thanks
--
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