mvn site -Dmaven.test.failure.ignore=true I think that will do the trick.
Chris > -----Original Message----- > From: Zeitlin, Michael (ATL) [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 04 October, 2006 11:00 > To: users@maven.apache.org > Subject: Build fails when unit tests fail > > > > 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.executeGoa > ls(Default > LifecycleExecutor.java:555) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa > lWithLifec > ycle(DefaultLifecycleExecutor.java:47 > > 5) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjec > tLifecycle > (DefaultLifecycleExecutor.java:891) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecy > cle(Defaul > tLifecycleExecutor.java:734) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa > ls(Default > LifecycleExecutor.java:505) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa > lWithLifec > ycle(DefaultLifecycleExecutor.java:47 > > 5) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa > l(DefaultL > ifecycleExecutor.java:454) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa > lAndHandle > Failures(DefaultLifecycleExecutor.jav > > a:306) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTas > kSegments( > DefaultLifecycleExecutor.java:273) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(De > faultLifec > 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(NativeMethodAccess > orImpl.jav > a:39) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth > odAccessor > 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(Surefi > rePlugin.j > ava:403) > > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(Defau > ltPluginMa > nager.java:412) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa > ls(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] > -------------------------------------------------------------- > ---------- > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]