"There are test failures" error

1,246 views
Skip to first unread message

lee json

unread,
Nov 12, 2014, 11:57:45 AM11/12/14
to maven-a...@googlegroups.com
I have a maven (version 3.0.5) project mixed up with java and scala code using java version 1.6.0_25, maven-scala-plugin version 2.15, and maven-surefire-plugin.

Compilation passes, but it throws error during test phase saying:

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.6:test (default-test) on project <module-name>: There are test failures.

Unfortunately when checking surefire-reports folder, no such folder existed (path to the module is correct without a problem).

$ls target/surefire-reports
ls: cannot access target/surefire-reports: No such file or directory

So I ran test by supplying -X -e (mvn -X -e -DskipTests=false -Dtest=<TestCaseName> test), exception thrown is

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.6:test (default-test) on project <module-name>: There are test failures.

Please refer to /path/to/<module-name>/target/surefire-reports for the individual test results.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.

Please refer to /path/to/<module-name>/target/surefire-reports for the individual test results.
    at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:55)
    at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:592)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
[ERROR]
[ERROR]

Is there any log about those plugins? Or how can I diagnose?

Thanks



David Bernard

unread,
Nov 12, 2014, 12:22:33 PM11/12/14
to Maven and Scala
You are using very old version of java, maven, maven-scala-plugin (eg: maven-scala-plugin is deprecated (since 2+ years), replaced by scala-maven-plugin).

The scala plugin doesn't manage the run of test. it's the maven-surfire-plugin, do you search about this error (without being related to scala) ?

Do you have a simple project test-case that reproduce the bug, to share ?

--

---
You received this message because you are subscribed to the Google Groups "Maven and Scala" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-and-sca...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

lee json

unread,
Nov 12, 2014, 12:52:59 PM11/12/14
to maven-a...@googlegroups.com
After upgrading scala-maven-plugin and maven-surefire-plugin, error now is visible.

Thanks for the suggestion. It's useful!
Reply all
Reply to author
Forward
0 new messages