Added ability to check test sources

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@227485 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
carlos 2005-08-04 21:01:00 +00:00
parent 8057ff904b
commit e4391ec68c
4 changed files with 26 additions and 1 deletions

View File

@ -23,7 +23,7 @@
PMD Plugin. Generate PMD reports using the PMD framework.
=============================================================================
-->
<project xmlns:j="jelly:core" xmlns:doc="doc" xmlns:ant="jelly:ant">
<project xmlns:j="jelly:core" xmlns:doc="doc" xmlns:ant="jelly:ant" xmlns:util="jelly:util">
<!--
========================================================================
@ -134,6 +134,20 @@
</j:if>
</j:forEach>
</fileset>
<!-- run on tests -->
<j:if test="${(unitTestSourcesPresent == 'true') and (context.getVariable('maven.pmd.check.tests'))}">
<pathconvert property="testSrcSetString" pathSep="||||"
refid="maven.test.compile.src.set"/>
<util:tokenize var="testDirs" delim="||||">${testSrcSetString}</util:tokenize>
<j:forEach var="testDir" items="${testDirs}">
<fileset dir="${testDir}"
includes="${maven.pmd.includes}"
excludes="${maven.pmd.excludes}"/>
</j:forEach>
</j:if>
</pmd>
</j:when>
<j:otherwise>

View File

@ -39,3 +39,6 @@ maven.pmd.cpd.enable = false
# minimum length of token sequences considered equal
maven.pmd.cpd.minimumtokencount = 100
# whether or not to run PMD on test files
maven.pmd.check.tests = true

View File

@ -26,6 +26,7 @@
</properties>
<body>
<release version="1.7-SNAPSHOT" date="in SVN">
<action dev="carlos" issue="MPPMD-14" type="add">Added ability to check test sources.</action>
<action dev="carlos" issue="MPPMD-15" type="update">Upgrade to pmd-3.2.</action>
</release>
<release version="1.6" date="2004-07-30">

View File

@ -87,6 +87,13 @@
tokens identical. Defaults to "100".
</td>
</tr>
<tr>
<td>maven.pmd.check.tests</td>
<td>Yes</td>
<td>
Whether or not to run PMD on test sources. Defaults to true.
</td>
</tr>
</table>
</section>
</body>