ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Mancarella" <>
Subject Re: PMD
Date Tue, 04 Feb 2003 16:54:35 GMT
Ciramella, Edward wrote:
> I still get the same error:
> file:C:/IMPORT-TESTING/build.xml:46: The <pmd> task doesn't support the
> "reportfile" attribute.

Here's my PMD target, which works perfectly with PMD 1.02. I've derived 
it from an example from Dominique Devienne.
It seems that PMD docs still refer to a previous version, where nested 
<formatter> elements weren't supported.

<target name="pmd">
   <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
   <mkdir dir="${logs.dir}"/>
   <path id="rules">
     <pathelement location="strings.xml"/>
     <pathelement location="junit.xml"/>
     <pathelement location="braces.xml"/>
     <pathelement location="basic.xml"/>
     <pathelement location="unusedcode.xml"/>
     <!--pathelement location="design.xml"/-->
     <pathelement location="imports.xml"/>
   <pathconvert property="rules" refid="rules" dirSep="/" pathSep=",">
     <map from="${basedir}" to="rulesets"/>
   <pmd rulesetfiles="${rules}" printToConsole="true">
     <formatter type="xml" toFile="${logs.dir}/pmd_report.xml"/>
     <formatter type="text" toFile="${logs.dir}/pmd.log"/>
     <fileset dir="${src.dir}" includes="**/*.java"/>
   <style basedir="${logs.dir}" includes="pmd_report.xml"
     destdir="${logs.dir}" style="pmd.xsl"/>

View raw message