-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.xml
More file actions
219 lines (180 loc) · 8.05 KB
/
build.xml
File metadata and controls
219 lines (180 loc) · 8.05 KB
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<?xml version="1.0"?>
<!--
$Id: build.xml,v 1.3 2004/03/22 21:52:38 flo Exp $
This is a build file for use with the Jakarta Ant build tool, see
http://jakarta.apache.org/ant/index.html
To build, go to the directory where this file is located and run
ant <target>
with one of the following targets:
clean removes temporary files and directories
compile compiles the framework
javadoc creates the API documentation
jar creates a library jar
package builds a distribution tree: docs, sources, jar
package-zip builds a zipped distribution
To run the unit tests you MUST set the junit.jar property,
for example in your user build.properties file.
-->
<project default="jar" basedir=".">
<!-- ***************************************************************** -->
<!-- Give users a chance to override build properties. -->
<!-- ***************************************************************** -->
<property file="${user.home}/forms.build.properties" />
<property file="${user.home}/build.properties" />
<property file="${basedir}/build.properties" />
<property file="${basedir}/default.properties" />
<!-- ***************************************************************** -->
<!-- P A T H S -->
<!-- ***************************************************************** -->
<path id="classpath.main">
<pathelement location="${build.main.dir}" />
<fileset dir="${lib}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</path>
<!-- ***************************************************************** -->
<!-- C L E A N -->
<!-- ***************************************************************** -->
<target name="clean"
description="Removes all temporary files and directories." >
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
</target>
<!-- ***************************************************************** -->
<!-- P R E P A R A T I O N -->
<!-- ***************************************************************** -->
<target name="prepare"
description="Prepares the build and distribution targets." >
<tstamp>
<format property="DATE" pattern="yyyy-MM-dd hh:mm:ss" />
</tstamp>
<mkdir dir="${build.main.dir}" />
<available
property="junit.task.present"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
/>
<available
property="junit.jar.present"
file="${junit.jar}"
/>
</target>
<!-- ***************************************************************** -->
<!-- C O M P I L A T I O N -->
<!-- ***************************************************************** -->
<target name="compile"
depends="compile-main"
description="Compiles the framework." />
<!-- ***************************************************************** -->
<target name="compile-main" depends="prepare"
description="Compiles the main sources." >
<javac
srcdir ="${src.main.dir}"
destdir ="${build.main.dir}"
encoding ="${build.encoding}"
executable ="${build.compile.executable}"
fork ="${build.compile.fork}"
debug ="${build.compile.debug}"
depend ="${build.compile.depend}"
deprecation ="${build.compile.deprecation}"
nowarn ="${build.compile.nowarn}"
optimize ="${build.compile.optimize}"
target ="${build.compile.target}"
source ="${build.compile.source}"
verbose ="${build.compile.verbose}" >
<classpath refid="classpath.main"/>
</javac>
</target>
<!-- ***************************************************************** -->
<!-- J A V A D O C -->
<!-- ***************************************************************** -->
<target name="javadoc" depends="prepare"
description="Creates the API documentation using JavaDoc." >
<mkdir dir="${build.javadocs.dir}" />
<javadoc
sourcepath="${src.main.dir}"
packagenames="${javadoc.packages}"
destdir="${build.javadocs.dir}"
encoding="${build.encoding}"
access="protected"
author="true"
version="true"
use="true"
link="${javadoc.link}"
windowtitle="${Name} ${spec.version} API"
doctitle="${Name} ${spec.version} API"
bottom="${copyright.message}" >
</javadoc>
</target>
<!-- ***************************************************************** -->
<!-- J A R -->
<!-- ***************************************************************** -->
<target name="jar" depends="compile-main"
description="Creates the library jar." >
<jar
destfile="${build.main.jar}" >
<fileset dir="${build.main.dir}">
<exclude name="**/*Test*"/>
<exclude name="**/test"/>
</fileset>
<manifest>
<attribute name ="Built-By"
value="${user.name}"/>
<section name="net/ffxml/swtforms" >
<attribute name ="Specification-Title"
value="${Name}" />
<attribute name ="Specification-Version"
value="${spec.version}" />
<attribute name ="Specification-Vendor"
value="${vendor}" />
<attribute name ="Implementation-Title"
value="${implmentation.title}" />
<attribute name ="Implementation-Version"
value="${impl.version} ${DATE}" />
<attribute name ="Implementation-Vendor"
value="${vendor}" />
</section>
</manifest>
</jar>
</target>
<!-- ***************************************************************** -->
<!-- P A C K A G E -->
<!-- ***************************************************************** -->
<target name="package" depends="clean, compile, javadoc, jar"
description="Creates the distribution directory tree." >
<mkdir dir="${dist.dir}" />
<!-- Compile the documentation. -->
<copy todir="${dist.docs.dir}" >
<fileset dir="${docs.dir}"
excludes="**/*.psd, **/*.sxw" />
</copy>
<move todir="${dist.docs.dir}" >
<fileset dir="${build.docs.dir}" />
</move>
<!-- Copy the source directories. -->
<copy todir="${dist.src.dir}" >
<fileset dir="${src.dir}" />
</copy>
<!-- Copy the distribution files. -->
<copy todir="${dist.dir}" >
<fileset dir="${top.dir}"
includes="*.txt, *.html, *.xml, *.properties"
excludes="todo.txt" />
</copy>
<!-- Copy the library jar file. -->
<copy tofile="${dist.main.jar}" file="${build.main.jar}" />
<!-- Create a source zip for the libary jar. -->
<zip
destfile="${dist.main.src.zip}">
<fileset dir="${src.main.dir}" />
</zip>
</target>
<!-- ***************************************************************** -->
<target name="package-zip" depends="package"
description="Packages the distribution as a zip file." >
<zip
destfile="${dist.zip}"
basedir="${dist.root.dir}"
includes="${dist.subdir}/**/*" />
</target>
</project>