Adding pmd task to build.xml using Ant

kadir1552

New Member
I am new to Ant.I have created one ant task for generating pmd on the basis of ruleset.xml.Below code is not working, when i do ant pmd..i want to know whether any problem with this code..
  • whether toFile should be entire path(D:\Jenkins) or one the basis of root directory itself?
  • Can i run pmd task without depending any other task? Will it be a problem?
  • Problem showing with ruleset tag like it should be followed by > or /> or attribute element? :\[code\]<path id="pmd.classpath"><fileset dir="/lib/runtime"> <include name="**/*.jar"/> </fileset> </path><target name="pmd" depends="init"><taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="http://stackoverflow.com/questions/11430788/pmd.classpath"/><pmd shortFilenames="true"><ruleset="/build/ruleset.xml"/><formatter type="xml" toFile="/build/pmd.xml"/><fileset dir="/src"><include name="**/*.java"/></fileset></pmd></target>\[/code\]
Please somebody help me regarding this?..I just started only..Thanks in Advance
 
Back
Top