PR: MPDASHBOARD-34

Submitted by: Philippe Kernevez
Reviewed by: aheritier
Cobertura aggregator don't support offline mode. The workaround for the jelly bug makes this aggregator only compatible with maven 1.1+.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@351521 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
aheritier committed 2005-12-01 23:33:35 +00:00
1 parent a3c8cd1f80
commit 241b65b1d4
4 files changed
+17 -7

No files matched your search

@@ -27,9 +27,14 @@
<u:file var="artifactAsFile"
name="${maven.dashboard.aggregator.coberturalipc.artifact}"/>
<j:choose>
<j:when test="${artifactAsFile.exists()}">
<x:parse var="doc" xml="${artifactAsFile}"/>
<u:loadText encoding="UTF-8" file="${maven.dashboard.aggregator.coberturalipc.artifact}" var="artifactAsText" />
<u:replace new="" old="&lt;!DOCTYPE coverage SYSTEM &#0034;http://cobertura.sourceforge.net/xml/coverage-02.dtd&#0034;>"
var="fileWithoutDTD" value="${artifactAsText}"/>
<x:parse var="doc" text="${fileWithoutDTD}"/>
<x:expr select="floor(100*count($doc/coverage/packages/package/classes/class/lines/line[@hits>0]) div count($doc/coverage/packages/package/classes/class/lines/line[@number>0])+0.5)"/>
%
</j:when>
@@ -37,4 +42,4 @@
<j:expr value="-"/>
</j:otherwise>
</j:choose>
</j:jelly>
</j:jelly>
@@ -24,16 +24,20 @@
========================================================================
-->
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:u="jelly:util">
<u:file var="artifactAsFile"
name="${maven.dashboard.aggregator.coberturaloc.artifact}"/>
<j:choose>
<j:when test="${artifactAsFile.exists()}">
<x:parse var="doc" xml="${artifactAsFile}"/>
<u:loadText encoding="UTF-8" file="${maven.dashboard.aggregator.coberturaloc.artifact}" var="artifactAsText" />
<u:replace new="" old="&lt;!DOCTYPE coverage SYSTEM &#0034;http://cobertura.sourceforge.net/xml/coverage-02.dtd&#0034;>"
var="fileWithoutDTD" value="${artifactAsText}"/>
<x:parse var="doc" text="${fileWithoutDTD}"/>
<x:expr select="count($doc/coverage/packages/package/classes/class/lines/line[@number>0])"/>
</j:when>
<j:otherwise>
<j:expr value="-"/>
</j:otherwise>
</j:choose>
</j:jelly>
</j:jelly>