You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Grant <am...@bfjournal.com> on 2006/09/16 06:42:03 UTC

[m2] JUnit and eclipse

Hi,

 

I've been using Maven through the Mergere plug-in for eclipse, but I'm
wondering how others are working with JUnit tests.  When I get a test
failure, I get output like this:

 

[ERROR] mojo-execute : surefire:test

Diagnosis: There are test failures.

FATAL ERROR: Error executing Maven for a project

[ERROR] project-execute : com.bfjournal.sense:sense:jar:1.0-SNAPSHOT (
task-segment: [test] )

Diagnosis: There are test failures.

FATAL ERROR: Error executing Maven for a project

org.apache.maven.lifecycle.LifecycleExecutionException: There are test
failures.

      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.java:559)

      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:475)

      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
ycleExecutor.java:454)

      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
ures(DefaultLifecycleExecutor.java:306)

      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
ultLifecycleExecutor.java:273)

      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
Executor.java:140)

      at
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:441)

      at
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:382)

      at org.maven.ide.eclipse.Maven2Executor.main(Maven2Executor.java:68)

Caused by: org.apache.maven.plugin.MojoExecutionException: There are test
failures.

      at
org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:389)

      at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage
r.java:412)

      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.java:534)

      ... 8 more

 

This is really unhelpful to me.  I know the surefire test reports are output
to the target folder, but I wind up having to hunt for the failing test
frequently.  And I don't get the benefit of eclipse linking to the source,
either.  Am I missing some really great way to work with this output?

 

Thanks