This repository has been archived by the owner on Jul 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
build.xml
305 lines (257 loc) · 14 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
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="uwc" default="all">
<property file="uwc.properties"/>
<property environment="env"/>
<!--<property name="project.jdk.home" value="${jdk.home.1.5}"/>-->
<property name="project.jdk.home" value="${env.JAVA_HOME}"/>
<property name="project.jdk.classpath" value="jdk.classpath.1.5"/>
<!-- Uncomment the following property if no tests compilation is needed -->
<!--
<property name="skip.tests" value="true"/>
-->
<!-- Compiler options -->
<property name="compiler.debug" value="on"/>
<property name="compiler.generate.no.warnings" value="off"/>
<!-- <property name="compiler.args" value=""/> -->
<!-- Can we put this directly in the code? -->
<property name="compiler.args" value="-J-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser"/>
<property name="compiler.max.memory" value="128m"/>
<patternset id="ignored.files">
<exclude name="**/CVS/**"/>
<exclude name="**/SCCS/**"/>
<exclude name="**/RCS/**"/>
<exclude name="**/rcs/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.svn/**"/>
</patternset>
<patternset id="compiler.resources">
<include name="**/?*.properties"/>
<include name="**/?*.xml"/>
<include name="**/?*.gif"/>
<include name="**/?*.png"/>
<include name="**/?*.jpeg"/>
<include name="**/?*.jpg"/>
<include name="**/?*.html"/>
<include name="**/?*.dtd"/>
<include name="**/?*.tld"/>
</patternset>
<!--<fileset dir="${jdk.home.1.5}">-->
<!-- JDK definitions -->
<path id="jdk.classpath.1.5">
<fileset dir="${env.JAVA_HOME}">
<include name="jre/lib/charsets.jar"/>
<include name="jre/lib/deploy.jar"/>
<include name="jre/lib/javaws.jar"/>
<include name="jre/lib/jce.jar"/>
<include name="jre/lib/jsse.jar"/>
<include name="jre/lib/plugin.jar"/>
<include name="jre/lib/rt.jar"/>
<include name="jre/lib/ext/dnsns.jar"/>
<include name="jre/lib/ext/localedata.jar"/>
<include name="jre/lib/ext/sunjce_provider.jar"/>
<include name="jre/lib/ext/sunpkcs11.jar"/>
</fileset>
</path>
<!-- Global Libraries -->
<!-- Application Server Libraries -->
<!-- Modules -->
<!-- Module uwc -->
<property name="module.uwc.basedir" value="${basedir}"/>
<property name="module.jdk.home.uwc" value="${project.jdk.home}"/>
<property name="module.jdk.classpath.uwc" value="${project.jdk.classpath}"/>
<property name="compiler.args.uwc" value="${compiler.args}"/>
<property name="uwc.output.dir" value="${module.uwc.basedir}/target/uwc"/>
<property name="uwc.output.classes.dir" value="${module.uwc.basedir}/target/uwc/classes"/>
<property name="uwc.testoutput.dir" value="${module.uwc.basedir}/target/uwc/classes"/>
<property name="gen-source-dir" value="${module.uwc.basedir}/gensrc"/>
<property name="gen-source-java-dir" value="${gen-source-dir}/java"/>
<property name="gen-axis-code-marker-file" value="${gen-source-dir}/.axis-generated"/>
<!-- The task requires the following libraries from IntelliJ IDEA distribution: -->
<!-- javac2.jar; jdom.jar; bcel.jar -->
<!-- JDK definitions -->
<path id="intellij.classpath">
<fileset dir="${module.uwc.basedir}/lib">
<include name="bcel.jar"/>
<include name="javac2.jar"/>
<include name="jdom.jar"/>
</fileset>
</path>
<taskdef name="javac2" classname="com.intellij.uiDesigner.ant.Javac2"
classpathref="intellij.classpath"/>
<path id="uwc.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="uwc.module.classpath">
<path refid="${module.jdk.classpath.uwc}"/>
<path refid="intellij.classpath"/>
<fileset dir="${module.uwc.basedir}/lib">
<include name="*.jar"/>
</fileset>
<pathelement location="${module.uwc.basedir}/lib/*.jar"/>
<!--<pathelement location="${module.uwc.basedir}/lib/activation.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/axis-ant.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/axis-schema.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/axis.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/commons-discovery-0.2.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/commons-logging-1.0.4.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/jakarta-oro-2.0.8.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/jaxrpc.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/junit.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/log4j-1.2.13.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/mail.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/saaj.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/wsdl4j-1.5.1.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/confluence-remote-java-wrapper-v3.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/lib/*.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/target/wsdl4j-1.5.1.jar"/>-->
<!--<pathelement location="${module.uwc.basedir}/target/wsdl4j-1.5.1.jar"/>-->
</path>
<patternset id="excluded.from.module.uwc">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.uwc">
<patternset refid="excluded.from.module.uwc"/>
</patternset>
<path id="uwc.module.sourcepath">
<dirset dir="${module.uwc.basedir}">
<include name="src"/>
<include name="gensrc/java"/>
</dirset>
</path>
<target name="compile.module.uwc" depends="compile.module.uwc.production,compile.module.uwc.tests"
description="compile module(s) uwc"/>
<target name="compile.module.uwc.production" description="compile module(s) uwc production classes">
<mkdir dir="${uwc.output.classes.dir}"/>
<javac2 destdir="${uwc.output.classes.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}"
memoryMaximumSize="${compiler.max.memory}" fork="true" executable="${module.jdk.home.uwc}/bin/javac" encoding="iso-8859-1">
<compilerarg line="${compiler.args.uwc}"/>
<bootclasspath refid="uwc.module.bootclasspath"/>
<classpath refid="uwc.module.classpath"/>
<src refid="uwc.module.sourcepath"/>
</javac2>
<copy todir="${uwc.output.classes.dir}">
<fileset dir="${module.uwc.basedir}/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.uwc.tests" depends="compile.module.uwc.production"
description="compile module(s) uwc test classes" unless="skip.tests"/>
<target name="clean.module.uwc" description="cleanup module">
<delete dir="target"/>
<delete dir="${uwc.testoutput.dir}"/>
</target>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
</target>
<target name="clean" depends="clean.module.uwc" description="cleanup all"/>
<target name="all" depends="init, compile.module.uwc, finish-dist" description="build all"/>
<target name="finish-dist">
<copy todir="${uwc.output.dir}/lib">
<fileset dir="lib"/>
</copy>
<copy todir="${uwc.output.dir}">
<fileset dir="bin"/>
</copy>
<copy todir="${uwc.output.dir}/images">
<fileset dir="images"/>
</copy>
<!-- default properties -->
<copy todir="${uwc.output.dir}/conf" overwrite="true">
<fileset dir="conf"/>
</copy>
<!-- but for a generic build - use local properties
note: failonerror is false so that if there's no conf-local
the build can continue merrily on its way
-->
<copy todir="${uwc.output.dir}/conf" overwrite="true" failonerror="false">
<fileset dir="conf-local"/>
</copy>
</target>
<target name="package" depends="all" description="create the distribution file and place in the dist dir">
<!-- package with default properties!!-->
<copy todir="${uwc.output.dir}/conf" overwrite="true">
<fileset dir="conf"/>
</copy>
<delete dir="target/uwc/output"/>
<antcall target="CreateExecutableJarFileWithExternalLibrary"/>
<mkdir dir="./dist"/>
<zip basedir="target" excludes="uwc/classes/**, uwc/lib/**, target/uwc/lib/**" excludesfile="bin/run_uwc_devel.sh" destfile="./dist/uwc.zip"/>
</target>
<target name="CreateExecutableJarFileWithExternalLibrary">
<jar destfile="target/uwc/uwc.jar">
<zipfileset dir="${module.uwc.basedir}/target/uwc/classes" prefix=""/>
<zipfileset src="${module.uwc.basedir}/lib/activation.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/axis-1.2.1.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/axis-jaxrpc-1.2.1.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/axis-saaj-1.2.1.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/bcel.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/commons-codec-1.3.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/commons-discovery-0.2.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/commons-httpclient-3.0.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/commons-lang-2.1.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/commons-logging-1.0.4.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/confluence-xmlrpc-wrapper-v5.2.0.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/dom4j-1.4-full.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/forms_rt.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/jakarta-oro-2.0.8.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/javac2.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/jaxrpc.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/jdom.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/junit.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/log4j-1.2.13.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/mail.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/mysql-connector-java-5.0.3-bin.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/saaj.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/sharepoint-wrapper-1.0.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/substance.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/swing-layout-1.0.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/treewrapper.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/Tidy.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/wsdl4j-1.5.1.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/xmlrpc-2.0.1.jar"/>
<zipfileset src="${module.uwc.basedir}/lib/apache-mime4j-0.6.1.jar"/>
<manifest>
<attribute name="Main-Class" value="com.atlassian.uwc.ui.UWCForm3"/>
</manifest>
</jar>
</target>
<!--<target name="generate-axis-client-code" unless="axis-uptodate">-->
<!--<echo message="==== ========================================"/>-->
<!--<echo message="==== generating axis client classes for devel ====="/>-->
<!--<echo message="==== =========================================="/>-->
<!--<mkdir dir="${gen-source-java-dir}"/>-->
<!--<java classname="org.apache.axis.wsdl.WSDL2Java" fork="true">-->
<!--<arg line="-p com.atlassian.uwc.soapclient \-\-output ${gen-source-java-dir} ${module.uwc.basedir}/confluenceservice-v1.wsdl"/>-->
<!--<classpath>-->
<!--<path refid="uwc.module.classpath"/>-->
<!--</classpath>-->
<!--</java>-->
<!--<touch file="${gen-axis-code-marker-file}"/>-->
<!--</target>-->
<target name="run-v2" depends="init,compile.module.uwc" description="Run uwc gui version 2">
<java classname="com.atlassian.uwc.ui.UWCForm2" fork="true" dir="${uwc.output.dir}">
<classpath>
<pathelement location="${uwc.output.classes.dir}"/>
<fileset dir="${uwc.output.dir}/lib">
<include name="*.jar"/>
</fileset>
</classpath>
</java>
</target>
<target name="package-spoof" description="Create spoof jar for use with APR">
<jar jarfile="./dist/uwc-spoof.jar">
<fileset dir="./src/etc"/>
</jar>
</target>
<target name="package-nolibs" depends="init, compile.module.uwc" description="Create uwc.jar containing only UWC classes with classpath set to point to lib jars in SAME directory (so we can deploy all webstart resources from same page)">
<jar destfile="target/uwc/uwc.jar">
<zipfileset dir="${module.uwc.basedir}/target/uwc/classes" prefix=""/>
<manifest>
<attribute name="main-class" value="com.atlassian.uwc.ui.UWCForm3"/>
<attribute name="Class-Path" value="./Tidy.jar ./javac2.jar ./activation.jar ./jaxrpc.jar ./axis-1.2.1.jar ./jdom.jar ./axis-jaxrpc-1.2.1.jar ./junit.jar ./axis-saaj-1.2.1.jar ./log4j-1.2.13.jar ./bcel.jar ./mail.jar ./commons-codec-1.3.jar ./mysql-connector-java-5.0.3-bin.jar ./commons-discovery-0.2.jar ./saaj.jar ./commons-httpclient-3.0.jar ./sharepoint-wrapper-1.0.jar ./commons-logging-1.0.4.jar ./substance.jar ./confluence-xmlrpc-wrapper-v4.07.jar ./swing-layout-1.0.jar ./dom4j-1.4-full.jar ./treewrapper.jar ./forms_rt.jar ./wsdl4j-1.5.1.jar ./jakarta-oro-2.0.8.jar ./xmlrpc-2.0.1.jar"/>
</manifest>
</jar>
</target>
</project>