blob: 688d11a25968d575cbbe5086b1617a28a30c35a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Ant build for the JOAL demos. This build has been tested with ANT 1.5.3.
-
- In order for this build to succeed the resulting jar files from this build
- (joal-demos.jar) must not be on the CLASSPATH.
-
- This build requires that the joal project has been checked out into a sibling
- directory to the joal-demos top-level directory and that the joal.jar has been
- built into its build directory.
-->
<project name="JOAL.demos" default="all">
<!--
- Make sure that joal-demos.jar is not on the CLASSPATH; this can
- cause builds to fail since if this Java process has the jar file
- open we can not overwrite it.
-->
<target name="test.for.joal.demos.jar">
<available property="joal.demos.jar.on.class.path" classname="demos.devmaster.lesson1.SingleStaticSource" />
</target>
<target name="java.class.path.validate" depends="test.for.joal.demos.jar" if="joal.demos.jar.on.class.path">
<fail>
******************************************************************
** Your CLASSPATH environment variable appears to be set (some **
** JOAL demos' classes are currently visible to the build.) **
** This can cause the build to fail. Please unset your **
** CLASSPATH variable and restart the build. **
******************************************************************
</fail>
</target>
<target name="init" depends="java.class.path.validate">
<property name="joal.jar" value="../../joal/build/joal.jar" />
<property name="classes" value="../build/classes" />
<property name="src" value="../src" />
<property name="joal.demos.jar" value="../build/joal-demos.jar" />
<property name="joal.demos.src.zip" value="../build/joal-demos-src.zip" />
</target>
<target name="all" depends="init">
<mkdir dir="${classes}" />
<path id="joal.classpath">
<pathelement path="${classpath}" />
<pathelement location="${joal.jar}" />
</path>
<javac destdir="${classes}" source="1.4" debug="true" debuglevel="source,lines">
<src path="${src}" />
<classpath refid="joal.classpath" />
</javac>
<jar destfile="${joal.demos.jar}">
<fileset dir="${classes}" />
<fileset dir="${src}/java">
<include name="demos/data/**" />
</fileset>
</jar>
<!-- Build a source archive as well -->
<delete file="${joal.demos.src.zip}" />
<zip destfile="${joal.demos.src.zip}"
basedir="../.."
includes="joal-demos/make/**,joal-demos/src/**"
excludes="**/*.class,**/*~"
/>
</target>
<target name="clean" depends="init">
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="../build" />
</delete>
</target>
</project>
|