-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
188 lines (158 loc) · 6.21 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!--
/*
* Copyright 2006 Jason Hunter and Ryan Grimm
*
* 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.
*
* The use of the Apache License does not indicate that this project is
* affiliated with the Apache Software Foundation.
*/
-->
<project name="mljam" default="all" basedir=".">
<property name="product.name" value="mljam"/>
<property name="release.version" value="1.2"/>
<!-- Static definitions of where things are relative to the root -->
<property name="java.source" value="server/src"/>
<property name="doc.source" value="."/>
<property name="buildtmp" value="buildtmp"/>
<property name="compiled.classes.dir" value="${buildtmp}/classes"/>
<!--
<property name="generated.files" value="${buildtmp}/generated"/>
-->
<property name="javadoc.dir" value="${buildtmp}/mljam/javadocs"/>
<property name="web.dir" value="${buildtmp}/mljam/WEB-INF"/>
<property name="weblib.dir" value="${buildtmp}/mljam/WEB-INF/lib"/>
<property name="web.files" value="server/WEB-INF"/>
<property name="xqy.files" value="client"/>
<property name="utils.dir" value="utils"/>
<property name="utils.lib.dir" value="utils/lib"/>
<!-- Jar files that are under source control in this tree -->
<property name="jarlib" value="server/lib"/>
<property name="bsh.jar" value="${jarlib}/bsh-2.0b4.jar"/>
<property name="commons-codec.jar" value="${jarlib}/commons-codec-1.3.jar"/>
<property name="jaxen-core.jar" value="${jarlib}/jaxen-core.jar"/>
<property name="jaxen-jdom.jar" value="${jarlib}/jaxen-jdom.jar"/>
<property name="jdom.jar" value="${jarlib}/jdom-1.0.jar"/>
<property name="saxpath.jar" value="${jarlib}/saxpath.jar"/>
<property name="servlet-api.jar" value="${jarlib}/servlet-api.jar"/>
<!-- Intermediate generated files -->
<!--
<property name="javadoc.zipfile" value="${generated.files}/${product.name}-api.zip"/>
-->
<property name="code.output.jar" value="${weblib.dir}/${product.name}.jar"/>
<!-- Products of this build -->
<property name="products" value="deliverable"/>
<property name="release.bundle" value="${products}/${product.name}-${release.version}.zip"/>
<property name="source.bundle" value="${products}/${product.name}-src-${release.version}.zip"/>
<!-- Configurable flags that will affect how targets run -->
<property name="compile.debug.symbols.flag" value="on"/> <!-- on | off -->
<property name="junit.halt.on.error" value="off"/> <!-- on | off -->
<property name="junit.disabled" value="true"/> <!-- true | false -->
<!-- ********************************************************** -->
<target name="init">
<mkdir dir="${buildtmp}"/>
<mkdir dir="${compiled.classes.dir}"/>
<!--
<mkdir dir="${generated.files}"/>
-->
<mkdir dir="${web.dir}"/>
<mkdir dir="${weblib.dir}"/>
<mkdir dir="${products}"/>
</target>
<target name="clean">
<delete dir="${buildtmp}"/>
</target>
<target name="cleanest" depends="clean">
<delete dir="${products}"/>
</target>
<!-- ********************************************************** -->
<path id="code.compile.classpath">
<pathelement path="${bsh.jar}"/>
<pathelement path="${commons-codec.jar}"/>
<pathelement path="${jaxen-core.jar}"/>
<pathelement path="${jaxen-jdom.jar}"/>
<pathelement path="${jdom.jar}"/>
<pathelement path="${saxpath.jar}"/>
<pathelement path="${servlet-api.jar}"/>
<pathelement path="${compiled.classes.dir}"/>
</path>
<target name="compile.code" depends="init">
<javac classpathref="code.compile.classpath" srcdir="${java.source}"
destdir="${compiled.classes.dir}" deprecation="on"
debug="${compile.debug.symbols.flag}" />
</target>
<target name="generate.code.jar" depends="compile.code">
<jar jarfile="${code.output.jar}">
<fileset dir="${compiled.classes.dir}">
<exclude name="**/Test*.class"/>
</fileset>
</jar>
</target>
<target name="code" depends="generate.code.jar"/>
<target name="web">
<copy todir="${web.dir}">
<fileset dir="${web.files}"/>
</copy>
<copy todir="${weblib.dir}">
<fileset dir="${jarlib}">
<exclude name="**/servlet-api.jar"/>
</fileset>
<fileset dir="${utils.lib.dir}"/>
</copy>
</target>
<!-- ********************************************************** -->
<target name="javadoc" depends="code">
<mkdir dir="${javadoc.dir}"/>
<javadoc sourcepath="${java.source}" destdir="${javadoc.dir}" packagenames="*"
author="true" version="true" windowtitle="MLJAM">
<classpath refid="code.compile.classpath"/>
<doctitle><![CDATA[<h1>MLJAM Web Service</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2006 Jason Hunter and Ryan Grimm, Licensed Under Apache 2.0</i>]]></bottom>
</javadoc>
<!--
<zip zipfile="${javadoc.zipfile}" basedir="${javadoc.dir}"/>
-->
</target>
<!-- ********************************************************** -->
<target name="binarybundle" depends="init,code,web"> <!-- removed javadoc -->
<zip zipfile="${release.bundle}">
<fileset file="README.txt"/>
<fileset file="LICENSE.txt"/>
<fileset dir="${buildtmp}">
<include name="mljam/**"/>
</fileset>
<fileset dir="${xqy.files}"/>
<fileset dir="${utils.dir}">
<include name="*.xqy"/>
</fileset>
</zip>
</target>
<target name="srcbundle">
<zip zipfile="${source.bundle}">
<fileset file="build.xml"/>
<fileset file="README.txt"/>
<fileset file="LICENSE.txt"/>
<fileset dir=".">
<include name="client/**"/>
<include name="server/**"/>
<include name="utils/**"/>
<include name="test/**"/>
<exclude name="server/exploded/**"/>
<exclude name="test/jmb**"/>
</fileset>
</zip>
</target>
<!-- ********************************************************** -->
<target name="all" depends="binarybundle,srcbundle">
</target>
</project>