/
build-tutorials.xml
61 lines (55 loc) · 2.29 KB
/
build-tutorials.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="pivot" default="build">
<property name="src" value="src"/>
<property name="bin" value="ant-bin"/>
<property name="tutorials" value="tutorials"/>
<!-- Compiler properties -->
<property name="compiler.optimize" value="true"/>
<property name="compiler.deprecation" value="true"/>
<property name="compiler.debug" value="true"/>
<!-- Build tutorials library -->
<target name="build">
<mkdir dir="${tutorials}/${bin}"/>
<!-- Compile source files -->
<javac srcdir="${tutorials}/${src}"
destDir="${tutorials}/${bin}"
optimize="${compiler.optimize}"
deprecation="${compiler.deprecation}"
debug="${compiler.debug}"
target="1.5"
failonerror="true">
<compilerarg value="-Xlint"/>
<classpath>
<pathelement location="core/pivot-core.jar"/>
<pathelement location="web/pivot-web.jar"/>
<pathelement location="wtk/pivot-wtk.jar"/>
</classpath>
</javac>
<!-- Rebuild the JAR files -->
<delete file="${tutorials}/${ant.project.name}-tutorials.jar"/>
<jar jarfile="${tutorials}/${ant.project.name}-tutorials.jar">
<fileset dir="${tutorials}/${bin}">
<exclude name="pivot/tutorials/stocktracker/**"/>
</fileset>
<fileset dir="${tutorials}/${src}">
<exclude name="**/*.java"/>
<exclude name="pivot/tutorials/stocktracker/**"/>
</fileset>
</jar>
<delete file="${tutorials}/${ant.project.name}-stocktracker.jar"/>
<jar jarfile="${tutorials}/${ant.project.name}-stocktracker.jar">
<fileset dir="${tutorials}/${bin}">
<include name="pivot/tutorials/stocktracker/*"/>
</fileset>
<fileset dir="${tutorials}/${src}">
<exclude name="**/*.java"/>
</fileset>
</jar>
</target>
<!-- Clean the tutorial classes -->
<target name="clean">
<delete dir="${tutorials}/${bin}"/>
<delete file="${tutorials}/${ant.project.name}-tutorials.jar"/>
<delete file="${tutorials}/${ant.project.name}-stocktracker.jar"/>
</target>
</project>