diff options
author | Simon Pepping <spepping@apache.org> | 2010-08-18 10:07:38 +0000 |
---|---|---|
committer | Simon Pepping <spepping@apache.org> | 2010-08-18 10:07:38 +0000 |
commit | 1847b921948b58b18f5e7171770f7b3b0a528be3 (patch) | |
tree | 62f0d042909c5e2ca415e0903c0f58e82b02f381 /build.xml | |
parent | b69448b24b96fc7320127c480ada62fbabe62ce7 (diff) | |
download | xmlgraphics-fop-1847b921948b58b18f5e7171770f7b3b0a528be3.tar.gz xmlgraphics-fop-1847b921948b58b18f5e7171770f7b3b0a528be3.zip |
Bugzilla #49752:
Findbugs build target enhancements
Submitted by: Glenn Adams <glenn.at.skynav.com>
Changes to patch:
- Added descriptions to the user visible targets
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@986616 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 62 |
1 files changed, 51 insertions, 11 deletions
@@ -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 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" 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-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 --> <!-- =================================================================== --> |