You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hcatalog-commits@incubator.apache.org by av...@apache.org on 2012/06/22 22:14:47 UTC

svn commit: r1353046 - in /incubator/hcatalog/branches/branch-0.4: CHANGES.txt build.xml

Author: avandana
Date: Fri Jun 22 22:14:46 2012
New Revision: 1353046

URL: http://svn.apache.org/viewvc?rev=1353046&view=rev
Log:
HCAT-432 Add findbugs to build (merged from trunk)

Modified:
    incubator/hcatalog/branches/branch-0.4/CHANGES.txt
    incubator/hcatalog/branches/branch-0.4/build.xml

Modified: incubator/hcatalog/branches/branch-0.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.4/CHANGES.txt?rev=1353046&r1=1353045&r2=1353046&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.4/CHANGES.txt (original)
+++ incubator/hcatalog/branches/branch-0.4/CHANGES.txt Fri Jun 22 22:14:46 2012
@@ -26,6 +26,10 @@ Trunk (unreleased changes)
   HCAT-328 HCatLoader should report its input size so pig can estimate the number of reducers (traviscrawford via gates)
 
   IMPROVEMENTS
+  HCAT-432 Add findbugs to build (rohini via avandana)
+
+  HCAT-424 Code cleanup of tabs (khorgath)
+
   HCAT-331 Update HCatalog to junit 4 (traviscrawford via khorgath)
 
   HCAT-414 More HCat e2e tests (khorgath via gates)

Modified: incubator/hcatalog/branches/branch-0.4/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.4/build.xml?rev=1353046&r1=1353045&r2=1353046&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.4/build.xml (original)
+++ incubator/hcatalog/branches/branch-0.4/build.xml Fri Jun 22 22:14:46 2012
@@ -384,6 +384,12 @@
     <!-- test storage handlers -->
     <antcall target="test-storage-handlers"/>
   </target>
+  
+  <!--
+  ================================================================================
+  Clover Section
+  ================================================================================
+  -->
 
   <target name="clover" depends="clover.setup, clover.info"
       description="Instrument the Unit tests using Clover.  To use, specify 
@@ -393,7 +399,7 @@
   <target name="clover.setup" if="clover.enabled">
     <taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
     <mkdir dir="${clover.db.dir}"/>
-    <clover-setup initString="${clover.db.dir}/pig_coverage.db">
+    <clover-setup initString="${clover.db.dir}/hcat_coverage.db">
       <fileset dir="src" includes="**/*.java"/>
     </clover-setup>
   </target>
@@ -435,6 +441,44 @@
 
   <!--
   ================================================================================
+  Findbugs Section
+  ================================================================================
+  -->
+
+  <property name="findbugs.home" value=""/>
+
+  <target name="findbugs" depends="check-for-findbugs, jar" if="findbugs.present" description="Run findbugs if present">
+    <property name="findbugs.out.dir" value="${test.build.dir}/findbugs"/>
+    <property name="findbugs.exclude.file" value="${test.src.dir}/findbugsExcludeFile.xml"/>
+    <property name="findbugs.report.htmlfile" value="${findbugs.out.dir}/hcat-findbugs-report.html"/>
+    <property name="findbugs.report.xmlfile" value="${findbugs.out.dir}/hcat-findbugs-report.xml"/>
+    <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${findbugs.home}/lib/findbugs-ant.jar"/>
+    <mkdir dir="${findbugs.out.dir}"/>
+    <findbugs home="${findbugs.home}" output="xml:withMessages" outputFile="${findbugs.report.xmlfile}" effort="max" timeout="2400000" excludeFilter="${findbugs.exclude.file}" jvmargs="-Xmx1024M">
+      <auxClasspath>
+        <fileset dir="${build.ivy.lib.dir}">
+          <include name="**/*.jar"/>
+        </fileset>
+      </auxClasspath>
+      <sourcePath path="${src.dir}"/>
+      <fileset dir="${build.dir}/${ant.project.name}">
+        <include name="**/*.jar"/>
+      </fileset>
+    </findbugs>
+    <xslt style="${findbugs.home}/src/xsl/default.xsl" in="${findbugs.report.xmlfile}" out="${findbugs.report.htmlfile}"/>
+  </target>
+
+  <target name="check-for-findbugs">
+    <available property="findbugs.present" file="${findbugs.home}/lib/findbugs.jar"/>
+  </target>
+
+  <target name="findbugs.check" depends="check-for-findbugs" unless="findbugs.present">
+     <fail message="'findbugs.home' is not defined. Please pass -Dfindbugs.home=&lt;base of Findbugs installation&gt; 
+        to Ant on the command-line." />
+  </target>
+
+  <!--
+  ================================================================================
   Clean Section
   ================================================================================
   -->