Adding pmd task to build.xml using Ant
===

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? :

            
        <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="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>
  
Please somebody help me regarding this?..I just started only..

Thanks in Advance


    








