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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
<!--
This build script will create a directory called burn that is
_almost_ suitable for burning onto a CD. However, there
are a number of things that should be done to this directory
before actually burning:
The PDFs in the print directory need to be manually generated.
Use the content of foo.pdf.contents to generate foo.pdf, and
and then delete the foo.pdf.contents directory.
The powerpoint and packages directory should be populated
with whatever you want to populate it with. The
packages directory is typically filled with Linux installers
and a clean AspectJ installer.
-->
<project name="build" default="burn" basedir=".">
<description>
Build a CD image containing AspectJ exercises.
</description>
<!-- CUSTOMIZE THESE PROPERTIES -->
<!-- this directory should hold a clean unpacked AspectJ release -->
<property name="aj.home" value="c:/apps/aspectj" />
<!-- this is the name of the event -->
<property name="aj.event" value="oopsla2004" />
<!-- NO CUSTOMIZABLE PROPERTIES BELOW HERE -->
<property name="burndir" value="burn" />
<property name="eventdir" value="${burndir}/aj-${aj.event}" />
<property name="packagedir" value="${burndir}/packages" />
<property name="printdir" value="${burndir}/print" />
<property name="powerpointdir" value="${burndir}/powerpoint" />
<!-- now real targets -->
<target name="burn" depends="clean,skeleton,event,answers,printables" />
<target name="printables" depends="skeleton">
<delete dir="${printdir}/answers.pdf.contents" />
<mkdir dir="${printdir}/answers.pdf.contents" />
<copy toDir="${printdir}/answers.pdf.contents">
<fileset dir="answers" includes="*.java" excludes="Answer.java"/>
</copy>
<delete dir="${printdir}/exercises.pdf.contents" />
<mkdir dir="${printdir}/exercises.pdf.contents" />
<copy toDir="${printdir}/exercises.pdf.contents" file="index.html" />
<copy toDir="${printdir}/exercises.pdf.contents" file="figures_classes.gif" />
<copy toDir="${printdir}/exercises.pdf.contents" file="${aj.home}/doc/quick.pdf" />
<delete dir="${printdir}/install.pdf.contents" />
<mkdir dir="${printdir}/install.pdf.contents" />
<copy toDir="${printdir}/install.pdf.contents" file="install.txt" />
</target>
<target name="answers" depends="skeleton">
<zip destfile="${packagedir}/${aj.event}-answers.zip">
<zipfileset dir="answers"
prefix="aj-${aj.event}/answers"
includes="*.java"
excludes="Answer.java"
/>
</zip>
</target>
<target name="event" depends="tools,exercises">
<filter token="aj.event" value="${aj.event}" />
<copy file="install.txt" toDir="${eventdir}" filtering="yes" />
</target>
<target name="exercises" depends="skeleton">
<copy toDir="${eventdir}">
<fileset dir="."
includes="junit.jar,base.lst,guibase.lst,*.html,support/**/*.java,figures/**/*.java,tests/**/*.java,answers/Answer.java"
/>
</copy>
</target>
<target name="tools" depends="skeleton">
<mkdir dir="${eventdir}/aspectj" />
<filter token="aj.event" value="${aj.event}" />
<copy toDir="${eventdir}/aspectj">
<fileset dir="${aj.home}" excludes="bin/**" />
</copy>
<copy toDir="${eventdir}/aspectj/bin" filtering="yes">
<fileset dir="scripts" excludes="setpaths*" />
</copy>
<copy toDir="${eventdir}" filtering="yes">
<fileset dir="scripts" includes="setpaths*" />
</copy>
<fixcrlf srcDir="${eventdir}"
includes="setpaths.bat,aspectj/bin/ajbrowser.bat,aspectj/bin/ajc.bat"
eol="crlf" />
<fixcrlf srcDir="${eventdir}"
includes="setpaths.sh,setpaths.csh,aspectj/bin/ajbrowser,aspectj/bin/ajc"
eol="lf" />
</target>
<target name="skeleton">
<mkdir dir="${burndir}" />
<mkdir dir="${eventdir}" />
<mkdir dir="${packagedir}" />
<mkdir dir="${printdir}" />
<mkdir dir="${powerpointdir}" />
</target>
<target name="clean">
<delete dir="burn" />
</target>
<target name="javaclean">
<delete dir="burn" />
</target>
</project>
|