Author: ltheussl Date: Mon Nov 6 05:55:27 2006 New Revision: 471736 URL: http://svn.apache.org/viewvc?view=rev&rev=471736 Log: PR: MPPMD-27 Allow custom JSL stylesheet to be defined via a property.
Modified: maven/maven-1/plugins/trunk/pmd/plugin.jelly maven/maven-1/plugins/trunk/pmd/plugin.properties maven/maven-1/plugins/trunk/pmd/xdocs/changes.xml maven/maven-1/plugins/trunk/pmd/xdocs/properties.xml Modified: maven/maven-1/plugins/trunk/pmd/plugin.jelly URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/pmd/plugin.jelly?view=diff&rev=471736&r1=471735&r2=471736 ============================================================================== --- maven/maven-1/plugins/trunk/pmd/plugin.jelly (original) +++ maven/maven-1/plugins/trunk/pmd/plugin.jelly Mon Nov 6 05:55:27 2006 @@ -167,13 +167,16 @@ </j:choose> <!-- Run JSL to transform the report into XDOC --> - + <j:set var="stylesheet" value="${maven.pmd.stylesheet}"/> + <j:if test="${stylesheet == null or stylesheet.equals('')}"> + <j:set var="stylesheet" value="${plugin.resources}/pmd.jsl"/> + </j:if> <echo>Converting the PMD report to xdoc ...</echo> <doc:jsl input="${maven.build.dir}/pmd-raw-report.xml" output="pmd-report.xml" - stylesheet="${plugin.resources}/pmd.jsl" + stylesheet="${stylesheet}" outputMode="xml" prettyPrint="true" /> Modified: maven/maven-1/plugins/trunk/pmd/plugin.properties URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/pmd/plugin.properties?view=diff&rev=471736&r1=471735&r2=471736 ============================================================================== --- maven/maven-1/plugins/trunk/pmd/plugin.properties (original) +++ maven/maven-1/plugins/trunk/pmd/plugin.properties Mon Nov 6 05:55:27 2006 @@ -51,4 +51,7 @@ maven.pmd.failonruleviolation = false # JDK target -maven.pmd.targetjdk=${maven.compile.source} \ No newline at end of file +maven.pmd.targetjdk=${maven.compile.source} + +# JSL stylesheet +maven.pmd.stylesheet = ${plugin.resources}/pmd.jsl \ No newline at end of file Modified: maven/maven-1/plugins/trunk/pmd/xdocs/changes.xml URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/pmd/xdocs/changes.xml?view=diff&rev=471736&r1=471735&r2=471736 ============================================================================== --- maven/maven-1/plugins/trunk/pmd/xdocs/changes.xml (original) +++ maven/maven-1/plugins/trunk/pmd/xdocs/changes.xml Mon Nov 6 05:55:27 2006 @@ -25,6 +25,7 @@ </properties> <body> <release version="1.10-SNAPSHOT" date="In SVN"> + <action dev="ltheussl" type="add" issue="MPPMD-27">Allow custom JSL stylesheet to be defined via a property.</action> <action dev="aheritier" type="update">Update dependencies to unify them between plugins. The following dependencies are updated : jaxen v1.0-FCS-full to 1.1-beta-9. The following dependencies are removed : saxpath.</action> <action dev="aheritier" type="update">Upgrade to pmd-3.7.</action> </release> Modified: maven/maven-1/plugins/trunk/pmd/xdocs/properties.xml URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/pmd/xdocs/properties.xml?view=diff&rev=471736&r1=471735&r2=471736 ============================================================================== --- maven/maven-1/plugins/trunk/pmd/xdocs/properties.xml (original) +++ maven/maven-1/plugins/trunk/pmd/xdocs/properties.xml Mon Nov 6 05:55:27 2006 @@ -119,7 +119,15 @@ <td>maven.pmd.targetjdk</td> <td>Yes</td> <td> - Target JDK 1.3, 1.4, or 1.5.. Defaults to ${maven.compile.source}. + Target JDK 1.3, 1.4, or 1.5.. Defaults to ${maven.compile.source}. + </td> + </tr> + <tr> + <td>maven.pmd.stylesheet</td> + <td>Yes</td> + <td> + A custom stylesheet to use for the report. + Default is <code>${plugin.resources}/pmd.jsl</code>. </td> </tr> </table>