ANT Interview Questions and Answers
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:
- What is ANT?
- Explain ANT functionality.
- Explain using ANT and give an small example.
- How to set Classpath in Ant script?
- How to set property file in Ant script?