[ http://jira.codehaus.org/browse/MPCLOVER-31?page=comments#action_31562 ]
Olivier Jacob commented on MPCLOVER-31:
---------------------------------------
Here is a proposition for this feature :
<goal name="clover:report" prereqs="clover:init" description="Generates the
Clover reports">
<!-- Skip reports if no coverage database has been created. -->
<u:file var="cloverDatabaseAsFile" name="${maven.clover.database}"/>
<j:choose>
<j:when test="${cloverDatabaseAsFile.exists()}">
[...]
<j:if test="${context.getVariable('maven.clover.report.pdf') == 'true'}">
<attainGoal name="clover:pdf-report-internal"/>
</j:if>
</j:when>
[...]
</j:choose>
</goal>
<!--
========================================================================
Generate PDF test coverage
========================================================================
-->
<goal name="clover:pdf-report-internal">
<j:set var="cloverReportDirectory" value="${maven.docs.dest}/clover"/>
<j:set var="cloverPDFReportFile"
value="${cloverReportDirectory}/clover-report.pdf"/>
<ant:mkdir dir="${cloverReportDirectory}"/>
<ant:clover-report>
<ant:current outfile="${cloverPDFReportFile}" title="${pom.name} -
${pom.currentVersion}" summary="true">
<ant:format type="pdf" orderBy="${maven.clover.orderBy}">
<!-- Add context filtering -->
<j:set var="contextFilters" value="${maven.clover.context.method.names}
${maven.clover.context.statement.names} ${maven.clover.context.block.names}"/>
<j:if test="${!empty(contextFilters.trim())}">
<ant:setProperty name="filter" value="${contextFilters}"/>
</j:if>
</ant:format>
</ant:current>
<!-- Only generate history report if there is at least one history point -->
<j:if test="${historyDirAsFile.exists() and
!empty(historyDirAsFile.listFiles())}">
<j:set var="cloverHistoryReportDirectory"
value="${maven.docs.dest}/clover/history"/>
<j:set var="cloverPDFHistoricalReportFile"
value="${cloverReportDirectory}/clover-history-report.pdf"/>
<ant:mkdir dir="${cloverHistoryReportDirectory}"/>
<ant:historical outfile="${cloverPDFHistoryReportFile}"
historyDir="${maven.clover.history.dir}" title="${pom.name} -
${pom.currentVersion} - History">
<ant:format type="pdf"/>
</ant:historical>
</j:if>
</ant:clover-report>
</goal>
<goal name="clover:pdf-report" description="Generate PDF test coverage reports
with Clover" prereqs="clover:test,clover:pdf-report-internal"/>
New property : maven.clover.report.pdf (true|false)
Does it fit the need ?
--
Olivier
> Add PDF report support
> ----------------------
>
> Key: MPCLOVER-31
> URL: http://jira.codehaus.org/browse/MPCLOVER-31
> Project: maven-clover-plugin
> Type: New Feature
> Versions: 1.7
> Reporter: Vincent Massol
>
>
--
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
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]