This repository has been archived by the owner on Mar 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
168 lines (140 loc) · 5.03 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2007 Philip van Oosten (Mentoring Systems BVBA)
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
-->
<project name="Longbow" default="build-all">
<!--
There are no system dependencies. All libraries
used to build Longbow are contained in the Subversion
repository as binaries.
-->
<import file="common-build.xml" />
<!-- The class path used to compile java source files -->
<path id="classpath">
<path refid="classpath" />
<pathelement location="${ant.home}/lib/ant.jar" />
</path>
<!-- The class path used to compile junit tests -->
<path id="test.classpath"></path>
<!-- The class path used to run junit tests -->
<path id="junit.classpath"></path>
<!-- *************************************
SRC: create archive of source files
************************************** -->
<target name="src">
<delete dir="${src.dist}"></delete>
<mkdir dir="${src.dist}" />
<copy todir="${src.dist}" overwrite="true">
<fileset dir="src">
<include name="**/*.java" />
<include name="**/*.properties" />
</fileset>
</copy>
<copy overwrite="yes" file="LICENSE"
tofile="${src.dist}/LICENSE" />
<copy overwrite="yes" file="NOTICE" tofile="${src.dist}/NOTICE" />
<tar compression="bzip2" destfile="${src.dist}.tar.bz2">
<fileset dir="${src.dist}"></fileset>
</tar>
<checksum file="${src.dist}.tar.bz2" algorithm="MD5"
fileext=".md5" />
<checksum file="${src.dist}.tar.bz2" algorithm="SHA"
fileext=".sha" />
<delete dir="${src.dist}"></delete>
</target>
<!-- ************************************************
SRC-TEST: create archive of JUnit source files
************************************************* -->
<target name="src-test">
<delete dir="${src-test.dist}"></delete>
<mkdir dir="${src-test.dist}" />
<copy todir="${src-test.dist}" overwrite="true">
<fileset dir="test">
<include name="**/*.java" />
<include name="**/*.properties" />
</fileset>
</copy>
<copy overwrite="yes" file="LICENSE"
tofile="${src-test.dist}/LICENSE" />
<copy overwrite="yes" file="NOTICE"
tofile="${src-test.dist}/NOTICE" />
<tar compression="bzip2" destfile="${src-test.dist}.tar.bz2">
<fileset dir="${src-test.dist}"></fileset>
</tar>
<checksum file="${src-test.dist}.tar.bz2" algorithm="MD5"
fileext=".md5" />
<checksum file="${src-test.dist}.tar.bz2" algorithm="SHA"
fileext=".sha" />
<delete dir="${src-test.dist}"></delete>
</target>
<target name="apt">
</target>
<!-- **********************************************
JAVADOC: Generate javadoc and create archive
*********************************************** -->
<target name="javadoc" description="Generate javadoc">
<delete dir="doc" />
<javadoc author="true" destdir="doc"
classpath="${build.classpath}">
<fileset dir="src" />
</javadoc>
<tar compression="bzip2" destfile="${javadoc.dist}.tar.bz2">
<fileset dir="doc" />
</tar>
</target>
<!-- ***************************
BUILD: build source files
**************************** -->
<target name="build">
<mkdir dir="${build.dist}" />
<javac classpath="${build.classpath}" destdir="${build.dist}"
failonerror="false" optimize="true" srcdir="src" />
<copy overwrite="yes" file="LICENSE"
tofile="${build.dist}/LICENSE" />
<copy overwrite="yes" file="NOTICE"
tofile="${build.dist}/NOTICE" />
<jar basedir="${build.dist}" destfile="${build.dist}.jar" />
<delete dir="${build.dist}" />
</target>
<!-- ******************************
BUILD-TEST: build tests
******************************* -->
<target depends="build" name="build-test">
<mkdir dir="${build-test.dist}" />
<javac classpath="${build-test.classpath}:${build.jar}"
destdir="${build-test.dist}" failonerror="false" optimize="true"
srcdir="test" />
<copy overwrite="yes" file="LICENSE"
tofile="${build-test.dist}/LICENSE" />
<copy overwrite="yes" file="NOTICE"
tofile="${build-test.dist}/NOTICE" />
<jar basedir="${build-test.dist}"
destfile="${build-test.dist}.jar" />
<delete dir="${build-test.dist}" />
</target>
<!-- ***************************************
CLEAN: delete all generated files
**************************************** -->
<target name="clean">
<delete dir="doc" />
<delete dir="${dist.dir}" />
</target>
<!-- ************************************
BUILD-ALL: clean and build all
************************************* -->
<target depends="clean" name="build-all">
<antcall target="src" />
<antcall target="src-test" />
<antcall target="javadoc" />
<antcall target="build-test" />
</target>
</project>