OnJava8-Examples/build.xml
2015-12-15 11:47:04 -08:00

196 lines
5.3 KiB
XML

<?xml version="1.0" ?>
<project basedir="." default="run" name="Bruce Eckel On Java">
<import file="Ant-Clean.xml"/>
<description>
Main build.xml for the source code for
Bruce Eckel On Java
Code available at https://github.com/BruceEckel/OnJava-Examples
See installation instructions in README.md
See copyright notice in CopyRight.txt
Ant available from http://ant.apache.org
To see options, type: ant -p
</description>
<condition property="version1.8">
<equals arg1="1.8" arg2="${ant.java.version}"/>
</condition>
<filelist id="buildfiles" dir="."
files="objects/build.xml
operators/build.xml
control/build.xml
housekeeping/build.xml
hiding/build.xml
com/build.xml
reuse/build.xml
polymorphism/build.xml
interfaces/build.xml
innerclasses/build.xml
functional/build.xml
collections/build.xml
streams/build.xml
exceptions/build.xml
strings/build.xml
typeinfo/build.xml
generics/build.xml
arrays/build.xml
collectionsindepth/build.xml
files/build.xml
enums/build.xml
annotations/build.xml
concurrency/build.xml
ui/build.xml
swt/build.xml
patterns/build.xml
unittesting/build.xml
assertions/build.xml
references/build.xml
iostreams/build.xml
standardio/build.xml
newio/build.xml
compression/build.xml
serialization/build.xml
preferences/build.xml
network/build.xml
remote/build.xml
logging/build.xml
debugging/build.xml
staticchecking/build.xml
"/>
<filelist id="testablefiles" dir="."
description="All directories that produce auto-testable results"
files="objects/build.xml
operators/build.xml
control/build.xml
housekeeping/build.xml
hiding/build.xml
com/build.xml
reuse/build.xml
polymorphism/build.xml
interfaces/build.xml
innerclasses/build.xml
functional/build.xml
collections/build.xml
streams/build.xml
exceptions/build.xml
strings/build.xml
typeinfo/build.xml
generics/build.xml
arrays/build.xml
collectionsindepth/build.xml
files/build.xml
enums/build.xml
annotations/build.xml
concurrency/build.xml
patterns/build.xml
unittesting/build.xml
assertions/build.xml
references/build.xml
iostreams/build.xml
standardio/build.xml
newio/build.xml
compression/build.xml
serialization/build.xml
preferences/build.xml
logging/build.xml
debugging/build.xml
staticchecking/build.xml
"/>
<target name="run" description="Compiles and runs all examples">
<delete file="errors.txt"/>
<subant>
<filelist refid="buildfiles"/>
</subant>
<available file="errors.txt" property="errors"/>
<antcall target="finish"/>
</target>
<target name="testable" description="Compiles and runs all examples">
<delete file="errors.txt"/>
<subant>
<filelist refid="testablefiles"/>
</subant>
<available file="errors.txt" property="errors"/>
<antcall target="finish"/>
</target>
<target name="build" description="Compiles all examples">
<fail message="Java 8 required" unless="version1.8"/>
<delete file="errors.txt"/>
<subant target="build">
<filelist refid="buildfiles"/>
</subant>
<available file="errors.txt" property="errors"/>
<antcall target="finish"/>
</target>
<target name="finish" if="errors">
<echo message="Errors occurred. See errors.txt for information."/>
</target>
<target name="verifyclean"
description="delete ant verify output files" >
<delete>
<fileset dir="${basedir}" casesensitive="yes">
<include name="update_output.bat" />
<include name="validate_failures.txt" />
<include name="strategies.txt" />
</fileset>
</delete>
<echo message="verifyclean successful"/>
</target>
<target name="verify"
description="Verify output; requires Python 3.5"
depends="verifyclean">
<exec dir="${basedir}" executable="python" failonerror="true">
<arg line="verify_output.py" />
</exec>
</target>
<target name="findbugs" depends="build"
description="Runs findbugs. Must install findbugs from findbugs.sourceforge.net">
<exec executable="findbugs.bat">
<arg value="-textui"/>
<arg value="-sortByClass"/>
<arg value="-exclude"/>
<arg value="FindBugsFilter.xml"/>
<arg value="-html"/>
<arg value="."/>
<redirector output="findbugs.html"/>
</exec>
</target>
<target name="findbugs-plain" depends="build"
description="Runs findbugs with plain text output">
<exec executable="findbugs.bat">
<arg value="-textui"/>
<arg value="-sortByClass"/>
<arg value="-exclude"/>
<arg value="FindBugsFilter.xml"/>
<arg value="."/>
<redirector output="findbugs.txt"/>
</exec>
</target>
<target name="findbugs-xml" depends="build"
description="Runs findbugs with xml output">
<exec executable="findbugs.bat">
<arg value="-textui"/>
<arg value="-sortByClass"/>
<arg value="-exclude"/>
<arg value="FindBugsFilter.xml"/>
<arg value="-xml"/>
<arg value="."/>
<redirector output="findbugs.xml"/>
</exec>
</target>
</project>