82 lines
2.5 KiB
XML
82 lines
2.5 KiB
XML
<project>
|
|
|
|
<property name="chapter" value="CHAPTER?"/>
|
|
|
|
<description>
|
|
Ant build.xml for the source code for chapter ${chapter}
|
|
Thinking in Java Director's Cut by Bruce Eckel
|
|
Code available at http://www.MindView.net
|
|
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>
|
|
|
|
<macrodef name="jrun">
|
|
<attribute name="cls" default="NOT SET"/>
|
|
<attribute name="dirpath" default=""/>
|
|
<attribute name="arguments" default=""/>
|
|
<attribute name="failOnError" default="true"/>
|
|
<attribute name="timeOut" default="15000"/>
|
|
<attribute name="msg" default=""/>
|
|
<sequential>
|
|
<echo>Running: ${chapter} @{cls}</echo>
|
|
<java
|
|
classname="@{cls}"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
dir="@{dirpath}"
|
|
failonerror="@{failOnError}"
|
|
fork="true"
|
|
timeout="@{timeOut}">
|
|
<arg line="@{arguments}"/>
|
|
</java>
|
|
<echo>Finished: ${chapter} @{cls}</echo>
|
|
<echo>@{msg}</echo>
|
|
<echo>--------------------------------</echo>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<condition property="version1.8">
|
|
<equals arg1="1.8" arg2="${ant.java.version}"/>
|
|
</condition>
|
|
|
|
<target name="net_mindview_util">
|
|
<javac includeantruntime="false"
|
|
classpath="${java.class.path};${basedir};${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="Java 8 required" unless="version1.8"/>
|
|
<echo message="Building '${chapter}'"/>
|
|
<javac includeantruntime="false"
|
|
classpath="${java.class.path};${basedir};${basedir}/.."
|
|
debug="true"
|
|
excludes="${excludedfiles}"
|
|
srcdir="${basedir}">
|
|
<compilerarg value="-Xmaxerrs"/>
|
|
<compilerarg value="10"/>
|
|
</javac>
|
|
<echo message="Build '${chapter}' succeeded"/>
|
|
</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>
|