2015-04-27 14:31:25 -07:00

310 lines
7.8 KiB
XML

<?xml version="1.0" ?>
<project
basedir="."
default="run"
name="Thinking in Java, 4th Edition (Refreshed) by Bruce Eckel (chapter: exceptions)">
<description>
build.xml for the source code for the exceptions chapter of
Thinking in Java, 4th Edition (Refreshed) by Bruce Eckel
Source code available at http://www.MindView.net
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>
<target name="net_mindview_util">
<javac includeantruntime="false"
classpath="${basedir}/.."
srcdir="${basedir}/../net/mindview/util/">
<compilerarg value="-Xmaxerrs"/>
<compilerarg value="10"/>
</javac>
</target>
<target
depends="net_mindview_util"
description="Build all classes in this directory"
name="build">
<fail message="J2SE8 required" unless="version1.8"/>
<echo message="Building 'exceptions'"/>
<javac includeantruntime="false"
classpath="${basedir}/.."
debug="true"
srcdir="${basedir}">
<compilerarg value="-Xmaxerrs"/>
<compilerarg value="10"/>
</javac>
<echo message="Build 'exceptions' succeeded"/>
</target>
<target name="AlwaysFinally">
<java
classname="AlwaysFinally"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="Cleanup">
<java
classname="Cleanup"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="CleanupIdiom">
<java
classname="CleanupIdiom"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="DynamicFields">
<java
classname="DynamicFields"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="ExceptionMethods">
<java
classname="ExceptionMethods"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="ExceptionSilencer">
<java
classname="ExceptionSilencer"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="ExtraFeatures">
<java
classname="ExtraFeatures"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="FinallyWorks">
<java
classname="FinallyWorks"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="FullConstructors">
<java
classname="FullConstructors"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="Human">
<java
classname="Human"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="InheritingExceptions">
<java
classname="InheritingExceptions"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="LoggingExceptions">
<java
classname="LoggingExceptions"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="LoggingExceptions2">
<java
classname="LoggingExceptions2"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="LostMessage">
<java
classname="LostMessage"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="MainException">
<java
classname="MainException"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="MultipleReturns">
<java
classname="MultipleReturns"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="NeverCaught">
<java
classname="NeverCaught"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="false"
fork="true"/>
<echo message="* Exception was expected *"/>
</target>
<target name="OnOffSwitch">
<java
classname="OnOffSwitch"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="Rethrowing">
<java
classname="Rethrowing"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="RethrowNew">
<java
classname="RethrowNew"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="StormyInning">
<java
classname="StormyInning"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="TurnOffChecking">
<java
classname="TurnOffChecking"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="WhoCalled">
<java
classname="WhoCalled"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target name="WithFinally">
<java
classname="WithFinally"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../exceptions/"
failonerror="true"
fork="true"/>
</target>
<target
depends="build"
description="Compile and run"
name="run">
<touch file="failures"/>
<antcall target="AlwaysFinally"/>
<antcall target="Cleanup"/>
<antcall target="CleanupIdiom"/>
<antcall target="DynamicFields"/>
<antcall target="ExceptionMethods"/>
<antcall target="ExceptionSilencer"/>
<antcall target="ExtraFeatures"/>
<antcall target="FinallyWorks"/>
<antcall target="FullConstructors"/>
<antcall target="Human"/>
<antcall target="InheritingExceptions"/>
<antcall target="LoggingExceptions"/>
<antcall target="LoggingExceptions2"/>
<antcall target="LostMessage"/>
<antcall target="MainException"/>
<antcall target="MultipleReturns"/>
<antcall target="NeverCaught"/>
<antcall target="OnOffSwitch"/>
<antcall target="Rethrowing"/>
<antcall target="RethrowNew"/>
<antcall target="StormyInning"/>
<antcall target="TurnOffChecking"/>
<antcall target="WhoCalled"/>
<antcall target="WithFinally"/>
<delete file="failures"/>
</target>
<target description="delete all byproducts" name="clean">
<delete>
<fileset dir="${basedir}" includes="**/*.class"/>
<fileset dir="${basedir}" includes="**/*Output.txt"/>
<fileset dir="${basedir}" includes="**/log.txt"/>
<fileset dir="${basedir}" includes="failures"/>
</delete>
<echo message="clean successful"/>
</target>
</project>