Browse Source

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
master
Jan Materne 16 years ago
parent
commit
a1d6059470
1 changed files with 75 additions and 3 deletions
  1. +75
    -3
      check.xml

+ 75
- 3
check.xml View File

@@ -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>
</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>

Loading…
Cancel
Save