2015-04-20 23:01:41 -07:00

219 lines
5.6 KiB
XML

<?xml version="1.0" ?>
<project
basedir="."
default="run"
name="Thinking in Java, 4th Edition (Refreshed) by Bruce Eckel (chapter: polymorphism)">
<description>
build.xml for the source code for the polymorphism 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 name="polymorphism_music">
<javac includeantruntime="false"
classpath="${basedir}/.."
srcdir="${basedir}/../polymorphism/music/">
<compilerarg value="-Xmaxerrs"/>
<compilerarg value="10"/>
</javac>
</target>
<target
depends="net_mindview_util,polymorphism_music"
description="Build all classes in this directory"
name="build">
<fail message="J2SE8 required" unless="version1.8"/>
<echo message="Building 'polymorphism'"/>
<javac includeantruntime="false"
classpath="${basedir}/.."
debug="true"
srcdir="${basedir}">
<compilerarg value="-Xmaxerrs"/>
<compilerarg value="10"/>
</javac>
<echo message="Build 'polymorphism' succeeded"/>
</target>
<target name="CovariantReturn">
<java
classname="CovariantReturn"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/"
failonerror="true"
fork="true"/>
</target>
<target name="FieldAccess">
<java
classname="FieldAccess"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/"
failonerror="true"
fork="true"/>
</target>
<target name="Frog">
<java
classname="polymorphism.Frog"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/"
failonerror="true"
fork="true"/>
</target>
<target name="PolyConstructors">
<java
classname="PolyConstructors"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/"
failonerror="true"
fork="true"/>
</target>
<target name="PrivateOverride">
<java
classname="polymorphism.PrivateOverride"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/"
failonerror="true"
fork="true"/>
</target>
<target name="ReferenceCounting">
<java
classname="ReferenceCounting"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/"
failonerror="true"
fork="true"/>
</target>
<target name="RTTI">
<java
classname="RTTI"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/"
failonerror="false"
fork="true"/>
<echo message="* Exception was expected *"/>
</target>
<target name="Sandwich">
<java
classname="polymorphism.Sandwich"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/"
failonerror="true"
fork="true"/>
</target>
<target name="Shapes">
<java
classname="Shapes"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/"
failonerror="true"
fork="true"/>
</target>
<target name="StaticPolymorphism">
<java
classname="StaticPolymorphism"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/"
failonerror="true"
fork="true"/>
</target>
<target name="Transmogrify">
<java
classname="Transmogrify"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/"
failonerror="true"
fork="true"/>
</target>
<target name="Music">
<java
classname="polymorphism.music.Music"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/music/"
failonerror="true"
fork="true"/>
</target>
<target name="Music2">
<java
classname="polymorphism.music.Music2"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/music/"
failonerror="true"
fork="true"/>
</target>
<target name="Music3">
<java
classname="polymorphism.music3.Music3"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../polymorphism/music3/"
failonerror="true"
fork="true"/>
</target>
<target
depends="build"
description="Compile and run"
name="run">
<touch file="failures"/>
<antcall target="CovariantReturn"/>
<antcall target="FieldAccess"/>
<antcall target="Frog"/>
<antcall target="PolyConstructors"/>
<antcall target="PrivateOverride"/>
<antcall target="ReferenceCounting"/>
<antcall target="RTTI"/>
<antcall target="Sandwich"/>
<antcall target="Shapes"/>
<antcall target="StaticPolymorphism"/>
<antcall target="Transmogrify"/>
<antcall target="Music"/>
<antcall target="Music2"/>
<antcall target="Music3"/>
<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>