Explain how to use pmd validation in ant script?
Answer / Mrityunjay Kumar
To use PMD (a Java code static analysis tool) with Ant, first ensure you have the PMD taskdef in your build.xml (or include it if using a third-party library). Then, define a target to run PMD checks on source files. Here's an example:
```xml
<project name="My Project" default="check">
<target name="check">
<pmd ruleSet="ruleset.xml" srcdir="src" targetDir="bin"/>
</target>
</project>
```
In this example, the `check` target runs PMD checks on all .java files within the `src` directory and saves any results in the `bin` directory.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain how to use runtime in ant?
Can I put the contents of a classpath or fileset into a property?
Explain ant functionality?
How many types of build tool you know?
How to use ant-contrib tasks?
What is different between ant and make?
List some basic functions performed by ant.
What is dependency? How it is used into ant?
Explain how to compile using ant script?
What is a build tool?
How we can set the path environment variable of ant?
What is minimum version of java is required to run apache ant 1.9.x?