<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
</plugin>
</plugins>
</reporting>
This snippet does not include a <version> element for the plugin. To save
you from irreproducible builds, you should always declare a version for each
and every build/report plugin in your POM. Build plugins can be conveniently
locked down in a common parent POM, say your organization's POM. Report
plugins have no <pluginManagement> support and hence need to be locked down
on each occurrence.
So first of all make sure you use version 2.2 of the plugin.
However when I run 'mvn clean site'
I assume that the tests also run twice on execution of "mvn site".
Are the tests supposed to run twice?
The Cobertura Plugin itself should run the tests only once during execution
of its cobertura:cobertura goal. The second test run might result from usage
of the maven-surefire-report-plugin: Its goal surefire-report:report will
also run the tests.
You could have cobertura:cobertura run first and surefire-report:report-only
afterwards to have the tests run only once, i.e. the Surefire report is
generated from the test results obtained by the instrumented Cobertura test
run. Note that others don't recommend that in favor of separation of
concerns: If I remember correctly, somebody mentioned failures during their
regular tests which didn't show up in the Cobertura run because of different
synchronization behavior.
with many failing for strange reasons
You could have a look at the other open issues at
http://jira.codehaus.org/browse/MCOBERTURA
and search for something similar to your problem. Otherwise posting details
about the failures (e.g. exception traces) might help to tell whether it's a
issue with the plugin or a misconfiguration. In the first case, you should
try to create a minimal test project that reveals the failure and could be
attached to a new JIRA issue.
Benjamin
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email