You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ma...@apache.org on 2009/10/13 15:04:52 UTC

svn commit: r824735 - in /xmlgraphics/fop/trunk: build.xml lib/build/

Author: maxberger
Date: Tue Oct 13 13:04:51 2009
New Revision: 824735

URL: http://svn.apache.org/viewvc?rev=824735&view=rev
Log:
Updated ant to run checkstyle 5. This is now supported in lib/build rather than the previously used checkstyle.home

Modified:
    xmlgraphics/fop/trunk/build.xml
    xmlgraphics/fop/trunk/lib/build/   (props changed)

Modified: xmlgraphics/fop/trunk/build.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/build.xml?rev=824735&r1=824734&r2=824735&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/build.xml (original)
+++ xmlgraphics/fop/trunk/build.xml Tue Oct 13 13:04:51 2009
@@ -110,9 +110,10 @@
       <include name="*.jar"/>
     </fileset>
   </path>
+  <property name="lib-build-tools" value="${basedir}/lib/build"/>
   <path id="libs-build-tools-classpath">
     <path refid="libs-build-classpath"/>
-    <fileset dir="${basedir}/lib/build">
+    <fileset dir="${lib-build-tools}">
       <include name="*.jar"/>
     </fileset>
   </path>
@@ -1139,19 +1140,25 @@
 <!-- =================================================================== -->
 <!-- Checkstyle                                                          -->
 <!-- =================================================================== -->
-  <property name="checkstyle.lib" value="${checkstyle.home.dir}"/>
-  <property name="checkstyle.noframes.xslt" value="${checkstyle.home.dir}/contrib/checkstyle-noframes.xsl"/>
-  <path id="libs-checkstyle">
-    <fileset dir="${checkstyle.lib}">
-      <include name="*.jar"/>
-    </fileset>
-  </path>
-  <target name="checkstyle-avail" unless="checkstyle.home.dir">
-    <echo message="Checkstyle Support NOT Present. Please download it from http://checkstyle.sf.net/ and set checkstyle.home.dir in build-local.properties"/>
-  </target>
-  <target name="checkstyle" depends="init, checkstyle-avail" if="checkstyle.home.dir" description="Runs Checkstyle for a code quality report">
-    <taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" classpathref="libs-checkstyle"/>
-    <checkstyle config="checkstyle-4.0.xml" failonviolation="false">
+  <property name="checkstyle.noframes.xslt" value="${basedir}/checkstyle-noframes.xsl" />
+  <condition property="checkstyle.avail">
+  	<and>
+      <available classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
+        <classpath>
+          <path refid="libs-build-tools-classpath"/>
+        </classpath>
+      </available>
+      <available file="${checkstyle.noframes.xslt}"/>
+    </and>
+  </condition>
+  <target name="checkstyle-avail" unless="checkstyle.avail">
+    <echo message="Checkstyle support NOT present. Please download it from http://checkstyle.sf.net/ and"/>
+    <echo message="..copy or link checkstyle-all-5.0.jar to ${lib-build-tools}"/>
+    <echo message="..copy or link checkstyle-noframes.xsl to ${checkstyle.noframes.xslt}"/>
+  </target>
+  <target name="checkstyle" depends="init, checkstyle-avail" if="checkstyle.avail" description="Runs Checkstyle for a code quality report">
+    <taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" classpathref="libs-build-tools-classpath"/>
+    <checkstyle config="checkstyle-5.0.xml" failonviolation="false">
       <fileset dir="${src.java.dir}" includes="**/*.java"/>
       <formatter type="xml" toFile="${build.dir}/report_checkstyle.xml"/>
     </checkstyle>

Propchange: xmlgraphics/fop/trunk/lib/build/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct 13 13:04:51 2009
@@ -0,0 +1 @@
+checkstyle-*.jar



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org