|
|
@@ -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 --> |
|
|
|
<!-- =================================================================== --> |