-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
277 lines (249 loc) · 9.79 KB
/
build.xml
File metadata and controls
277 lines (249 loc) · 9.79 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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<?xml version="1.0" encoding="UTF-8"?>
<project name="OGoCore" default="makejars" basedir=".">
<!-- give user a chance to override any of the following settings
NOTE: any properties defined in one of these files will prevent
the defaults provided below from being set - this means
they will be effectively overriden!
-->
<property file=".ant.properties"/>
<property file="${user.home}/.ant.properties"/>
<!-- DEFAULTS -->
<property name="src" location="." />
<property name="libs" location="." />
<property name="bin" location="ant-obj" />
<property name="libs3.go" location="../GETobjects/ThirdParty" />
<property name="libs.go" location="../GETobjects/ant-obj/lib" />
<property name="bin.core" value="${bin}/core" />
<property name="jardir" value="${bin}/lib" />
<!-- include the version file NOW -->
<property file="version.properties" />
<!-- NOTE: This is the default version name for each release build.
If you need to override it, i.e. if you want to refer to a
specific trunk snapshot including a particular subversion revision
or timestamp, you can do this before this statement.
-->
<property name="version.name"
value="${version.major}.${version.minor}.${version.subminor}" />
<!-- products -->
<property name="jarfile.logic"
value="${jardir}/ogo-logic-${version.name}.jar"
/>
<property name="jarfile.logic.fat"
value="${jardir}/ogo-logic-fat-${version.name}.jar"
/>
<!-- global compile options -->
<property name="compile.debug" value="off" />
<property name="compile.listfiles" value="false" />
<property name="compile.source" value="1.4" />
<property name="compile.target" value="1.2" />
<!--
<property name="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdaptor" />
-->
<!-- All the parts of the project...
We want to package everything excluding the unit tests,
thus we need to define the parts of the project with
several exclude rules
-->
<!-- Core -->
<patternset id="logic">
<include name="org/opengroupware/logic/**/*.java" />
<exclude name="org/opengroupware/logic/tests/" />
</patternset>
<!-- Resources -->
<patternset id="logic.resources">
<include name="**/*.properties" />
<include name="**/*.txt" />
<include name="**/*.xml" />
<include name="**/*.plist" />
<!-- exclude samples -->
<!-- don't copy from products or the www directory -->
<exclude name="${bin}/**" />
<exclude name="www/**" />
<exclude name="bin/**" />
<!-- do not include sample apps -->
<exclude name="org/opengroupware/logic/tests/**" />
<exclude name="org/opengroupware/testtools/**" />
<!-- eclipse product directory -->
<!-- special files we don't want to put in the package -->
<exclude name="log4j.properties" />
<exclude name="version.properties" />
</patternset>
<!-- stripping included jars -->
<patternset id="strip.manifest">
<exclude name="META-INF/**/*" />
</patternset>
<!-- Setup classpath necessary for building -->
<path id="build.classpath">
<pathelement path="${classpath}" />
<!-- third party libs ... required for building und running -->
<fileset dir="${libs3.go}">
<include name="*.jar" />
</fileset>
<fileset dir="${libs.go}">
<include name="*.jar" />
</fileset>
<fileset dir="${libs}">
<include name="*.jar" />
</fileset>
</path>
<!-- clean bin and lib ... this should probably be split? -->
<target name="clean.all">
<delete dir="${bin.core}" />
<mkdir dir="${bin.core}" />
<delete dir="${jardir}" />
<mkdir dir="${jardir}" />
</target>
<!-- no need to clean up before! -->
<target name="compile.core">
<!-- compile it -->
<javac srcdir="${src}"
destdir="${bin.core}"
debug="${compile.debug}"
listfiles="${compile.listfiles}"
>
<classpath refid="build.classpath" />
<patternset refid="logic" />
</javac>
<!-- copy resources -->
<copy todir="${bin.core}">
<fileset dir="${src}">
<patternset refid="logic.resources" />
</fileset>
</copy>
</target>
<target name="makejars" depends="makejar.logic" />
<!-- we clean stuff in advance in order to guarantee that no artifacts
(if any) are being packaged in this release
-->
<target name="makejar.logic" depends="clean.all, compile.core">
<jar destfile="${jarfile.logic}"
basedir="${bin.core}"
index="true"
compress="true"
>
<!-- copy readmes -->
<fileset file="${src}/COPYING" />
<fileset file="${src}/COPYRIGHT" />
<fileset file="${src}/NOTES.txt" />
<manifest>
<section name="org/opengroupware/logic">
<attribute name="Specification-Title" value="OpenGroupware.org Logic" />
<attribute name="Specification-Version" value="${version.major}.${version.minor}" />
<attribute name="Specification-Vendor" value="OpenGroupware.org" />
<attribute name="Implementation-Title" value="org.opengroupware.logic" />
<attribute name="Implementation-Version" value="${version.major}.${version.minor}.${version.subminor}" />
<attribute name="Implementation-Vendor" value="OpenGroupware.org" />
</section>
</manifest>
</jar>
</target>
<!-- This target - which is not enabled by default (!) - creates a
logic-fat-x.x.x.jar which contains all dependencies by default.
As such, it's rather huge and only suited for situations when
you need to get something up and running quickly.
In your own projects you might want to custom tailor this jar
further by i.e. stripping other unnecessary classes or adding
a concrete logging framework like apache-log4j.
-->
<target name="makejar.logic.fat" depends="clean.all">
<!-- first, create a jar comprised of jetty-runner and third party
libs... don't compress it, yet
-->
<jar destfile="${jarfile.logic.fat}"
basedir="${bin.jetty}"
index="false"
compress="false"
update="false"
>
<!-- logging -->
<zipfileset src="${libs}/commons-logging-1.1.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<zipfileset src="${libs}/javax.servlet.jar">
<patternset refid="strip.manifest" />
<!-- strip JSP garbage -->
<exclude name="javax/servlet/jsp/**/*.*" />
</zipfileset>
<!-- Scripting -->
<zipfileset src="${libs}/ognl-2.6.9.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<zipfileset src="${libs}/js-1.6r7.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<!-- WOFileUpload -->
<zipfileset src="${libs}/commons-fileupload-1.2.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<zipfileset src="${libs}/commons-codec-1.11.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<zipfileset src="${libs}/commons-io-1.3.2.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<!-- Extras (PDF generation and charts) -->
<zipfileset src="${libs}/iText-2.0.7.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<zipfileset src="${libs}/jfreechart-1.0.9.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<zipfileset src="${libs}/jcommon-1.0.12.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<!-- Jetty -->
<zipfileset src="${libs}/jetty-6.1.7.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<zipfileset src="${libs}/jetty-util-6.1.7.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<!-- Database adaptors
It's rather debatable whether this really belongs here,
but I'll include it for completeness's sake
-->
<zipfileset src="${libs}/derby-10.2.2.0.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<zipfileset src="${libs}/mysql-connector-java-3.1.13-bin.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<zipfileset src="${libs}/postgresql-42.1.3.jre7.jar">
<patternset refid="strip.manifest" />
</zipfileset>
<!-- copy license readmes -->
<fileset file="${libs}/Apache-LICENSE.txt" />
<fileset file="${libs}/derby-LICENSE.txt" />
<fileset file="${libs}/iText-MPL-1.1.txt" />
<fileset file="${libs}/jcommon-license.txt" />
<fileset file="${libs}/jfreechart-license.txt" />
<fileset file="${libs}/js-mozlicense.txt" />
<fileset file="${libs}/ognl-license.txt" />
</jar>
<!-- now, update this jar with contents of ${bin.core} and finally
compress it!
-->
<jar destfile="${jarfile.logic.fat}"
basedir="${bin.core}"
index="true"
update="true"
compress="true"
>
<!-- copy readmes -->
<fileset file="${src}/COPYING" />
<fileset file="${src}/COPYRIGHT" />
<fileset file="${src}/NOTES.txt" />
<manifest>
<section name="org/opengroupware/logic">
<attribute name="Specification-Title" value="OpenGroupware.org Logic (FAT)" />
<attribute name="Specification-Version" value="${version.major}.${version.minor}" />
<attribute name="Specification-Vendor" value="OpenGroupware.org" />
<attribute name="Implementation-Title" value="org.opengroupware.logic" />
<attribute name="Implementation-Version" value="${version.major}.${version.minor}.${version.subminor}" />
<attribute name="Implementation-Vendor" value="OpenGroupware.org" />
</section>
</manifest>
</jar>
</target>
</project>