I am trying to generate a clover report using the "mvn site" command on maven2. However, the project is currently in a transitional phase and has a lot of unit test failures. So, I would like clover to generate the report against the unit test that exists and not fail if there are any unit tests failures. When I tried "mvn site -Dmaven.test.skip=true", clover generated a report with no unit tests. Is there a way to configure clover to run even if some of the unit tests fail?
Here is the entry in my pom.xml: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clover-plugin</artifactId> <configuration> <jdk>1.5</jdk> <targetPercentage>1%</targetPercentage> </configuration> <executions> <execution> <phase>pre-site</phase> <goals> <goal>instrument</goal> </goals> </execution> </executions> </plugin> And here is the error message I get: Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.141 sec <<< FAILURE! Results : Tests run: 58, Failures: 4, Errors: 32, Skipped: 0 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] There are test failures. [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.BuildFailureException: There are test failures. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default LifecycleExecutor.java:555) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec ycle(DefaultLifecycleExecutor.java:47 5) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle (DefaultLifecycleExecutor.java:891) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Defaul tLifecycleExecutor.java:734) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default LifecycleExecutor.java:505) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec ycle(DefaultLifecycleExecutor.java:47 5) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL ifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle Failures(DefaultLifecycleExecutor.jav a:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec ycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures. at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.j ava:403) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa nager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default LifecycleExecutor.java:534) ... 20 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 32 seconds [INFO] Finished at: Wed Oct 04 11:15:23 EDT 2006 [INFO] Final Memory: 9M/34M [INFO] ------------------------------------------------------------------------