Hi,

In our project, the tests take some time - more than the developers are willing 
to execute twice (Surefire and Cobertura) over and over again.
First I bound Cobertura to verify-phase, but because the developers only run 
"test" to run the tests only once, they never go through the coverage-checks 
and the build on the buildserver breaks regularly because of too less coverage.

Because usually the result of instrumented and non-instrumented code is the 
same, I would like to bind Cobertura on the test-phase and Surefire on the 
verify-phase. But I can't get it work. Maven always executes either both 
plugins in the test-phase or successfully skips Surefire but effectivly skips 
Cobertura, too, because of skipped Surefire.

Currently (both are skipped) I tried to use the following plugin-configuration:
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>cobertura-maven-plugin</artifactId>
  <version>2.4</version>
  <configuration>
    <instrumentation>
      <excludes>
        <exclude>**/*Exception.class</exclude>
      </excludes>
    </instrumentation>
    <check>
      <totalLineRate>80</totalLineRate>
      <haltOnFailure>true</haltOnFailure>
    </check>
  </configuration>
  <executions>
    <execution>
      <phase>test</phase>
      <goals>
        <goal>clean</goal>
        <goal>check</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <configuration>
    <skip>true</skip>
  </configuration>
  <executions>
    <execution>
      <phase>verify</phase>
      <goals>
        <goal>test</goal>
      </goals>
      <configuration>
        <skip>false</skip>
      </configuration>
    </execution>
  </executions>
</plugin>

Does anybody know how to configure this?
-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to