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 git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114443 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
16073c0577
commit
63bd98ded5
4 files changed
+35
-3
No files matched your search
+17
-3
@@ -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}"/>
|
||||
|
||||
@@ -10,6 +10,9 @@ maven.build.clover.classes = ${maven.build.clover}/classes
|
||||
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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -27,6 +27,16 @@
|
||||
<code>PcCoveredAsc</code>
|
||||
</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>
|
||||
|
||||
Reference in new issue
Block a user