Now using <code>maven:get</code> and <code>maven:set</code>.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115835 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
6943f3b2a0
commit
d0223f1eb1
2 files changed
+25
-20
No files matched your search
+22
-20
@@ -34,17 +34,6 @@
|
||||
-->
|
||||
<goal name="clover:init">
|
||||
|
||||
<!-- FIXME: remove and use maven:get tags -->
|
||||
<!-- By calling a goal from the java plugin we ensure that all its
|
||||
properties are loaded and are thus accessible from this plugin -->
|
||||
<java:dependency-handle/>
|
||||
<j:set var="javaPlugin" value="${pom.getPluginContext('maven-java-plugin')}"/>
|
||||
|
||||
<!-- By calling a goal from the test plugin we ensure that all its
|
||||
properties are loaded and are thus accessible from this plugin -->
|
||||
<test:dependency-handle/>
|
||||
<j:set var="testPlugin" value="${pom.getPluginContext('maven-test-plugin')}"/>
|
||||
|
||||
<!-- Create an Ant <path> id that contains the Clover jar. If the user has
|
||||
defined the maven.clover.jar property then this path will contain his
|
||||
version of the clover jar. Otherwise use the version defined as a
|
||||
@@ -104,20 +93,25 @@
|
||||
========================================================================
|
||||
-->
|
||||
<goal name="clover:on" prereqs="clover:init">
|
||||
|
||||
|
||||
<!-- Save properties so that they can be reset afterwards -->
|
||||
<maven:get var="ignoreTestFailureOld" plugin="maven-test-plugin"
|
||||
property="maven.test.failure.ignore"/>
|
||||
<maven:get var="junitForkOld" plugin="maven-test-plugin"
|
||||
property="maven.junit.fork"/>
|
||||
|
||||
<!-- Make sure that the report is generated whether the tests pass or
|
||||
not -->
|
||||
<j:set var="ignoreTestFailureOld" value="${maven.test.failure.ignore}"/>
|
||||
<j:set var="junitForkOld" value="${maven.junit.fork}"/>
|
||||
|
||||
<j:set var="maven.test.failure.ignore" scope="parent" value="true"/>
|
||||
<maven:set plugin="maven-test-plugin" property="maven.test.failure.ignore"
|
||||
value="true"/>
|
||||
|
||||
<!-- We tell the test plugin to run tests in a forked JVM. Due to a
|
||||
limitation in Clover, test coverage data are flushed upon JVM
|
||||
shutdown. Running test in a forked JVM allows to write properly the
|
||||
results before the goal finishes and thus it is possible to generate
|
||||
Clover reports in the same Maven session. -->
|
||||
<j:set var="maven.junit.fork" scope="parent" value="true"/>
|
||||
<maven:set plugin="maven-test-plugin" property="maven.junit.fork"
|
||||
value="true"/>
|
||||
|
||||
<echo>Setting Clover compiler</echo>
|
||||
|
||||
@@ -151,12 +145,16 @@
|
||||
<ant:include name="**/*.java"/>
|
||||
</ant:fileset>
|
||||
</j:forEach>
|
||||
|
||||
</j:if>
|
||||
|
||||
</ant:clover-setup>
|
||||
|
||||
<echo>Now using primary build.compiler : ${build.compiler}</echo>
|
||||
|
||||
<!-- Ensure that Clovered classes are generated in a directory different than the one
|
||||
used by the Java and Test plugins for runtime classes. This is to prevent shipping
|
||||
Clovered classes by mistake. -->
|
||||
<j:set var="mavenBuildDestOld" value="${context.parent.getVariable('maven.build.dest')}"/>
|
||||
<j:set var="maven.build.dest" value="${maven.clover.build.classes}" scope="parent" />
|
||||
|
||||
@@ -172,9 +170,13 @@
|
||||
|
||||
<j:set var="maven.build.dest" value="${mavenBuildDestTestOld}" scope="parent" />
|
||||
${context.removeVariable('build.compiler')}
|
||||
|
||||
<j:set var="maven.test.failure.ignore" scope="parent" value="${ignoreTestFailureOld}"/>
|
||||
<j:set var="maven.junit.fork" scope="parent" value="${junitForkOld}"/>
|
||||
|
||||
<j:if test="${ignoreTestFailureOld != null}">
|
||||
<maven:set plugin="maven-test-plugin" property="maven.test.failure.ignore"
|
||||
value="${ignoreTestFailureOld}"/>
|
||||
</j:if>
|
||||
<maven:set plugin="maven-test-plugin" property="maven.junit.fork"
|
||||
value="${junitForkOld}"/>
|
||||
|
||||
</goal>
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.6-SNAPSHOT" date="in CVS">
|
||||
<action dev="vmassol" type="fix" issue="MPCLOVER-19">
|
||||
Now using <code>maven:get</code> and <code>maven:set</code>.
|
||||
</action>
|
||||
<action dev="vmassol" type="update">
|
||||
The <code>clover:report</code> goal does not call the tests anymore.
|
||||
It only generates Clover reports.
|
||||
|
||||
Reference in new issue
Block a user