• Post Reply Bookmark Topic Watch Topic
  • New Topic

Creating PMD reports for custom PMD.XML  RSS feed

 
Rithanya Laxmi
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a pmd.xml which is customized as per the project, how I can generate the PMD report for that customized pmd.xml? as no where we will specify the pmd.xml in ant script


<path id="pmd2.classpath">
<pathelement location="${build}" />
<fileset dir="${pmd.home.dir}/">
<include name="*.jar" />
</fileset>
</path>
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask">
<classpath>
<pathelement location="xxx/pmd-4.2.5"/>
<pathelement location="xxx/pmd-4.2.5/jaxen-1.1.4"/>
</classpath>
</taskdef>
<target name="report.pmd">
<mkdir dir="${report.pmd.dir}" />
<pmd rulesetfiles="rulesets/favorites.xml">
<formatter type="xml" toFile="${report.pmd.dir}/pmd_report.xml" />
<fileset dir="${src.dir}">
<include name="**/*.java" />
</fileset>
</pmd>
<xslt in="${report.pmd.dir}/pmd_report.xml"
style="${pmd.home.dir}/etc/xslt/pmd-report-per-class.xslt"
out="${report.pmd.dir}/pmd_report.html"
/>
</target>

Please provide your input?

Thanks

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!