donaldp 2002/07/19 01:00:50
Modified: baxter build.xml
Log:
* Dont produce checkstyle report
* Ignore operator positioning (checkstyle2.3)
* Give large warning if not doing a checkstyle
Revision Changes Path
1.25 +19 -20 jakarta-avalon-excalibur/baxter/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/baxter/build.xml,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- build.xml 12 Jul 2002 09:35:51 -0000 1.24
+++ build.xml 19 Jul 2002 08:00:50 -0000 1.25
@@ -29,7 +29,6 @@
<pathelement location="${junit.jar}"/>
<path refid="project.class.path"/>
</path>
- <property name="cp" refid="test.class.path"/>
<target name="main" depends="jar" description="Build the project"/>
<target name="rebuild" depends="clean,main" description="Rebuild the project"/>
@@ -210,15 +209,30 @@
</target>
- <target name="checkstyle" if="do.checkstyle" description="Checkstyle">
+ <target name="checkstyle-avail">
+ <available property="CheckStyle.present"
+ classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
+ <classpath refid="project.class.path"/>
+ </available>
+ </target>
+
+ <target name="checkstyle-check" depends="checkstyle-avail"
unless="CheckStyle.present">
+ <echo>
+ CheckStyle is not present! This means checkstyle will not run and
+ if you modify code it may not conform to our established standards.
+ Please download checkstyle from http://checkstyle.sourceforge.net
+ </echo>
+ </target>
+
+ <target name="checkstyle" depends="checkstyle-check" if="CheckStyle.present"
description="Checkstyle">
<!-- this invocation of checkstyle requires that checkstyle be downloaded
and setup -->
- <!-- thats why you are required to define do.checkstyle property to
generate the report -->
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
<classpath refid="project.class.path"/>
</taskdef>
<checkstyle
+ wrapOp="ignore"
lcurlyType="nl"
lcurlyMethod="nl"
lcurlyOther="nl"
@@ -237,33 +251,18 @@
javadocScope="protected"
ignoreWhitespace="true"
cacheFile="checkstyle.cache"
- failOnViolation="false"
+ failOnViolation="true"
ignoreCastWhitespace="true">
<fileset dir="${java.dir}">
<include name="**/*.java"/>
</fileset>
<formatter type="plain"/>
- <formatter type="xml" toFile="${build.dir}/checkstyle-results.xml"/>
</checkstyle>
</target>
- <target name="checkstyle-report"
- depends="checkstyle"
- if="do.checkstyle"
- description="Generate Checkstyle Report">
-
- <mkdir dir="${build.reports}/checkstyle"/>
- <property name="checkstyle.pathhack" location="."/>
- <style style="${tools.dir}/etc/checkstyle-frames.xsl"
in="${build.dir}/checkstyle-results.xml"
- out="${build.reports}/checkstyle/delete-me.html">
- <param name="pathhack" expression="${checkstyle.pathhack}"/>
- </style>
-
- </target>
-
<!-- Creates the distribution -->
<target name="dist"
- depends="dist-jar, test-reports, checkstyle-report, javadocs"
+ depends="dist-jar, test-reports, checkstyle, javadocs"
description="Generates a distribution (jar + javadocs + unit tests +
checkstyle reports)">
<copy file="${build.conf}/LICENSE.txt" todir="${dist.dir}"/>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>