[
https://jira.codehaus.org/browse/MCOBERTURA-83?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=290667#comment-290667
]
Shant Stepanian commented on MCOBERTURA-83:
-------------------------------------------
Possibly the intent of my fix was not clear earlier, given the subject-line of
this JIRA.
What I'd like to propose (and this is basically what Ryan Stewart had proposed
earlier in this JIRA) is to leave the cobertura goal alone, and instead add
support for a report-only goal. A similar "report-only" goal looks like was
proposed in the SUREFIRE-257 jira that you referenced for surefire
What I think people are wanting is just a way to not have the tests execute
twice. It seems to be difficult to do that via the cobertura task or via some
configuration in the surefire plugin. So what we'd like is just a basic
report-only goal, which is already available in many other similar plugins.
Hence, if people wanted to just have run the tests once, they would access
individual goals, similar to Ryan Stewart's proposal, i.e. 1) call the
instrument goal 2) have the surefire plugin point to the instrumented folder
3) call the report-only goal to generate the report.
The reportOnlyAndInstrumentOutputDirPatch.patch has a patch for the report-only
goal, as well as a configuration in the instrument goal to not switch the
output folder, as otherwise having access to the instrument goal itself causes
more trouble than we needed (as only the surefire plugin really needs the
instrumented classes - all other plugins like code analysis [say findbugs] and
jar/packaging need the actual classes).
This should be a reasonable compromise where 1) all behaviors for existing
goals and configurations remain as is, including the cobertura task 2) people
can still have better access to specific goals to handle executions the way
that they want, if they choose that route. Short of having a better integration
between surefire and cobertura, this seems like a best way to go, and would
solve problems
> Can't run install and cobertura:cobertura without running test phase twice
> --------------------------------------------------------------------------
>
> Key: MCOBERTURA-83
> URL: https://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, reportOnlyAndInstrumentOutputDirPatch.patch,
> report-only.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, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.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