diff options
author | Jan Materne <jhm@apache.org> | 2008-10-08 11:38:29 +0000 |
---|---|---|
committer | Jan Materne <jhm@apache.org> | 2008-10-08 11:38:29 +0000 |
commit | a1d6059470e95d27d8ee95ff1e478b3813fe41c2 (patch) | |
tree | 03e3d1c160a0ca6a7c33c5a517a92d67b134d42d /check.xml | |
parent | 9f30d0550989766a9ad2032363a5dfdb49ee6932 (diff) | |
download | ant-a1d6059470e95d27d8ee95ff1e478b3813fe41c2.tar.gz |
Prepare for introducing Findbugs.
Problem: current version (1.3.5) is not in the Maven repositories (as requested).
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@702813 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'check.xml')
-rwxr-xr-x | check.xml | 78 |
1 files changed, 75 insertions, 3 deletions
@@ -134,6 +134,78 @@ <condition><not><isset property="path"/></not></condition> </fail> <fixcrlf srcdir="src/main" includes="${path}" javafiles="yes" tab="remove" tablength="4"/> - </target> - -</project>
\ No newline at end of file + </target> + + + + + + <property name="findbugs.reportdir" + location="${build.dir}/reports/findbugs" + description="Where to store Findbugs results"/> + <property name="findbugs.raw" + value="raw.xml" + description="Findbugs Output xml-file"/> + <property name="findbugs.plugins" + value="" + description="Which Findbugs plugin to run"/> + <property name="findbugs.xsl" + value="fancy.xsl" + description="Which XSL to use for generating Output: default, fancy, plain, summary"/> + <property name="findbugs.jvmargs" + value="-Xms128m -Xmx512m" + description="JVMArgs for invoking Findbugs"/> + + + + <target name="findbugs" description="--> checks Ant codebase with Findbugs" depends="init-ivy" xmlns:fb="http://findbugs.sourceforge.net/"> + <!-- Getting Findbugs --> + <!-- + RFE : [2114752] Put 1.3.5 in Maven repository + http://sourceforge.net/tracker/index.php?func=detail&aid=2114752&group_id=96405&atid=614693 + Currently (2008-10-07 the newest one is 1.0.0) + --> + <ivy:cachepath organisation="findbugs" module="findbugs" revision="1.0.0" + inline="true" conf="default" pathid="findbugs.classpath" transitive="true"/> + <!-- Findbugs needs Dom4J, but doesnt declare it in its pom --> + <ivy:cachepath organisation="dom4j" module="dom4j" revision="1.6.1" + inline="true" conf="default" pathid="dom4j.classpath" transitive="true"/> + <!-- Getting Findbugs Plugins --> + <ivy:cachepath organisation="findbugs" module="coreplugin" revision="1.0.0" + inline="true" conf="default" pathid="findbugs.plugin.1" transitive="true"/> + + <!-- Create a path using both downloads --> + <path id="findbugs.real.classpath"> + <path refid="findbugs.classpath"/> + <path refid="dom4j.classpath"/> + </path> + <!-- Path for Findbugs PlugIns --> + <path id="findbugs.plugins.classpath"> + <!-- + <path refid="findbugs.plugin.1"/> + --> + </path> + + <!-- Load the Findbugs AntTasks --> + <taskdef uri="http://findbugs.sourceforge.net/" resource="edu/umd/cs/findbugs/anttask/tasks.properties" classpathref="findbugs.real.classpath" /> + + <!-- Start Findbugs --> + <mkdir dir="${findbugs.reportdir}"/> + <fb:findbugs classpathref="findbugs.real.classpath" pluginlist="${findbugs.plugins}" + output="xml:withMessages" + outputFile="${findbugs.reportdir}/${findbugs.raw}" + jvmargs="${findbugs.jvmargs}"> + <class location="${build.classes}" /> + <sourcePath path="${java.dir}" /> + <pluginlist refid="findbugs.plugins.classpath"/> + </fb:findbugs> + + <!-- Generate (human) readable output --> + <xslt basedir="${findbugs.reportdir}" includes="${findbugs.raw}" destdir="${findbugs.reportdir}"> + <style> + <javaresource name="${findbugs.xsl}" classpathref="findbugs.real.classpath"/> + </style> + </xslt> + </target> + +</project> |