You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by pk...@apache.org on 2006/04/07 22:13:36 UTC

svn commit: r392377 - in /lucene/nutch/trunk: build.xml lib/pmd-ext/ lib/pmd-ext/jakarta-oro-2.0.8.jar lib/pmd-ext/jaxen-1.1-beta-7.jar lib/pmd-ext/pmd-3.6.LICENSE.txt lib/pmd-ext/pmd-3.6.jar

Author: pkosiorowski
Date: Fri Apr  7 13:13:33 2006
New Revision: 392377

URL: http://svn.apache.org/viewcvs?rev=392377&view=rev
Log:
PMD checks added

Added:
    lucene/nutch/trunk/lib/pmd-ext/
    lucene/nutch/trunk/lib/pmd-ext/jakarta-oro-2.0.8.jar   (with props)
    lucene/nutch/trunk/lib/pmd-ext/jaxen-1.1-beta-7.jar   (with props)
    lucene/nutch/trunk/lib/pmd-ext/pmd-3.6.LICENSE.txt
    lucene/nutch/trunk/lib/pmd-ext/pmd-3.6.jar   (with props)
Modified:
    lucene/nutch/trunk/build.xml

Modified: lucene/nutch/trunk/build.xml
URL: http://svn.apache.org/viewcvs/lucene/nutch/trunk/build.xml?rev=392377&r1=392376&r2=392377&view=diff
==============================================================================
--- lucene/nutch/trunk/build.xml (original)
+++ lucene/nutch/trunk/build.xml Fri Apr  7 13:13:33 2006
@@ -198,6 +198,45 @@
   </target>
 
   <!-- ================================================================== -->
+  <!-- Run code checks (PMD)                                              --> 
+  <!-- ================================================================== -->
+  <target name="pmd" depends="compile">
+	<property name="pmd.report" location="${build.dir}/pmd-report.html" />
+	<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask">
+	  <classpath>
+		  <fileset dir="${lib.dir}">
+            <include name="pmd-ext/*.jar" />
+            <include name="xerces*.jar" />
+          </fileset>
+	  </classpath>
+	</taskdef>
+	<pmd shortFilenames="true" failonerror="true" failOnRuleViolation="false"
+		 encoding="${build.encoding}" failuresPropertyName="pmd.failures">
+	  <ruleset>unusedcode</ruleset>
+          <!--ruleset>basic</ruleset-->
+          <!--ruleset>optimizations</ruleset-->
+      <formatter type="html" toFile="${pmd.report}" />
+	  <!-- <formatter type="xml" toFile="${tempbuild}/$report_pmd.xml"/> -->
+	<fileset dir="${basedir}/src">
+        	<include name="java/**/*.java"/>
+	        <include name="plugin/**/*.java"/>
+		<!-- Exclude generated sources -->
+		<exclude name="**/NutchAnalysis.java" />
+		<exclude name="**/NutchAnalysisTokenManager.java" />
+      </fileset>
+    </pmd>
+	<condition property="pmd.stop" value="true">
+      <and>
+        <isset property="pmd.failures" />
+          <not>
+            <equals arg1="0" arg2="${pmd.failures}" trim="true" />
+          </not>
+      </and>
+	</condition>
+	<fail if="pmd.stop">FAILURE: PMD shows ${pmd.failures} rule violations. See ${pmd.report} for details.</fail>
+  </target>
+
+  <!-- ================================================================== -->
   <!-- Run unit tests                                                     --> 
   <!-- ================================================================== -->
   <target name="test" depends="test-core, test-plugins"/>

Added: lucene/nutch/trunk/lib/pmd-ext/jakarta-oro-2.0.8.jar
URL: http://svn.apache.org/viewcvs/lucene/nutch/trunk/lib/pmd-ext/jakarta-oro-2.0.8.jar?rev=392377&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lucene/nutch/trunk/lib/pmd-ext/jakarta-oro-2.0.8.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lucene/nutch/trunk/lib/pmd-ext/jaxen-1.1-beta-7.jar
URL: http://svn.apache.org/viewcvs/lucene/nutch/trunk/lib/pmd-ext/jaxen-1.1-beta-7.jar?rev=392377&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lucene/nutch/trunk/lib/pmd-ext/jaxen-1.1-beta-7.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lucene/nutch/trunk/lib/pmd-ext/pmd-3.6.LICENSE.txt
URL: http://svn.apache.org/viewcvs/lucene/nutch/trunk/lib/pmd-ext/pmd-3.6.LICENSE.txt?rev=392377&view=auto
==============================================================================
--- lucene/nutch/trunk/lib/pmd-ext/pmd-3.6.LICENSE.txt (added)
+++ lucene/nutch/trunk/lib/pmd-ext/pmd-3.6.LICENSE.txt Fri Apr  7 13:13:33 2006
@@ -0,0 +1,31 @@
+Copyright (c) 2003, InfoEther, LLC
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+    * The end-user documentation included with the redistribution, if
+any, must include the following acknowledgement:
+      "This product includes software developed in part by support from
+the Defense Advanced Research Project Agency (DARPA)"
+    * Neither the name of InfoEther, LLC nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

Added: lucene/nutch/trunk/lib/pmd-ext/pmd-3.6.jar
URL: http://svn.apache.org/viewcvs/lucene/nutch/trunk/lib/pmd-ext/pmd-3.6.jar?rev=392377&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lucene/nutch/trunk/lib/pmd-ext/pmd-3.6.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream