Do not execute Clover if there are no tests to run Clover on. This prevents an error happening in the <code>clover:on</code> goal.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115093 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b11afec96f
commit
c48891dd9f
@ -184,9 +184,17 @@
|
||||
-->
|
||||
<goal name="clover:test">
|
||||
|
||||
<!-- Only run clover if there are tests to execute -->
|
||||
<j:choose>
|
||||
<j:when test="${unitTestSourcesPresent == 'true'}">
|
||||
<attainGoal name="clover:on"/>
|
||||
<attainGoal name="test:test"/>
|
||||
<attainGoal name="clover:off"/>
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<ant:echo>No tests to run Clover on</ant:echo>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
|
||||
</goal>
|
||||
|
||||
@ -196,7 +204,12 @@
|
||||
be generated.
|
||||
========================================================================
|
||||
-->
|
||||
<goal name="clover:report" prereqs="clover:test">
|
||||
<goal name="clover:report">
|
||||
|
||||
<j:choose>
|
||||
<j:when test="${unitTestSourcesPresent == 'true'}">
|
||||
|
||||
<attainGoal name="clover:test"/>
|
||||
|
||||
<!-- Skip reports if no coverage database has been created. -->
|
||||
<u:file var="cloverDatabaseAsFile" name="${cloverDatabase}"/>
|
||||
@ -219,6 +232,12 @@
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<ant:echo>No tests to run Clover on</ant:echo>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
|
||||
</goal>
|
||||
|
||||
<!--
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
@ -28,6 +29,10 @@
|
||||
<body>
|
||||
|
||||
<release version="1.5" date="in CVS">
|
||||
<action dev="vmassol" type="fix">
|
||||
Do not execute Clover if there are no tests to run Clover on. This
|
||||
prevents an error happening in the <code>clover:on</code> goal.
|
||||
</action>
|
||||
<action dev="vmassol" type="update">
|
||||
Allow generating XML and/or Swing reports during the web site generation
|
||||
too.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user