MPPMD-12. Only run PMD if sources present
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115899 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cb6268b822
commit
5bd3a91a0f
@ -112,6 +112,8 @@
|
||||
<echo file="${maven.build.dir}/pmd-raw-report.xml"
|
||||
message="<?xml version='1.0'?><pmd/>"/>
|
||||
|
||||
<j:choose>
|
||||
<j:when test="${sourcesPresent == 'true'}">
|
||||
<pmd rulesetfiles="${maven.pmd.rulesetfiles}">
|
||||
<formatter type="xml" toFile="${maven.build.dir}/pmd-raw-report.xml"/>
|
||||
<fileset dir="${pom.build.sourceDirectory}"
|
||||
@ -133,6 +135,11 @@
|
||||
</j:forEach>
|
||||
</fileset>
|
||||
</pmd>
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<ant:echo>No java source files to process.</ant:echo>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
|
||||
<!-- Run JSL to transform the report into XDOC -->
|
||||
|
||||
@ -149,7 +156,7 @@
|
||||
<!-- Generate CPD report if it is enabled -->
|
||||
<j:set var="enable" value="${maven.pmd.cpd.enable}"/>
|
||||
|
||||
<j:if test="${enable == 'true'}">
|
||||
<j:if test="${enable == 'true' and sourcesPresent == 'true'}">
|
||||
<attainGoal name="pmd:cpd-report"/>
|
||||
</j:if>
|
||||
</goal>
|
||||
|
||||
@ -25,6 +25,9 @@
|
||||
<author email="vmassol@apache.org">Vincent Massol</author>
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.6-SNAPSHOT" date="in CVS">
|
||||
<action dev="dion" issue="MPPMD-12" type="fix">Check sources are present before calling PMD.</action>
|
||||
</release>
|
||||
<release version="1.5" date="2004-06-28">
|
||||
<action dev="brett" due-to="Joakim Erdfelt" issue="MPPMD-2" type="update">Upgrade to PMD 1.3, clean up and improve documentation.</action>
|
||||
</release>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user