[ http://jira.codehaus.org/browse/MSUREFIRE-59?page=comments#action_61794 ]
Aaron Bell commented on MSUREFIRE-59: ------------------------------------- Still looks broken to me, using the 2.1.3 SNAPSHOT with the simplest of testcases (attached) gives: [INFO] task-segment: [test] [INFO] ---------------------------------------------------------------------------- [INFO] snapshot org.apache.maven.plugins:maven-surefire-plugin:2.1.3-SNAPSHOT: checking for updates from snapshots Downloading: http://snapshots.maven.codehaus.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.1.3-SNAPSHOT/maven-surefire-plugin-2.1.3-20060228.012944-10.pom 1K downloaded Downloading: http://snapshots.maven.codehaus.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.1.3-SNAPSHOT/maven-surefire-plugin-2.1.3-20060228.012944-10.jar 9K downloaded [INFO] [resources:resources] ... ------------------------------------------------------- T E S T S ------------------------------------------------------- java.lang.NoSuchMethodException: SurefireTest$1.<init>() at java.lang.Class.getConstructor0(Class.java:2647) at java.lang.Class.getConstructor(Class.java:1629) at org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307) at org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150) at org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81) at org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63) at org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262) at org.apache.maven.surefire.Surefire.run(Surefire.java:140) at org.apache.maven.surefire.Surefire.run(Surefire.java:87) 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.SurefireBooter.runTestsInProcess(SurefireBooter.java:304) at org.apache.maven.surefire.SurefireBooter.run(SurefireBooter.java:220) at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:368) ... > JUnitBattery dies when TestSuite has an anonymous inner class > ------------------------------------------------------------- > > Key: MSUREFIRE-59 > URL: http://jira.codehaus.org/browse/MSUREFIRE-59 > Project: Maven 2.x Surefire Plugin > Type: Bug > Versions: 2.1.2 > Reporter: Mike Perham > Assignee: Brett Porter > Fix For: 2.1.3 > Attachments: SimpleTestSuite.java, SurefireTest.java > > > I have this method in my test suite: > {code} > private static File[] getWSDLFiles() { > URL directoryURL = > WSDLImportTestSuite.class.getResource("/com/webify/wsf/studio/core/wsdl/wsdls"); > if (directoryURL != null) { > File directory = new File(directoryURL.getPath()); > FilenameFilter filter = new FilenameFilter() { > public boolean accept(File dir, String name) { > return name.endsWith(".wsdl"); > } > }; > return directory.listFiles(filter); > } > else { > return null; > } > } > {code} > And surefire fails with this exception: > java.lang.NoSuchMethodException: > com.webify.wsf.studio.core.wsdl.WSDLImportTestSuite$1.<init>() > at java.lang.Class.getConstructor0(Class.java:1937) > at java.lang.Class.getConstructor(Class.java:1027) > at > org.apache.maven.surefire.battery.JUnitBattery.getTestConstructor(JUnitBattery.java:307) > at > org.apache.maven.surefire.battery.JUnitBattery.processTestClass(JUnitBattery.java:150) > at > org.apache.maven.surefire.battery.JUnitBattery.<init>(JUnitBattery.java:81) > at > org.apache.maven.surefire.SurefireUtils.instantiateBattery(SurefireUtils.java:63) > at > org.apache.maven.surefire.Surefire.instantiateBatteries(Surefire.java:262) > at org.apache.maven.surefire.Surefire.run(Surefire.java:140) > at org.apache.maven.surefire.Surefire.run(Surefire.java:87) -- 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