Refactoring to have all the generated stuff done under target (inspired by
Maven).
This commit is contained in:
parent
3382af9cc9
commit
c78b70a9cd
|
|
@ -1,5 +1,3 @@
|
|||
checkstyle.ipr
|
||||
checkstyle.iws
|
||||
classes
|
||||
dist
|
||||
testreports
|
||||
target
|
||||
|
|
|
|||
116
build.xml
116
build.xml
|
|
@ -14,7 +14,8 @@
|
|||
|
||||
<property name="checkstyle.dir"
|
||||
value="src/checkstyle/com/puppycrawl/tools/checkstyle" />
|
||||
<property name="testreport.dir" value="testreports"/>
|
||||
<property name="testreport.dir" value="target/testreports"/>
|
||||
<property name="dist.dir" value="target/dist"/>
|
||||
|
||||
<property name="version" value="2.3beta" />
|
||||
|
||||
|
|
@ -24,7 +25,7 @@
|
|||
</path>
|
||||
|
||||
<path id="run.classpath">
|
||||
<pathelement location="classes/checkstyle" />
|
||||
<pathelement location="target/checkstyle" />
|
||||
<path refid="build.classpath" />
|
||||
</path>
|
||||
|
||||
|
|
@ -41,7 +42,7 @@
|
|||
</path>
|
||||
|
||||
<path id="tests.runpath">
|
||||
<pathelement location="classes/tests" />
|
||||
<pathelement location="target/tests" />
|
||||
<path refid="tests.buildpath" />
|
||||
</path>
|
||||
|
||||
|
|
@ -58,8 +59,7 @@
|
|||
<fileset dir="src/checkstyle" includes="**/Generated*.java" />
|
||||
<fileset dir="src/checkstyle" includes="**/Generated*.txt" />
|
||||
</delete>
|
||||
<delete dir="classes" />
|
||||
<delete dir="dist" />
|
||||
<delete dir="target" />
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="docs/api" includes="**" excludes=".cvsignore,CVS/**"/>
|
||||
</delete>
|
||||
|
|
@ -102,29 +102,29 @@
|
|||
<!-- COMPILE TARGETS -->
|
||||
<!-- -->
|
||||
<target name="compile.checkstyle" depends="build.antlr">
|
||||
<mkdir dir="classes/checkstyle" />
|
||||
<mkdir dir="target/checkstyle" />
|
||||
<depend srcdir="src/checkstyle"
|
||||
destdir="classes/checkstyle" closure="yes"/>
|
||||
destdir="target/checkstyle" closure="yes"/>
|
||||
<javac srcdir="src/checkstyle"
|
||||
destdir="classes/checkstyle"
|
||||
destdir="target/checkstyle"
|
||||
deprecation="on" debug="on"
|
||||
classpathref="build.classpath" />
|
||||
<copy file="src/checkstyle/checkstyletask.properties"
|
||||
todir="classes/checkstyle"/>
|
||||
todir="target/checkstyle"/>
|
||||
</target>
|
||||
|
||||
<!-- Compiles only the test code. Input files are excluded from
|
||||
compilation, they contain code like assert statements
|
||||
that does not compile on all JDKs -->
|
||||
<target name="compile.tests" depends="compile.checkstyle">
|
||||
<mkdir dir="classes/tests" />
|
||||
<depend srcdir="src/tests" destdir="classes/tests" closure="yes"/>
|
||||
<mkdir dir="target/tests" />
|
||||
<depend srcdir="src/tests" destdir="target/tests" closure="yes"/>
|
||||
<!-- start of a change to turn on compilation of all input files -->
|
||||
<!-- under JDK1.4. -->
|
||||
<property name="testExcludes"
|
||||
value="**/InputWhitespace.java,**/InputImport.java"/>
|
||||
<javac srcdir="src/tests"
|
||||
destdir="classes/tests"
|
||||
destdir="target/tests"
|
||||
deprecation="on" debug="on"
|
||||
excludes="${testExcludes}"
|
||||
classpathref="tests.buildpath" />
|
||||
|
|
@ -175,10 +175,10 @@
|
|||
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
|
||||
<classpath refid="run.classpath"/>
|
||||
</taskdef>
|
||||
<delete file="classes/cachefile" />
|
||||
<delete file="target/cachefile" />
|
||||
<checkstyle headerfile="docs/java.header"
|
||||
ignorebraces="false"
|
||||
cachefile="classes/cachefile"
|
||||
cachefile="target/cachefile"
|
||||
memberPattern="^m[A-Z][a-zA-Z0-9]*$"
|
||||
staticPattern="^s[A-Z][a-zA-Z0-9]*$"
|
||||
paramPattern="^a[A-Z][a-zA-Z0-9]*$"
|
||||
|
|
@ -194,7 +194,7 @@
|
|||
includes="**/*.java"
|
||||
excludes="**/Generated*.java"/>
|
||||
<formatter type="plain"/>
|
||||
<formatter type="xml" toFile="classes/cs_errors.xml"/>
|
||||
<formatter type="xml" toFile="target/cs_errors.xml"/>
|
||||
<classpath refid="build.classpath"/>
|
||||
</checkstyle>
|
||||
</target>
|
||||
|
|
@ -222,27 +222,27 @@
|
|||
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
|
||||
<classpath refid="run.classpath"/>
|
||||
</taskdef>
|
||||
<mkdir dir="classes/style/frames"/>
|
||||
<mkdir dir="classes/style/noframes"/>
|
||||
<mkdir dir="classes/style/simple"/>
|
||||
<mkdir dir="target/style/frames"/>
|
||||
<mkdir dir="target/style/noframes"/>
|
||||
<mkdir dir="target/style/simple"/>
|
||||
<checkstyle failOnViolation="false"
|
||||
basedir=".">
|
||||
<fileset dir="src/checkstyle"
|
||||
includes="**/*.java"
|
||||
excludes="**/Generated*.java"/>
|
||||
<formatter type="xml" toFile="classes/style/cs_errors.xml"/>
|
||||
<formatter type="xml" toFile="target/style/cs_errors.xml"/>
|
||||
<classpath refid="build.classpath"/>
|
||||
</checkstyle>
|
||||
<style basedir="classes/style"
|
||||
destdir="classes/style/noframes"
|
||||
<style basedir="target/style"
|
||||
destdir="target/style/noframes"
|
||||
includes="cs_errors.xml"
|
||||
style="contrib/checkstyle-noframes.xsl"/>
|
||||
<style basedir="classes/style"
|
||||
destdir="classes/style/frames"
|
||||
<style basedir="target/style"
|
||||
destdir="target/style/frames"
|
||||
includes="cs_errors.xml"
|
||||
style="contrib/checkstyle-frames.xsl"/>
|
||||
<style basedir="classes/style"
|
||||
destdir="classes/style/simple"
|
||||
<style basedir="target/style"
|
||||
destdir="target/style/simple"
|
||||
includes="cs_errors.xml"
|
||||
style="contrib/checkstyle-simple.xsl"/>
|
||||
|
||||
|
|
@ -319,26 +319,26 @@
|
|||
<!-- DIST TARGETS -->
|
||||
<!-- -->
|
||||
<target name="build.bindist" depends="compile.checkstyle, javadoc">
|
||||
<delete dir="dist/checkstyle-${version}" />
|
||||
<mkdir dir="dist/checkstyle-${version}" />
|
||||
<jar jarfile="dist/checkstyle-${version}/checkstyle-${version}.jar"
|
||||
basedir="classes/checkstyle" />
|
||||
<delete dir="${dist.dir}/checkstyle-${version}" />
|
||||
<mkdir dir="${dist.dir}/checkstyle-${version}" />
|
||||
<jar jarfile="${dist.dir}/checkstyle-${version}/checkstyle-${version}.jar"
|
||||
basedir="target/checkstyle" />
|
||||
<!-- copy the JARS and make a mega JAR out of them -->
|
||||
<copy file="${regexp.jar}" todir="dist/checkstyle-${version}" />
|
||||
<copy file="${antlr.jar}" todir="dist/checkstyle-${version}" />
|
||||
<mkdir dir="dist/checkstyle-${version}/tmp" />
|
||||
<unjar src="dist/checkstyle-${version}/antlr.jar"
|
||||
dest="dist/checkstyle-${version}/tmp" />
|
||||
<unjar src="dist/checkstyle-${version}/jakarta-regexp-1.2.jar"
|
||||
dest="dist/checkstyle-${version}/tmp" />
|
||||
<unjar src="dist/checkstyle-${version}/checkstyle-${version}.jar"
|
||||
dest="dist/checkstyle-${version}/tmp" />
|
||||
<delete dir="dist/checkstyle-${version}/tmp/META-INF" />
|
||||
<jar jarfile="dist/checkstyle-${version}/checkstyle-all-${version}.jar"
|
||||
basedir="dist/checkstyle-${version}/tmp" />
|
||||
<delete dir="dist/checkstyle-${version}/tmp" />
|
||||
<copy file="${regexp.jar}" todir="${dist.dir}/checkstyle-${version}" />
|
||||
<copy file="${antlr.jar}" todir="${dist.dir}/checkstyle-${version}" />
|
||||
<mkdir dir="${dist.dir}/checkstyle-${version}/tmp" />
|
||||
<unjar src="${dist.dir}/checkstyle-${version}/antlr.jar"
|
||||
dest="${dist.dir}/checkstyle-${version}/tmp" />
|
||||
<unjar src="${dist.dir}/checkstyle-${version}/jakarta-regexp-1.2.jar"
|
||||
dest="${dist.dir}/checkstyle-${version}/tmp" />
|
||||
<unjar src="${dist.dir}/checkstyle-${version}/checkstyle-${version}.jar"
|
||||
dest="${dist.dir}/checkstyle-${version}/tmp" />
|
||||
<delete dir="${dist.dir}/checkstyle-${version}/tmp/META-INF" />
|
||||
<jar jarfile="${dist.dir}/checkstyle-${version}/checkstyle-all-${version}.jar"
|
||||
basedir="${dist.dir}/checkstyle-${version}/tmp" />
|
||||
<delete dir="${dist.dir}/checkstyle-${version}/tmp" />
|
||||
<!-- copy documentation -->
|
||||
<copy todir="dist/checkstyle-${version}">
|
||||
<copy todir="${dist.dir}/checkstyle-${version}">
|
||||
<fileset dir=".">
|
||||
<include name="LICENSE*"/>
|
||||
<include name="README"/>
|
||||
|
|
@ -354,21 +354,21 @@
|
|||
</filterset>
|
||||
</copy>
|
||||
<!-- create the final zip & tar/gzip files -->
|
||||
<zip zipfile="dist/checkstyle-${version}.zip">
|
||||
<fileset dir="dist">
|
||||
<zip zipfile="${dist.dir}/checkstyle-${version}.zip">
|
||||
<fileset dir="${dist.dir}">
|
||||
<include name="checkstyle-${version}/**"/>
|
||||
</fileset>
|
||||
</zip>
|
||||
<tar tarfile="dist/checkstyle-${version}.tar"
|
||||
basedir="dist" includes="checkstyle-${version}/**" />
|
||||
<gzip zipfile="dist/checkstyle-${version}.tar.gz"
|
||||
src="dist/checkstyle-${version}.tar" />
|
||||
<tar tarfile="${dist.dir}/checkstyle-${version}.tar"
|
||||
basedir="${dist.dir}" includes="checkstyle-${version}/**" />
|
||||
<gzip zipfile="${dist.dir}/checkstyle-${version}.tar.gz"
|
||||
src="${dist.dir}/checkstyle-${version}.tar" />
|
||||
</target>
|
||||
|
||||
<target name="build.srcdist" depends="checkstyle.checkstyle">
|
||||
<delete dir="dist/checkstyle-src-${version}" />
|
||||
<mkdir dir="dist/checkstyle-src-${version}" />
|
||||
<copy todir="dist/checkstyle-src-${version}">
|
||||
<delete dir="${dist.dir}/checkstyle-src-${version}" />
|
||||
<mkdir dir="${dist.dir}/checkstyle-src-${version}" />
|
||||
<copy todir="${dist.dir}/checkstyle-src-${version}">
|
||||
<fileset dir=".">
|
||||
<include name="LICENSE*"/>
|
||||
<include name="README"/>
|
||||
|
|
@ -382,15 +382,15 @@
|
|||
</fileset>
|
||||
</copy>
|
||||
<!-- Produce the final distributions -->
|
||||
<zip zipfile="dist/checkstyle-src-${version}.zip">
|
||||
<fileset dir="dist">
|
||||
<zip zipfile="${dist.dir}/checkstyle-src-${version}.zip">
|
||||
<fileset dir="${dist.dir}">
|
||||
<include name="checkstyle-src-${version}/**"/>
|
||||
</fileset>
|
||||
</zip>
|
||||
<tar tarfile="dist/checkstyle-src-${version}.tar"
|
||||
basedir="dist" includes="checkstyle-src-${version}/**" />
|
||||
<gzip zipfile="dist/checkstyle-src-${version}.tar.gz"
|
||||
src="dist/checkstyle-src-${version}.tar" />
|
||||
<tar tarfile="${dist.dir}/checkstyle-src-${version}.tar"
|
||||
basedir="${dist.dir}" includes="checkstyle-src-${version}/**" />
|
||||
<gzip zipfile="${dist.dir}/checkstyle-src-${version}.tar.gz"
|
||||
src="${dist.dir}/checkstyle-src-${version}.tar" />
|
||||
</target>
|
||||
|
||||
<target name="javadoc" depends="compile.checkstyle">
|
||||
|
|
|
|||
Loading…
Reference in New Issue