Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

ANT%20Interview%20Questions%20and%20Answers

Question: Explain how to use PMD validation in Ant script?
Answer: <target name="validate" depends="-init">
<mkdir dir="${build.dir}/pmd-reports" />
<pmd shortFilenames="true" rulesetfiles="${basedir}/.ruleset">
<formatter type="xml" tofile="${build.dir}/pmd-reports/report.xml" />
<fileset dir="${src.dir}/main/java/com/" includes="**/*.java" />
<fileset dir="${src.dir}/test/java" includes="**/*.java" />
</pmd>
<xslt style="${ant.home}/etc/xslt/pmd-report-per-class.xslt"
in="${build.dir}/pmd-reports/report.xml"
out="${build.dir}/pmd-reports/report.html" />
</target>
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook