[
http://jira.codehaus.org/browse/MCOBERTURA-83?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ryan Stewart updated MCOBERTURA-83:
-----------------------------------
Attachment: patch
This contains a new class, CoberturaReportOnlyMojo, that mostly duplicates code
from the CoberturaReportMojo and allows you to run a cobertura report without
triggering the test phase in a parallel lifecycle. It implements a new goal
named "report". To use it in its current form, do three things:
1) Configure the plugin to specify output formats and bind the instrument goal
to the process-test-classes phase, like so:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<formats>
<format>xml</format>
<format>html</format>
</formats>
</configuration>
<executions>
<execution>
<id>cobertura-instrument</id>
<phase>process-test-classes</phase>
<goals>
<goal>instrument</goal>
</goals>
</execution>
</executions>
</plugin>
2) Modify the surefire plugin to point to the instrumented classes instead of
the default target/classes. By default, the plugin places the instrumented
classes at target/generated-classes/cobertura:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<classesDirectory>${project.build.directory}/generated-classes/cobertura</classesDirectory>
</configuration>
</plugin>
3) Run "mvn clean test cobertura:report", and your reports will, by default, be
in ${project.build.directory}/cobertura. Naturally, you could bind the report
goal to a lifecycle phase if you wanted to.
> Can't run install and cobertura:cobertura without running test phase twice
> --------------------------------------------------------------------------
>
> Key: MCOBERTURA-83
> URL: http://jira.codehaus.org/browse/MCOBERTURA-83
> Project: Maven 2.x Cobertura Plugin
> Issue Type: Bug
> Affects Versions: 2.2
> Reporter: Hugo Palma
> Priority: Critical
> Attachments: patch
>
>
> I want run as part of my CI process the goals:
> mvn install cobertura:cobertura
> The problem is that this causes the test phase to be ran twice.
> AFAIK, there's no way to do this and it's a major issue when doing CI.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email