|
From: Carlos S. <car...@us...> - 2005-06-15 17:23:35
|
carlossg 05/06/15 10:23:24
Modified: cobertura plugin.jelly
Log:
Added cobertura:off
Revision Changes Path
1.3 +21 -8 maven-plugins/cobertura/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /cvsroot/maven-plugins/maven-plugins/cobertura/plugin.jelly,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- plugin.jelly 15 Jun 2005 16:49:41 -0000 1.2
+++ plugin.jelly 15 Jun 2005 17:23:24 -0000 1.3
@@ -118,6 +118,20 @@
</goal>
<!-- ================================================================== -->
+ <!-- I N S T R U M E N T A T I O N O F F -->
+ <!-- ================================================================== -->
+ <goal name="cobertura:off" description="Restore previous properties">
+
+ <maven:set plugin="maven-java-plugin" property="maven.junit.fork" value="${oldfork}"/>
+ <maven:set plugin="maven-java-plugin" property="maven.build.dest" value="${oldBuildDest}"/>
+ <maven:set plugin="maven-test-plugin" property="maven.build.dest" value="${oldBuildDest}"/>
+ <j:expr value="${pom.getPluginContext('maven-test-plugin').setVariable(
+ 'maven.test.failure.ignore', ignoreTestFailureOld)}"/>
+
+ </goal>
+
+
+ <!-- ================================================================== -->
<!-- D E F A U L T G O A L -->
<!-- ================================================================== -->
<goal name="cobertura"
@@ -125,18 +139,21 @@
prereqs="cobertura:html-report"
/>
+
<!-- ================================================================== -->
<!-- R E P O R T G O A L -->
<!-- ================================================================== -->
<goal name="cobertura:html-report"
- description="Generate HTML test coverage reports with Cobertura"
- prereqs="cobertura:on,test:test">
+ description="Generate HTML test coverage reports with Cobertura">
<j:choose>
<j:when test="${unitTestSourcesPresent == 'true'}">
<j:catch var="ex">
+
+ <attainGoal name="cobertura:on"/>
+ <attainGoal name="test:test"/>
<j:set var="sourceDir" value="${context.getAntProject().getReferences().get('maven.compile.src.set')}" />
<u:tokenize var="sourceDirList" delim="${path.separator}">${sourceDir}</u:tokenize>
@@ -156,11 +173,7 @@
</ant:classpath>
</ant:cobertura-report>
- <maven:set plugin="maven-java-plugin" property="maven.junit.fork" value="${oldfork}"/>
- <maven:set plugin="maven-java-plugin" property="maven.build.dest" value="${oldBuildDest}"/>
- <maven:set plugin="maven-test-plugin" property="maven.build.dest" value="${oldBuildDest}"/>
- <j:expr value="${pom.getPluginContext('maven-test-plugin').setVariable(
- 'maven.test.failure.ignore', ignoreTestFailureOld)}"/>
+ <attainGoal name="cobertura:off"/>
</j:catch>
@@ -178,5 +191,5 @@
</j:choose>
</goal>
-
+
</project>
|
|
From: Carlos S. <car...@us...> - 2005-07-12 23:25:06
|
carlossg 05/07/12 16:24:55
Modified: cobertura plugin.jelly
Log:
Fixed output dir
Revision Changes Path
1.8 +3 -2 maven-plugins/cobertura/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /cvsroot/maven-plugins/maven-plugins/cobertura/plugin.jelly,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- plugin.jelly 12 Jul 2005 22:09:47 -0000 1.7
+++ plugin.jelly 12 Jul 2005 23:24:54 -0000 1.8
@@ -205,7 +205,8 @@
<j:forEach var="checkFileLine" items="${checkFileLines}">
<j:if test="${checkFileLine.indexOf('required')>0}">
<j:set var="checkFailed" value="true"/>
- <j:set var="checkFailedLines" value="${checkFailedLines} ${checkFileLine}"/>
+ <!-- add the line but stripping '[cobertura-check] ' text -->
+ <j:set var="checkFailedLines" value="${checkFailedLines} ${checkFileLine.substring(18)}"/>
</j:if>
</j:forEach>
@@ -223,7 +224,7 @@
title="Cobertura Check Report"
section="Cobertura Report"
inputText="${checkFailedLines}"
- output="${maven.gen.docs}/cobertura-check.xml"/>
+ output="${maven.gen.docs}/cobertura/cobertura-check.xml"/>
</goal>
|
|
From: Carlos S. <car...@us...> - 2005-07-12 23:28:18
|
carlossg 05/07/12 16:28:11
Modified: cobertura plugin.jelly
Log:
Make the generated xdoc/cobertura dir
Revision Changes Path
1.9 +8 -5 maven-plugins/cobertura/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /cvsroot/maven-plugins/maven-plugins/cobertura/plugin.jelly,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- plugin.jelly 12 Jul 2005 23:24:54 -0000 1.8
+++ plugin.jelly 12 Jul 2005 23:28:10 -0000 1.9
@@ -220,11 +220,14 @@
-->
<goal name="cobertura:check-report" prereqs="cobertura:check-report-text"
description="Create a xdoc report with classes not meeting the test coverage requirements">
- <doc:text-xdoc
- title="Cobertura Check Report"
- section="Cobertura Report"
- inputText="${checkFailedLines}"
- output="${maven.gen.docs}/cobertura/cobertura-check.xml"/>
+
+ <mkdir dir="${maven.gen.docs}/cobertura"/>
+ <doc:text-xdoc
+ title="Cobertura Check Report"
+ section="Cobertura Report"
+ inputText="${checkFailedLines}"
+ output="${maven.gen.docs}/cobertura/cobertura-check.xml"/>
+
</goal>
|
|
From: Carlos S. <car...@us...> - 2005-07-19 22:50:44
|
carlossg 05/07/19 15:50:38
Modified: cobertura plugin.jelly
Log:
Don't register the report if maven.cobertura.check.report is false
Revision Changes Path
1.12 +8 -5 maven-plugins/cobertura/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /cvsroot/maven-plugins/maven-plugins/cobertura/plugin.jelly,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- plugin.jelly 19 Jul 2005 04:14:52 -0000 1.11
+++ plugin.jelly 19 Jul 2005 22:50:38 -0000 1.12
@@ -55,11 +55,14 @@
target="_blank"
description="Cobertura test coverage report." />
- <doc:registerReport
- name="Cobertura check"
- pluginName="maven-cobertura-plugin"
- link="cobertura/cobertura-check"
- description="Cobertura test coverage check report." />
+ <j:if test="${maven.cobertura.check.report}">
+ <doc:registerReport
+ name="Cobertura check"
+ pluginName="maven-cobertura-plugin"
+ link="cobertura/cobertura-check"
+ description="Cobertura test coverage check report." />
+ </j:if>
+
</j:if>
</goal>
|
|
From: Carlos S. <car...@us...> - 2005-09-22 02:35:27
|
carlossg 05/09/21 19:35:22
Modified: cobertura plugin.jelly
Log:
Remove cobertura datafile after clean
Revision Changes Path
1.14 +5 -0 maven-plugins/cobertura/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /cvsroot/maven-plugins/maven-plugins/cobertura/plugin.jelly,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- plugin.jelly 22 Sep 2005 02:34:41 -0000 1.13
+++ plugin.jelly 22 Sep 2005 02:35:22 -0000 1.14
@@ -313,4 +313,9 @@
</goal>
+ <!-- Remove cobertura datafile after clean -->
+ <postGoal name="clean:clean">
+ <delete file="${maven.cobertura.datafile}"/>
+ </postGoal>
+
</project>
|
|
From: Carlos S. <car...@us...> - 2005-10-06 21:29:30
|
carlossg 05/10/06 14:29:24
Modified: cobertura/xdocs changes.xml properties.xml
cobertura plugin.jelly
Log:
Add maven.cobertura.ignoreregex property
Revision Changes Path
1.14 +1 -0 maven-plugins/cobertura/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /cvsroot/maven-plugins/maven-plugins/cobertura/xdocs/changes.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- changes.xml 6 Oct 2005 21:26:24 -0000 1.13
+++ changes.xml 6 Oct 2005 21:29:24 -0000 1.14
@@ -23,6 +23,7 @@
</properties>
<body>
<release version="1.2" date="in CVS">
+ <action dev="carlossg" type="add">Add maven.cobertura.ignoreregex property.</action>
<action dev="carlossg" type="add">Added maven.cobertura.check.totallinerate and maven.cobertura.check.totalbranchrate properties.</action>
<action dev="carlossg" type="fix">Fixed cobertura check goal always checking against 50%.</action>
</release>
1.8 +9 -0 maven-plugins/cobertura/xdocs/properties.xml
Index: properties.xml
===================================================================
RCS file: /cvsroot/maven-plugins/maven-plugins/cobertura/xdocs/properties.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- properties.xml 6 Oct 2005 21:26:24 -0000 1.7
+++ properties.xml 6 Oct 2005 21:29:24 -0000 1.8
@@ -64,6 +64,15 @@
</td>
</tr>
<tr>
+ <td>maven.cobertura.ignoreregex</td>
+ <td>Not defined</td>
+ <td>Yes</td>
+ <td>
+ Tell Cobertura to ignore certain classes using a regular expression.
+ eg. to ignore all calls to commons-logging you can use <code>org.apache.commons.logging.*</code>.
+ </td>
+ </tr>
+ <tr>
<td>maven.cobertura.junit.fork</td>
<td>yes</td>
<td>Yes</td>
1.16 +5 -0 maven-plugins/cobertura/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /cvsroot/maven-plugins/maven-plugins/cobertura/plugin.jelly,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- plugin.jelly 6 Oct 2005 21:26:24 -0000 1.15
+++ plugin.jelly 6 Oct 2005 21:29:24 -0000 1.16
@@ -105,6 +105,11 @@
<maven:addPath id="maven.dependency.classpath" refid="cobertura.classpath"/>
<ant:cobertura-instrument todir="${maven.cobertura.instrumentation}" datafile="${maven.cobertura.datafile}">
+
+ <j:if test="${not empty(context.getVariable('maven.cobertura.ignoreregex'))}">
+ <ant:ignore regex="${maven.cobertura.ignoreregex}"/>
+ </j:if>
+
<ant:fileset dir="${maven.build.dest}"
includes="${maven.cobertura.instrumentation.includes}"
excludes="${maven.cobertura.instrumentation.excludes}"/>
|
|
From: Jeff J. <jef...@us...> - 2007-06-24 04:00:12
|
jeffjensen 07/06/23 21:00:08
Modified: cobertura plugin.jelly
Log:
Update dep groups and correct typo in code.
Revision Changes Path
1.23 +7 -7 maven-plugins/cobertura/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /cvsroot/maven-plugins/maven-plugins/cobertura/plugin.jelly,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- plugin.jelly 24 Jun 2007 03:06:12 -0000 1.22
+++ plugin.jelly 24 Jun 2007 04:00:06 -0000 1.23
@@ -33,14 +33,14 @@
<ant:pathelement path="${plugin.getDependencyPath('urbanophile:java-getopt')}"/>
<ant:pathelement path="${plugin.getDependencyPath('javancss:javancss')}"/>
<ant:pathelement path="${plugin.getDependencyPath('javancss:ccl')}"/>
- <ant:pathelement path="${plugin.getDependencyPath('asm')}"/>
- <ant:pathelement path="${plugin.getDependencyPath('asm-tree')}"/>
- <ant:pathelement path="${plugin.getDependencyPath('oro')}"/>
- <ant:pathelement path="${plugin.getDependencyPath('log4j')}"/>
- <ant:pathelement path="${plugin.getDependencyPath('cobertura')}"/>
+ <ant:pathelement path="${plugin.getDependencyPath('asm:asm')}"/>
+ <ant:pathelement path="${plugin.getDependencyPath('asm:asm-tree')}"/>
+ <ant:pathelement path="${plugin.getDependencyPath('oro:oro')}"/>
+ <ant:pathelement path="${plugin.getDependencyPath('log4j:log4j')}"/>
+ <ant:pathelement path="${plugin.getDependencyPath('net.sourceforge.cobertura:cobertura')}"/>
</ant:path>
- <ant:taskdef classpath="${plugin.getDependencyPath('cobertura')}" resource="tasks.properties" />
+ <ant:taskdef classpath="${plugin.getDependencyPath('net.sourceforge.cobertura:cobertura')}" resource="tasks.properties" />
<maven:get plugin="maven-xdoc-plugin" property="maven.docs.dest" var="docsDest"/>
<j:set var="coberturaDocs" value="${docsDest}/cobertura"/>
@@ -294,7 +294,7 @@
<ant:cobertura-report srcdir="${sourceDir}" destdir="${coberturaDocs}"
datafile="${maven.cobertura.datafile}" format="${maven.cobertura.format}"
- maxmemory="$(maven.cobertura.report.maxmemory)">
+ maxmemory="${maven.cobertura.report.maxmemory}">
<ant:classpath>
<ant:path refid="cobertura.classpath"/>
<ant:path refid="maven.dependency.classpath"/>
|