You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by nb...@apache.org on 2007/08/06 23:04:26 UTC

svn commit: r563281 - /velocity/tools/branches/2.x/test.xml

Author: nbubna
Date: Mon Aug  6 14:04:25 2007
New Revision: 563281

URL: http://svn.apache.org/viewvc?view=rev&rev=563281
Log:
really add the optional FindBugs task

Modified:
    velocity/tools/branches/2.x/test.xml

Modified: velocity/tools/branches/2.x/test.xml
URL: http://svn.apache.org/viewvc/velocity/tools/branches/2.x/test.xml?view=diff&rev=563281&r1=563280&r2=563281
==============================================================================
--- velocity/tools/branches/2.x/test.xml (original)
+++ velocity/tools/branches/2.x/test.xml Mon Aug  6 14:04:25 2007
@@ -70,6 +70,7 @@
       <fileset dir="${test.src.dir}">
         <include name="**/*.java"/>
         <include name="**/*.properties"/>
+        <include name="**/*.xml"/>
       </fileset>
     </copy>
     <copy tofile="${test.dir}/etc/jetty.xml" file="${test.dir}/etc/jetty.xml.tmpl" filtering="yes"/>
@@ -207,6 +208,32 @@
       <sysproperty key="STOP.PORT" value="${test.webcontainer.control.port}"/>
       <sysproperty key="STOP.KEY" value="verysecret"/>
     </java>
+  </target>
+
+
+  <!-- Analyze code with FindBugs -->
+  <target name="findbugs">
+    <echo>Working with FindBugs at: ${findbugs.home}</echo>
+    <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
+      <classpath>
+        <fileset dir="${findbugs.home}/lib">
+          <include name="findbugs-ant.jar"/>
+        </fileset>
+      </classpath>
+    </taskdef>
+    <echo>Analyzing ${dist.dir}/${project.id}.jar built from ${source.home}</echo>
+    <findbugs home="${findbugs.home}"
+              output="html"
+              outputFile="${test.build.dir}\findbugs-report.html"
+              failOnError="true">
+      <auxClasspath>
+        <fileset dir="${lib.dir}">
+          <include name="**/*.jar"/>
+        </fileset>
+      </auxClasspath>
+      <sourcePath path="${source.home}" />
+      <class location="${dist.dir}/${project.id}.jar" />
+    </findbugs>
   </target>
 
 </project>