OnJava8-Examples/build.xml

196 lines
5.3 KiB
XML
Raw Normal View History

2015-04-20 15:36:01 -07:00
<?xml version="1.0" ?>
2015-06-14 22:52:48 -07:00
<project basedir="." default="run" name="Bruce Eckel On Java">
<import file="Ant-Clean.xml"/>
2015-04-20 15:36:01 -07:00
<description>
Main build.xml for the source code for
2015-06-14 22:52:48 -07:00
Bruce Eckel On Java
2015-08-17 11:52:18 -06:00
Code available at https://github.com/BruceEckel/OnJava-Examples
See installation instructions in README.md
2015-04-20 15:36:01 -07:00
See copyright notice in CopyRight.txt
Ant available from http://ant.apache.org
2015-04-20 15:36:01 -07:00
To see options, type: ant -p
</description>
<condition property="version1.8">
<equals arg1="1.8" arg2="${ant.java.version}"/>
</condition>
<filelist id="buildfiles" dir="."
2015-06-15 00:18:36 -07:00
files="objects/build.xml
2015-04-20 15:36:01 -07:00
operators/build.xml
control/build.xml
2015-06-15 00:18:36 -07:00
housekeeping/build.xml
hiding/build.xml
com/build.xml
reuse/build.xml
2015-04-20 15:36:01 -07:00
polymorphism/build.xml
interfaces/build.xml
innerclasses/build.xml
2015-11-14 16:18:05 -08:00
functional/build.xml
2015-12-15 11:47:04 -08:00
collections/build.xml
streams/build.xml
2015-04-20 15:36:01 -07:00
exceptions/build.xml
strings/build.xml
typeinfo/build.xml
generics/build.xml
arrays/build.xml
2015-12-15 11:47:04 -08:00
collectionsindepth/build.xml
files/build.xml
2015-05-31 10:36:22 -07:00
enums/build.xml
annotations/build.xml
2015-04-20 15:36:01 -07:00
concurrency/build.xml
2015-06-15 00:18:36 -07:00
ui/build.xml
2015-04-20 15:36:01 -07:00
swt/build.xml
2015-04-27 14:31:25 -07:00
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
2015-04-27 14:31:25 -07:00
network/build.xml
remote/build.xml
logging/build.xml
debugging/build.xml
2015-05-17 18:45:56 -07:00
staticchecking/build.xml
2015-04-20 15:36:01 -07:00
"/>
2015-12-15 11:47:04 -08:00
<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
"/>
2015-04-20 15:36:01 -07:00
<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>
2015-12-15 11:47:04 -08:00
<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>
2015-04-20 15:36:01 -07:00
<target name="build" description="Compiles all examples">
2015-05-05 00:06:52 -07:00
<fail message="Java 8 required" unless="version1.8"/>
2015-04-20 15:36:01 -07:00
<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>
2015-12-15 11:47:04 -08:00
<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>
2015-12-02 09:20:27 -08:00
<target name="verify"
2015-12-15 11:47:04 -08:00
description="Verify output; requires Python 3.5"
depends="verifyclean">
2015-12-02 09:20:27 -08:00
<exec dir="${basedir}" executable="python" failonerror="true">
<arg line="verify_output.py" />
</exec>
2015-04-20 15:36:01 -07:00
</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>