You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by lt...@apache.org on 2006/01/26 23:35:21 UTC
svn commit: r372636 - in /maven/maven-1/plugins/trunk/dashboard:
plugin.jelly project.xml src/plugin-resources/aggregators/coberturalipc.jelly
src/plugin-resources/aggregators/coberturaloc.jelly
Author: ltheussl
Date: Thu Jan 26 14:35:18 2006
New Revision: 372636
URL: http://svn.apache.org/viewcvs?rev=372636&view=rev
Log:
Use commons-lang StringUtils for string replacement to fix maven 1.0 compatibility issues.
Modified:
maven/maven-1/plugins/trunk/dashboard/plugin.jelly
maven/maven-1/plugins/trunk/dashboard/project.xml
maven/maven-1/plugins/trunk/dashboard/src/plugin-resources/aggregators/coberturalipc.jelly
maven/maven-1/plugins/trunk/dashboard/src/plugin-resources/aggregators/coberturaloc.jelly
Modified: maven/maven-1/plugins/trunk/dashboard/plugin.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/dashboard/plugin.jelly?rev=372636&r1=372635&r2=372636&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/dashboard/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/dashboard/plugin.jelly Thu Jan 26 14:35:18 2006
@@ -58,7 +58,7 @@
<m:get var="mIgnoreFailures" property="maven.multiproject.ignoreFailures" plugin="maven-multiproject-plugin"/>
<m:property var="dIgnoreFailures" name="maven.dashboard.ignoreFailures" defaultValue="${mIgnoreFailures}"/>
-
+
</goal>
<!--
@@ -125,6 +125,7 @@
<j:forEach var="reactorProject" items="${reactorProjects}">
<u:available
file="${reactorProject.context.getVariable('maven.build.dir')}/dashboard-single.xml">
+ <!-- FIXME: this should be maven.dashboard.report.single -->
<x:element name="project">
<x:attribute name="name">${reactorProject.name}</x:attribute>
@@ -187,6 +188,8 @@
-->
<goal name="dashboard:report-single">
+ <j:useBean var="stringUtils" class="org.apache.commons.lang.StringUtils"/>
+
<a:dirname property="singleReportDir" file="${maven.dashboard.report.single}"/>
<a:mkdir dir="${singleReportDir}"/>
@@ -240,6 +243,7 @@
this is report used by the Clover aggregators to extract information
from). The reason we disable the other reports is to win some response
time. -->
+ <!-- FIXME: pom.getVariable? -->
<j:set var="cloverReportXml"
value="${pom.getVariable('maven.clover.report.xml')}"/>
<j:set var="maven.clover.report.xml" value="true" scope="parent"/>
Modified: maven/maven-1/plugins/trunk/dashboard/project.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/dashboard/project.xml?rev=372636&r1=372635&r2=372636&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/dashboard/project.xml (original)
+++ maven/maven-1/plugins/trunk/dashboard/project.xml Thu Jan 26 14:35:18 2006
@@ -129,5 +129,15 @@
<organization>IT20one GmbH</organization>
</contributor>
</contributors>
- <dependencies/>
+ <dependencies>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.0</version>
+ <url>http://jakarta.apache.org/commons/lang/</url>
+ <properties>
+ <comment>This library is already loaded by maven's core. Be careful to use the same version number as in the core.</comment>
+ </properties>
+ </dependency>
+ </dependencies>
</project>
Modified: maven/maven-1/plugins/trunk/dashboard/src/plugin-resources/aggregators/coberturalipc.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/dashboard/src/plugin-resources/aggregators/coberturalipc.jelly?rev=372636&r1=372635&r2=372636&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/dashboard/src/plugin-resources/aggregators/coberturalipc.jelly (original)
+++ maven/maven-1/plugins/trunk/dashboard/src/plugin-resources/aggregators/coberturalipc.jelly Thu Jan 26 14:35:18 2006
@@ -30,13 +30,10 @@
<j:choose>
<j:when test="${artifactAsFile.exists()}">
- <u:loadText encoding="UTF-8" file="${maven.dashboard.aggregator.coberturalipc.artifact}" var="artifactAsText" />
- <u:replace new="" old="<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-02.dtd">"
- var="fileWithoutDTD" value="${artifactAsText}"/>
-
+ <u:loadText file="${maven.dashboard.aggregator.coberturalipc.artifact}" var="artifactAsText" />
+ <j:set var="fileWithoutDTD" value="${stringUtils.replace(artifactAsText, '<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-02.dtd">', '')}"/>
<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)"/>
- %
+ <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>
<j:otherwise>
<j:expr value="-"/>
Modified: maven/maven-1/plugins/trunk/dashboard/src/plugin-resources/aggregators/coberturaloc.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/dashboard/src/plugin-resources/aggregators/coberturaloc.jelly?rev=372636&r1=372635&r2=372636&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/dashboard/src/plugin-resources/aggregators/coberturaloc.jelly (original)
+++ maven/maven-1/plugins/trunk/dashboard/src/plugin-resources/aggregators/coberturaloc.jelly Thu Jan 26 14:35:18 2006
@@ -30,11 +30,10 @@
<j:choose>
<j:when test="${artifactAsFile.exists()}">
- <u:loadText encoding="UTF-8" file="${maven.dashboard.aggregator.coberturaloc.artifact}" var="artifactAsText" />
- <u:replace new="" old="<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-02.dtd">"
- var="fileWithoutDTD" value="${artifactAsText}"/>
+ <u:loadText file="${maven.dashboard.aggregator.coberturaloc.artifact}" var="artifactAsText" />
+ <j:set var="fileWithoutDTD" value="${stringUtils.replace(artifactAsText, '<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-02.dtd">', '')}"/>
<x:parse var="doc" text="${fileWithoutDTD}"/>
- <x:expr select="count($doc/coverage/packages/package/classes/class/lines/line[@number>0])"/>
+ <x:expr select="count($doc/coverage/packages/package/classes/class/lines/line[@number>0])"/>
</j:when>
<j:otherwise>
<j:expr value="-"/>