Permalink
Browse files

ACCUMULO-755: Run Findbugs - added ant build script that runs FindBug…

…s. And shell script that runs ant.

git-svn-id: https://svn.apache.org/repos/asf/accumulo/trunk@1410965 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 71d9e50 commit 64bb2f27df0d62ce58552fb0327643be06c6393a David Medinets committed Nov 18, 2012
Showing with 83 additions and 0 deletions.
  1. +80 −0 contrib/findbugs_build.xml
  2. +3 −0 contrib/run_findbugs.sh
@@ -0,0 +1,80 @@
+<project name="accumulo" default="findbugs" basedir=".">
+ <description>
+ A build file to run findbugs.
+
+ STEP ONE
+ Download findbugs. Set FINDBUGS_HOME environment variable.
+ export FINDBUGS_HOME=/usr/local/findbugs-2.0.1
+
+ STEP TWO
+ To install the Ant task, copy findbugs-ant.jar into the
+ lib subdirectory of your Ant installation. For example, I ran
+ 'sudo cp $FINDBUGS_HOME/lib/findbugs-ant.jar /usr/share/ant/lib'
+
+ STEP THREE
+ Run 'mvn install -P assemble'. This will copy the accumulo jar files into
+ the local maven repository.
+ </description>
+
+ <property environment="env"/>
+
+ <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"/>
+
+ <property name="findbugs.home" value="${env.FINDBUGS_HOME}" />
+
+ <target name="findbugs">
+ <!-- jvmargs="-Xms512M -Xmx512M" -->
+ <property name="repository" value="/home/${env.USER}/.m2/repository"/>
+ <findbugs home="${findbugs.home}" output="html" outputFile="accumulo.findbugs.html" >
+ <auxClasspath>
+ <pathElement location="${repository}/ant/ant/1.6.5/ant-1.6.5.jar" />
+ <pathElement location="${repository}/commons-cli/commons-cli/1.2/commons-cli-1.2.jar" />
+ <pathElement location="${repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar" />
+ <pathElement location="${repository}/commons-collections/commons-collections/3.2/commons-collections-3.2.jar" />
+ <pathElement location="${repository}/commons-configuration/commons-configuration/1.5/commons-configuration-1.5.jar" />
+ <pathElement location="${repository}/commons-io/commons-io/1.4/commons-io-1.4.jar" />
+ <pathElement location="${repository}/commons-lang/commons-lang/2.6/commons-lang-2.6.jar" />
+ <pathElement location="${repository}/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" />
+ <pathElement location="${repository}/jline/jline/0.9.94/jline-0.9.94.jar" />
+ <pathElement location="${repository}/log4j/log4j/1.2.16/log4j-1.2.16.jar" />
+ <pathElement location="${repository}/org/apache/commons/commons-jci-fam/1.0/commons-jci-fam-1.0.jar" />
+ <pathElement location="${repository}/org/apache/hadoop/zookeeper/3.3.1/zookeeper-3.3.1.jar" />
+ <pathElement location="${repository}/org/apache/thrift/libthrift/0.8.0/libthrift-0.8.0.jar" />
+ <pathElement location="${repository}/org/apache/hadoop/hadoop-core/0.20.205.0/hadoop-core-0.20.205.0.jar" />
+ <pathElement location="${repository}/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar" />
+ <pathElement location="${repository}/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar" />
+ <pathElement location="${repository}/org/mortbay/jetty/servlet-api-2.5/6.1.14/servlet-api-2.5-6.1.14.jar" />
+ <pathElement location="${repository}/org/slf4j/slf4j-api/1.4.3/slf4j-api-1.4.3.jar" />
+ <pathElement location="${repository}/org/slf4j/slf4j-log4j12/1.4.3/slf4j-log4j12-1.4.3.jar" />
+ <!--pathElement location="${basedir}/../lib/jackson-0.9.2.jar" /-->
+ <pathElement location="${basedir}/../lib/accumulo-fate-1.5.0-SNAPSHOT.jar" />
+ <pathElement location="${basedir}/../lib/accumulo-start-1.5.0-SNAPSHOT.jar" />
+ <pathElement location="${basedir}/../lib/cloudtrace-1.5.0-SNAPSHOT.jar" />
+ </auxClasspath>
+ <sourcePath>
+ <pathElement location="${basedir}/core/src/main/java" />
+ <pathElement location="${basedir}/core/src/test/java" />
+ <pathElement location="${basedir}/fate/src/main/java" />
+ <pathElement location="${basedir}/fate/src/test/java" />
+ <pathElement location="${basedir}/server/src/main/java" />
+ <pathElement location="${basedir}/server/src/test/java" />
+ <pathElement location="${basedir}/start/src/main/java" />
+ <pathElement location="${basedir}/start/src/test/java" />
+ <pathElement location="${basedir}/test/src/main/java" />
+ <pathElement location="${basedir}/test/src/test/java" />
+ <pathElement location="${basedir}/trace/src/main/java" />
+ <pathElement location="${basedir}/trace/src/test/java" />
+ <pathElement location="${basedir}/examples/simple/src/main/java" />
+ <pathElement location="${basedir}/examples/simple/src/test/java" />
+ </sourcePath>
+ <class location="${basedir}/../lib/accumulo-core-1.5.0-SNAPSHOT.jar" />
+ <class location="${basedir}/../lib/accumulo-fate-1.5.0-SNAPSHOT.jar" />
+ <class location="${basedir}/../lib/accumulo-server-1.5.0-SNAPSHOT.jar" />
+ <class location="${basedir}/../lib/accumulo-start-1.5.0-SNAPSHOT.jar" />
+ <class location="${basedir}/../lib/accumulo-test-1.5.0-SNAPSHOT.jar" />
+ <class location="${basedir}/../lib/cloudtrace-1.5.0-SNAPSHOT.jar" />
+ <class location="${basedir}/../lib/examples-simple-1.5.0-SNAPSHOT.jar" />
+ </findbugs>
+ </target>
+
+</project>
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+ant -buildfile findbugs_build.xml

0 comments on commit 64bb2f2

Please sign in to comment.