You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by vm...@apache.org on 2003/12/04 22:46:36 UTC
cvs commit: maven-plugins/clover/xdocs properties.xml changes.xml
vmassol 2003/12/04 13:46:36
Modified: clover plugin.jelly plugin.properties
clover/xdocs properties.xml changes.xml
Log:
Conditionally instrument test classes too. To instrument test classes set the <code>maven.clover.instrument.tests</code> to <code>true</code>.
Note: This feature is still limited. it will only work if there is one path in maven.compile.src.set and maven.test.compile.src.set Ant paths
Revision Changes Path
1.16 +17 -3 maven-plugins/clover/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/clover/plugin.jelly,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- plugin.jelly 29 Nov 2003 17:15:32 -0000 1.15
+++ plugin.jelly 4 Dec 2003 21:46:36 -0000 1.16
@@ -83,10 +83,24 @@
<j:set var="maven.junit.fork" scope="parent" value="true"/>
<echo>Setting Clover compiler</echo>
+ <ant:property name="compileSrcSetString" refid="maven.compile.src.set"/>
+ <ant:property name="compileTestSetString" refid="maven.test.compile.src.set"/>
+
<ant:clover-setup
- initstring="${cloverDatabase}"
- flushpolicy="interval"
- flushinterval="500"/>
+ initstring="${cloverDatabase}"
+ flushpolicy="interval"
+ flushinterval="500">
+
+ <!-- TODO: Support several paths in compileSrcSetString and compileTestSetString -->
+ <ant:fileset dir="${compileSrcSetString}">
+ <ant:include name="**/*.java"/>
+ </ant:fileset>
+ <j:if test="${context.getVariable('maven.clover.instrument.tests') == 'true'}">
+ <ant:fileset dir="${compileTestSetString}">
+ <ant:include name="**/*.java"/>
+ </ant:fileset>
+ </j:if>
+ </ant:clover-setup>
<echo>Now using primary build.compiler : ${build.compiler}</echo>
<j:set var="tmp" value="${maven.build.clover.classes}"/>
1.5 +3 -0 maven-plugins/clover/plugin.properties
Index: plugin.properties
===================================================================
RCS file: /home/cvs/maven-plugins/clover/plugin.properties,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- plugin.properties 5 Nov 2003 19:01:47 -0000 1.4
+++ plugin.properties 4 Dec 2003 21:46:36 -0000 1.5
@@ -10,6 +10,9 @@
maven.clover.database.dir = ${maven.build.clover}/database
maven.clover.orderBy=PcCoveredAsc
+# Whether tests should be instrumented by Clover or not
+maven.clover.instrument.tests = false
+
# What are the reports that should be generated
maven.clover.report.html=true
maven.clover.report.xml=false
1.6 +10 -0 maven-plugins/clover/xdocs/properties.xml
Index: properties.xml
===================================================================
RCS file: /home/cvs/maven-plugins/clover/xdocs/properties.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- properties.xml 28 Nov 2003 08:12:14 -0000 1.5
+++ properties.xml 4 Dec 2003 21:46:36 -0000 1.6
@@ -28,6 +28,16 @@
</td>
</tr>
<tr>
+ <td>maven.clover.instrument.tests</td>
+ <td>Yes</td>
+ <td>
+ Decides whether to instrument test classes.
+ </td>
+ <td>
+ <code>false</code>
+ </td>
+ </tr>
+ <tr>
<td>maven.clover.report.html</td>
<td>Yes</td>
<td>
1.17 +5 -0 maven-plugins/clover/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven-plugins/clover/xdocs/changes.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- changes.xml 29 Nov 2003 17:15:33 -0000 1.16
+++ changes.xml 4 Dec 2003 21:46:36 -0000 1.17
@@ -9,6 +9,11 @@
<body>
<release version="1.4" date="in CVS">
+ <action dev="vmassol" type="add">
+ Conditionally instrument test classes too. To instrument test classes
+ set the <code>maven.clover.instrument.tests</code> to
+ <code>true</code>.
+ </action>
<action dev="vmassol" type="update">
Make sure that the clover plugin restore other plugin's
properties it has modified.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org