I put surefire and cobertura plugins in my pom.xml , but I cannot configure them to work properly. Either cobertura does not start or tests are run twice.
So, how can I configure plugins to work together and only once?
If I configure this way, cobertura does not start:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.5.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.12</version> </plugin>
If I tune in this way, the tests run twice:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.5.1</version> <executions> <execution> <phase>test</phase> <goals> <goal>cobertura</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.12</version> </plugin>
joaosavio
source share