Alex, any idea on this one? Am I just a moron and can't configure my
pom correctly?
Maven output:
Scanning for projects...
-
----------------------------------------------------------------------------
Building ClassResourceBundle
task-segment: [test]
-
----------------------------------------------------------------------------
project-execute
artifact org.apache.maven.plugins:maven-resources-plugin: checking for
updates from netbeansIDE-repo-internal
artifact org.apache.maven.plugins:maven-compiler-plugin: checking for
updates from netbeansIDE-repo-internal
[resources:resources]
Using default encoding to copy filtered resources.
[compiler:compile]
Compiling 1 source file to
/home/jason/NetBeansProjects/ClassResourceBundle/target/classes
[resources:testResources]
Using default encoding to copy filtered resources.
[compiler:testCompile]
Compiling 1 source file to
/home/jason/NetBeansProjects/ClassResourceBundle/target/test-classes
[surefire:test]
Surefire report directory:
/home/jason/NetBeansProjects/ClassResourceBundle/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.Properties); 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.Properties); 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.Properties); 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.Properties)
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.Properties); 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.Properties)
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.Properties)
at java.lang.Class.getConstructor0(Class.java:2706)
at java.lang.Class.getConstructor(Class.java:1657)
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:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:316)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:943)
- ------------------------------------------------------------------------
[ERROR]BUILD FAILURE
- ------------------------------------------------------------------------
There are test failures.
Please refer to
/home/jason/NetBeansProjects/ClassResourceBundle/target/surefire-reports
for the individual test results.
- ------------------------------------------------------------------------
Trace
org.apache.maven.BuildFailureException: There are test failures.
Please refer to
/home/jason/NetBeansProjects/ClassResourceBundle/target/surefire-reports
for the individual test results.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:631)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:551)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:530)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:309)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:276)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at
org.codehaus.mevenide.netbeans.embedder.exec.MyLifecycleExecutor.execute(MyLifecycleExecutor.java:92)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:393)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:182)
at
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:760)
at
org.codehaus.mevenide.netbeans.execute.MavenJavaExecutor.run(MavenJavaExecutor.java:196)
at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test
failures.
Please refer to
/home/jason/NetBeansProjects/ClassResourceBundle/target/surefire-reports
for the individual test results.
at
org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:464)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:417)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:610)
... 11 more
- ------------------------------------------------------------------------
Total time: 4 seconds
Finished at: Sat Nov 24 09:10:21 MST 2007
Final Memory: 49M/89M
- ------------------------------------------------------------------------
- --
- -Jason Porter
Real Programmers think better when playing Adventure or Rogue.
PGP key id: 926CCFF5
PGP fingerprint: 64C2 C078 13A9 5B23 7738 F7E5 1046 C39B 926C CFF5
PGP key available at: keyserver.net, pgp.mit.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHSE5vEEbDm5Jsz/URCEWEAKDGoctw6qLx9f/2p1kvimetj03i0gCg2NSG
hvWey66kGGNMds0/f6HXX2I=
=Y8fo
-----END PGP SIGNATURE-----
In my old code I have submitted there was indeed such a constructor,
but maybe somebody removed it.
./alex
--
.w( the_mindstorm )p.
TestNG co-founder
EclipseTestNG Creator
Yes, he is and hopefully will see this one (or maybe I can ping him
about it). However, I think there is a big timezone gap between :-).
Hopefully sometime this week (or next?) there will be a release of
Surefire 2.4 out and we won't have to depend on flaky snapshot versions
any more. :-)
-Dan
> would you mind adding to your post the SNAPSHOT repository configuration to
> download the SNAPSHOT dependency?
The instructions for using the Surefire 2.4 SNAPSHOT are the same as
what's on the TestNG website:
http://testng.org/doc/maven.html
The only minor difference is that you should be able to successfully use
TestNG 5.7 with the 2.4 SNAPSHOT now that 5.7 is in the central
repository.
Once 2.4 is released, all you'll need to do is depend on TestNG and the
magical Surefire fairies will run your tests with the version of TestNG
you declared in your POM.
-Dan
Once 2.4 is released, all you'll need to do is depend on TestNG and the
magical Surefire fairies will run your tests with the version of TestNG
you declared in your POM.
> Do the surefire fairies fully support custom listeners/reporters etc.?
Surefire 2.4 supports passing arbitrary options in a <properties> map;
we'll pass those options along to TestNG.configure. That will support
anything you can do on the command line.
So, yes. :-)
-Dan
> I wonder if maven-surefire-report-plugin will also be updated?
Yes, it will.
> Last time I played with maven/testng, I could not see skipped test on
> surefire reports.
That's bug SUREFIRE-303: http://jira.codehaus.org/browse/SUREFIRE-303
Shockingly, there is no standard way to represent ignored/skipped tests in
JUnit XML. (TestNG currently handles it by inserting an empty <skipped/>
element in the <testcase> element; most reporting tools treat the test
case as if it had passed.)
I'm trying to get to the bottom of this, but it may not be resolved before
2.4 is released.
> Would be nice also to show test's description.
Interesting idea. Where would you show it? The report is already pretty
packed as it is...?
-Dan