Author: spepping
Date: Wed Aug 18 10:07:38 2010
New Revision: 986616
URL: http://svn.apache.org/viewvc?rev=986616&view=rev
Log:
Bugzilla #49752:
Findbugs build target enhancements
Submitted by: Glenn Adams <glenn.at.skynav.com>
Changes to patch:
- Added descriptions to the user visible targets
Added:
xmlgraphics/fop/trunk/findbugs-exclude.xml (with props)
Modified:
xmlgraphics/fop/trunk/build.xml
Modified: xmlgraphics/fop/trunk/build.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/build.xml?rev=986616&r1=986615&r2=986616&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/build.xml (original)
+++ xmlgraphics/fop/trunk/build.xml Wed Aug 18 10:07:38 2010
@@ -1190,22 +1190,62 @@ NOTE:
<!-- =================================================================== -->
<!-- Findbugs -->
<!-- =================================================================== -->
- <property name="findbugs.lib" value="${findbugs.home.dir}/lib"/>
- <path id="libs-findbugs">
- <fileset dir="${findbugs.lib}">
- <include name="*.jar"/>
- </fileset>
- </path>
- <target name="findbugs-avail" unless="findbugs.home.dir">
- <echo message="Findbugs Support NOT Present. Please download it from
http://findbugs.sf.net/ and set findbugs.home.dir in build-local.properties"/>
- </target>
- <target name="findbugs" depends="init, findbugs-avail, compile-java"
if="findbugs.home.dir">
- <taskdef name="findbugs"
classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
classpathref="libs-findbugs"/>
- <findbugs home="${findbugs.home.dir}" output="html" reportLevel="low"
effort="max" outputFile="${build.dir}/report_findbugs.html" jvmargs="-Xmx1024m">
+ <target name="findbugs-maybe-describe-install" unless="findbugs.present">
+ <echo message="Please download FINDBUGS from http://findbugs.sf.net/ and
set property findbugs.home.dir"/>
+ <echo message="in build-local.properties to the top-level directory of the
binary distribution."/>
+ </target>
+ <target name="findbugs-avail">
+ <condition property="findbugs.present">
+ <and>
+ <isset property="findbugs.home.dir"/>
+ <available file="${findbugs.home.dir}" type="dir"/>
+ </and>
+ </condition>
+ <condition property="findbugs.message" value="FINDBUGS Support PRESENT">
+ <equals arg1="${findbugs.present}" arg2="true"/>
+ </condition>
+ <condition property="findbugs.message" value="FINDBUGS Support NOT
Present">
+ <not>
+ <equals arg1="${findbugs.present}" arg2="true"/>
+ </not>
+ </condition>
+ <echo message="${findbugs.message}"/>
+ <antcall target="findbugs-maybe-describe-install"/>
+ </target>
+ <target name="findbugs-exec" depends="compile-java" if="findbugs.present">
+ <taskdef name="findbugs"
classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
+ <classpath>
+ <fileset dir="${findbugs.home.dir}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </classpath>
+ </taskdef>
+ <findbugs home="${findbugs.home.dir}" output="${findbugs.output.format}"
reportLevel="low" effort="max"
+
outputFile="${build.dir}/report_findbugs.${findbugs.output.extension}"
excludeFilter="findbugs-exclude.xml" jvmargs="-Xmx1024m">
<sourcePath path="${src.java.dir}"/>
<class location="${build.classes.dir}"/>
+ <auxClasspath>
+ <path refid="libs-build-classpath"/>
+ <path>
+ <fileset dir="${ant.library.dir}">
+ <include name="ant.jar"/>
+ <include name="ant-launcher.jar"/>
+ </fileset>
+ </path>
+ </auxClasspath>
</findbugs>
</target>
+ <target name="findbugs-xml" depends="findbugs-avail" if="findbugs.present"
description="Runs findbugs for a code quality report in XML">
+ <property name="findbugs.output.format" value="xml"/>
+ <property name="findbugs.output.extension" value="xml"/>
+ <antcall target="findbugs-exec"/>
+ </target>
+ <target name="findbugs-html" depends="findbugs-avail" if="findbugs.present"
description="Runs findbugs for a code quality report in HTML">
+ <property name="findbugs.output.format" value="html"/>
+ <property name="findbugs.output.extension" value="html"/>
+ <antcall target="findbugs-exec"/>
+ </target>
+ <target name="findbugs" depends="findbugs-html" description="Runs findbugs
for a code quality report in HTML"/>
<!-- =================================================================== -->
<!-- Creates the reports -->
<!-- =================================================================== -->
Added: xmlgraphics/fop/trunk/findbugs-exclude.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/findbugs-exclude.xml?rev=986616&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/findbugs-exclude.xml (added)
+++ xmlgraphics/fop/trunk/findbugs-exclude.xml Wed Aug 18 10:07:38 2010
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FindBugsFilter>
+</FindBugsFilter>
Propchange: xmlgraphics/fop/trunk/findbugs-exclude.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/fop/trunk/findbugs-exclude.xml
------------------------------------------------------------------------------
svn:keywords = Id
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]