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"/>
</path>
<pathconvert property="rules" refid="rules" dirSep="/" pathSep=",">
<map from="${basedir}" to="rulesets"/>
</pathconvert>
<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"/>
</pmd>
<style basedir="${logs.dir}" includes="pmd_report.xml"
destdir="${logs.dir}" style="pmd.xsl"/>
</target>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to