2 Replies Latest reply on Jan 27, 2010 1:41 PM by helana_rodrigues

    XSLT pmd.xml -> html

    t3hh00d

      I needed to have this, but couldn't find anything that allowed me to do it quickly. I'm not using Maven.


      After scouring the web for a general solution for PMD I came across an xslt file, which I modified to better represent FlexPMD (there are subtle differences). Ignore the fact that I'm executing the command-line jar from this build script. All that matters is that the pmd.xml file get generated.


        <target name="analyzeCode">
          <exec executable="java">
            <arg line="-Xmx256m" />
            <arg line="-jar /dev/tools/flexpmd/flex-pmd-command-line-1.0.Rc4.jar" />
            <arg line="-s src/" />
            <arg line="-o reports/pmd/" />
          </exec>


          <xslt in="reports/pmd/pmd.xml" style="/dev/tools/flexpmd/flex-pmd-report.xslt" out="reports/pmd/pmd.html" />
        </target>


      This is just an example. Obviously the locations of the xslt and jar files will need to be different.


      Thanks for this tool. These things are very welcome and incredibly appreciated. Take care.


      -M