| <project name="run_findbugs" default="findbugs"> |
| <!-- this should be passed as a property from outsite --> |
| <property name="findbugs.home" value="${user.home}/findbugs-2.0.3" /> |
| |
| <path id="findbugs.lib"> |
| <fileset dir="${findbugs.home}/lib"> |
| <include name="findbugs-ant.jar"/> |
| </fileset> |
| </path> |
| |
| <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"> |
| <classpath refid="findbugs.lib" /> |
| </taskdef> |
| |
| <property name="WORKSPACE" location="${ant.file}/../../" /> |
| <property name="build.root" location="${WORKSPACE}/buildroot" /> |
| <buckminster.targetPlatformLocation |
| property="buckminster.target.platform" /> |
| |
| <property name="auxCpLocation" |
| value="${buckminster.target.platform}/plugins/" /> |
| |
| <property name="effort" value="default" /><!-- min,default,max--> |
| <property name="fbJvmArgs" value="-Xmx1024m" /> |
| |
| <target name="findbugs" > |
| <property name="site.p2.repository" location="${sp:site.p2.repository}" /> |
| |
| <pathconvert property="source.files" pathsep=","> |
| <fileset dir="${site.p2.repository}/plugins"> |
| <include name="*.source*" /> |
| </fileset> |
| </pathconvert> |
| |
| <pathconvert property="jar.files" pathsep=","> |
| <fileset dir="${site.p2.repository}/plugins"> |
| <exclude name="*.source*" /> |
| </fileset> |
| </pathconvert> |
| |
| <pathconvert property="aux.jar.files" pathsep=","> |
| <fileset dir="${auxCpLocation}" > |
| <include name="**/*.jar" /> |
| <exclude name="*.source*" /> |
| </fileset> |
| </pathconvert> |
| |
| <property name="findbugs.output" location="${sp:action.output}/findbugs.xml"/> |
| <touch file="${findbugs.output}" mkdirs="true" /> |
| |
| <echoproperties /> |
| <echo message="Running findbugs..." /> |
| <echo message="Findbugs home : ${findbugs.home}" /> |
| <echo message="Sources : ${source.files}" /> |
| <echo message="Classes : ${jar.files}" /> |
| <echo message="Aux Classes : ${aux.jar.files}" /> |
| <echo message="Output : ${findbugs.output}" /> |
| |
| <findbugs home="${findbugs.home}" output="xml:withMessages" outputFile="${findbugs.output}" |
| jvmargs="${fbJvmArgs}" effort="${effort}" timeout="1800000" |
| excludefilter="${ant.file}/../excludeFilter.xml" maxRank="15" |
| debug="true"> |
| |
| <sourcePath> |
| <fileset dir="${site.p2.repository}/plugins"> |
| <include name="*.source*" /> |
| </fileset> |
| </sourcePath> |
| |
| <!-- the jar containing the classes to analyze --> |
| <fileset dir="${site.p2.repository}/plugins"> |
| <exclude name="*.source*" /> |
| </fileset> |
| |
| <auxclasspath> |
| <fileset dir="${auxCpLocation}" id="aux"> |
| <include name="**/*.jar" /> |
| <exclude name="*.source*" /> |
| </fileset> |
| </auxclasspath> |
| </findbugs> |
| </target> |
| </project> |