-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
140 lines (121 loc) · 4.19 KB
/
build.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
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<project name="BURLAP" default="compile" basedir=".">
<description>
BURLAP build file
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="lib" location="lib"/>
<property name="doc" location="doc"/>
<property name="test" location="test"/>
<property environment="environment"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${lib}"/>
</target>
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" debug="true">
<compilerarg value="-Xlint"/>
<classpath>
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="dist" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/burlap.jar">
<fileset dir="${build}"/>
<fileset dir="${src}"/>
<zipgroupfileset dir="lib/">
<include name="**/*.jar"/>
</zipgroupfileset>
</jar>
</target>
<target name="doc" depends="init" description="generate documentation">
<mkdir dir="${doc}"/>
<javadoc sourcepath="${src}" destdir="${doc}"/>
</target>
<target name="dist_no_dep" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/burlap_no_dep.jar">
<fileset dir="${build}"/>
<fileset dir="${src}"/>
</jar>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
<target name="test" depends="test-compile-6,test-compile-7,test-compile-8" >
<mkdir dir="${test}/reports"/>
<junit printsummary="yes" haltonfailure="yes" fork="off">
<classpath>
<pathelement location="${test}/${build}/1.6"/>
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</classpath>
<formatter type="plain" usefile="false"/>
<test name="burlap.testing.TestSuite"
outfile="result">
<formatter type="plain"/>
<formatter type="xml"/>
</test>
</junit>
</target>
<target name="test-compile-6" description="tests compile in Java 6">
<mkdir dir="${test}/${build}/1.6"/>
<javac fork="yes" executable="${environment.JAVA_HOME_6}/bin/javac" destdir="${test}/${build}/1.6">
<src path="${src}" />
<src path="testing" />
<compilerarg value="-Xlint"/>
<classpath>
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="test-compile-7" description="tests compile in Java 7">
<mkdir dir="${test}/${build}/1.7"/>
<javac fork="yes" executable="${environment.JAVA_HOME_7}/bin/javac" srcdir="${src}" destdir="${test}/${build}/1.7">
<src path="${src}" />
<src path="testing" />
<compilerarg value="-Xlint"/>
<classpath>
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="test-compile-8" description="tests compile in Java 8">
<mkdir dir="${test}/${build}/1.8"/>
<javac fork="yes" executable="${environment.JAVA_HOME_8}/bin/javac" srcdir="${src}" destdir="${test}/${build}/1.8">
<src path="${src}" />
<src path="testing" />
<compilerarg value="-Xlint"/>
<classpath>
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
</target>
</project>