The maven-surefire-plugin fails with a NoSuchMethodException. -------------------------------------------------------------
Key: SUREFIRE-363 URL: http://jira.codehaus.org/browse/SUREFIRE-363 Project: Maven Surefire Issue Type: Bug Components: TestNG support Affects Versions: 2.4 Environment: Maven 2.0.7, Surefire SVN revision 587921, TestNG 5.5 Reporter: Tibor Varga Attachments: project.tgz, TestNGDirectoryTestSuite.diff Parameter type mismatch when finding the TestNGDirectoryTestSuite constructor: [INFO] [surefire:test] [INFO] Surefire report directory: /Users/tibvarga/work/test/project/target/surefire-reports org.apache.maven.surefire.booter.SurefireExecutionException: Unable to find appropriate constructor to create suite: org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.<init>(java.io.File, java.util.ArrayList, java.util.ArrayList, java.lang.String, java.lang.String, java.util.HashMap); nested exception is java.lang.NoSuchMethodException: org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.<init>(java.io.File, java.util.ArrayList, java.util.ArrayList, java.lang.String, java.lang.String, java.util.HashMap); nested exception is org.apache.maven.surefire.testset.TestSetFailedException: Unable to find appropriate constructor to create suite: org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.<init>(java.io.File, java.util.ArrayList, java.util.ArrayList, java.lang.String, java.lang.String, java.util.HashMap); nested exception is java.lang.NoSuchMethodException: org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.<init>(java.io.File, java.util.ArrayList, java.util.ArrayList, java.lang.String, java.lang.String, java.util.HashMap) org.apache.maven.surefire.testset.TestSetFailedException: Unable to find appropriate constructor to create suite: org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.<init>(java.io.File, java.util.ArrayList, java.util.ArrayList, java.lang.String, java.lang.String, java.util.HashMap); nested exception is java.lang.NoSuchMethodException: org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.<init>(java.io.File, java.util.ArrayList, java.util.ArrayList, java.lang.String, java.lang.String, java.util.HashMap) java.lang.NoSuchMethodException: org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.<init>(java.io.File, java.util.ArrayList, java.util.ArrayList, java.lang.String, java.lang.String, java.util.HashMap) at java.lang.Class.getConstructor0(Class.java:2647) at java.lang.Class.getConstructor(Class.java:1629) at org.apache.maven.surefire.Surefire.instantiateObject(Surefire.java:217) at org.apache.maven.surefire.Surefire.instantiateSuite(Surefire.java:246) at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:148) at org.apache.maven.surefire.Surefire.run(Surefire.java:111) 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:585) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:315) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:922) [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE Attached are a project to demonstrate the issue and a patch that resolves it. -- 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