Author: akazakov
Date: 2007-10-02 10:59:52 -0400 (Tue, 02 Oct 2007)
New Revision: 3964
Added:
trunk/documentation/qa/pmd/
trunk/documentation/qa/pmd/build.properties
trunk/documentation/qa/pmd/build.xml
Log:
Ant build for generating PMD reports
Added: trunk/documentation/qa/pmd/build.properties
===================================================================
--- trunk/documentation/qa/pmd/build.properties (rev 0)
+++ trunk/documentation/qa/pmd/build.properties 2007-10-02 14:59:52 UTC (rev 3964)
@@ -0,0 +1,5 @@
+#Tue Oct 02 16:34:22 MSD 2007
+check.plugins.home=E\:/eclipse-3.3/workspace/designtime/rhds
+pmd.home=E\:/pmd-4.0
+build.dir=build
+rulesets.filenames=rulesets/basic.xml,rulesets/braces.xml,rulesets/clone.xml,rulesets/codesize.xml,rulesets/controversial.xml,rulesets/coupling.xml,rulesets/design.xml,rulesets/finalizers.xml,rulesets/imports.xml,rulesets/j2ee.xml,rulesets/javabeans.xml,rulesets/junit.xml,rulesets/logging-jakarta-commons.xml,rulesets/logging-java.xml,rulesets/migrating.xml,rulesets/naming.xml,rulesets/optimizations.xml,rulesets/strictexception.xml,rulesets/strings.xml,rulesets/sunsecure.xml,rulesets/unusedcode.xml
\ No newline at end of file
Added: trunk/documentation/qa/pmd/build.xml
===================================================================
--- trunk/documentation/qa/pmd/build.xml (rev 0)
+++ trunk/documentation/qa/pmd/build.xml 2007-10-02 14:59:52 UTC (rev 3964)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="PMD checking" default="create-report"
basedir=".">
+
+ <property file ="${basedir}/build.properties"/>
+
+ <path id="pmd.classpath">
+ <pathelement location="${build}"/>
+ <fileset dir="${pmd.home}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"
classpathref="pmd.classpath"/>
+
+ <target name="create-report">
+ <mkdir dir="${basedir}/${build.dir}"/>
+ <pmd rulesetfiles="${rulesets.filenames}">
+ <formatter type="html"
toFile="${basedir}/${build.dir}/pmd_report.html"
toConsole="true"/>
+ <formatter type="xml"
toFile="${basedir}/${build.dir}/pmd_report.xml" toConsole="true"/>
+ <formatter type="summaryhtml"
toFile="${basedir}/${build.dir}/pmd_summary_report.html"
toConsole="true"/>
+ <formatter type="text"
toFile="${basedir}/${build.dir}/pmd_report.txt" toConsole="true"/>
+ <fileset dir="${check.plugins.home}">
+ <include name="org.jboss.*/**/*.java"/>
+ <include name="org.hibernate.*/**/*.java"/>
+ </fileset>
+ </pmd>
+ </target>
+</project>
\ No newline at end of file