Skip to content

Instantly share code, notes, and snippets.

@Axxiss
Created November 26, 2012 09:18
Show Gist options
  • Select an option

  • Save Axxiss/4147349 to your computer and use it in GitHub Desktop.

Select an option

Save Axxiss/4147349 to your computer and use it in GitHub Desktop.
Findbugs taskdef and target
<target name="findbugs" description="Generate the FindBugs XML report">
<fail
message="findbugs.home is missing. Make sure to add it as an argument."
unless="findbugs.home"
/>
<path id="findbugs.jar">
<pathelement path="${findbugs.home}/lib/findbugs-ant.jar">
</pathelement>
</path>
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
classpathref="findbugs.jar" />
<echo>FINDBUGS_HOME = ${findbugs.home}</echo>
<mkdir dir="reports" />
<findbugs home="${findbugs.home}" output="xml"
outputFile="reports/findbugs.xml" excludeFilter="findbugs-exclude.xml">
<auxClasspath path="${android.jar}" />
<class location="${basedir}/bin/classes" />
<sourcePath path="${basedir}/src" />
<sourcePath path="${basedir}/tests" />
</findbugs>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment