OnJava8-Examples/swt/build.xml
2015-04-20 23:01:41 -07:00

172 lines
4.5 KiB
XML

<?xml version="1.0" ?>
<project
basedir="."
default="run"
name="Thinking in Java, 4th Edition (Refreshed) by Bruce Eckel (chapter: swt)">
<description>
build.xml for the source code for the swt 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>
<available
classname="org.eclipse.swt.widgets.Display"
property="org.eclipse.swt.widgets.Display"/>
<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"/>
<fail
Unless="org.eclipse.swt.widgets.Display"
message="You must install the SWT library from http://www.eclipse.org"/>
<echo message="Building 'swt'"/>
<javac includeantruntime="false"
classpath="${basedir}/.."
debug="true"
srcdir="${basedir}">
<compilerarg value="-Xmaxerrs"/>
<compilerarg value="10"/>
</javac>
<echo message="Build 'swt' succeeded"/>
</target>
<target name="ColorBoxes">
<java
classname="ColorBoxes"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../swt/"
failonerror="false"
fork="true"
timeout="4000"/>
<echo message="* Exception was expected *"/>
</target>
<target name="DisplayEnvironment">
<java
classname="DisplayEnvironment"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../swt/"
failonerror="false"
fork="true"
timeout="4000"/>
<echo message="* Exception was expected *"/>
</target>
<target name="DisplayProperties">
<java
classname="DisplayProperties"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../swt/"
failonerror="false"
fork="true"
timeout="4000"/>
<echo message="* Exception was expected *"/>
</target>
<target name="HelloSWT">
<java
classname="HelloSWT"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../swt/"
failonerror="false"
fork="true"
timeout="4000"/>
<echo message="* Exception was expected *"/>
</target>
<target name="Menus">
<java
classname="Menus"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../swt/"
failonerror="false"
fork="true"
timeout="4000"/>
<echo message="* Exception was expected *"/>
</target>
<target name="ShellsAreMainWindows">
<java
classname="ShellsAreMainWindows"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../swt/"
failonerror="false"
fork="true"
timeout="4000"/>
<echo message="* Exception was expected *"/>
</target>
<target name="SineWave">
<java
classname="SineWave"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../swt/"
failonerror="false"
fork="true"
timeout="4000"/>
<echo message="* Exception was expected *"/>
</target>
<target name="TabbedPane">
<java
classname="TabbedPane"
classpath="${java.class.path};${basedir};${basedir}/.."
dir="../swt/"
failonerror="false"
fork="true"
timeout="4000"/>
<echo message="* Exception was expected *"/>
</target>
<target
depends="build"
description="Compile and run"
name="run">
<touch file="failures"/>
<antcall target="ColorBoxes"/>
<antcall target="DisplayEnvironment"/>
<antcall target="DisplayProperties"/>
<antcall target="HelloSWT"/>
<antcall target="Menus"/>
<antcall target="ShellsAreMainWindows"/>
<antcall target="SineWave"/>
<antcall target="TabbedPane"/>
<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>