forked from apromore/ApromoreCore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
388 lines (347 loc) · 18.7 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
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright © 2009-2016 The Apromore Initiative.
~
~ This file is part of "Apromore".
~
~ "Apromore" is free software; you can redistribute it and/or modify
~ it under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 3 of the
~ License, or (at your option) any later version.
~
~ "Apromore" is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this program.
~ If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>.
-->
<project name="Apromore - Eclipse Virgo Deployment" default="deploy-virgo">
<description>
Supports deployment of Apromore to Eclipse Virgo.
</description>
<!-- Folders used to build and deploy dependencies for Apromore. -->
<property name="dir-sups" location="${basedir}/Supplements"/>
<property name="dir-sups-lib" location="${dir-sups}/libraries"/>
<property name="dir-extras" location="${basedir}/Apromore-Extras"/>
<property name="dir-extras-build-tools" location="${dir-extras}/Build-Tools"/>
<property name="dir-extras-test-tools" location="${dir-extras}/Test-Tools"/>
<!-- URL of the automatically downloaded and installed Eclipse Virgo -->
<property name="virgo-url" value="https://github.com/apromore/ApromoreDev/blob/master/software/virgo-tomcat-server-3.6.2.RELEASE.zip?raw=true"/>
<property name="dir-deployment" location="${basedir}/Apromore-Assembly"/>
<property name="dir-virgo" location="${dir-deployment}/virgo-tomcat-server-3.6.2.RELEASE"/>
<!-- Locations of all the plugins. as they should be separate to the Web App PAR. -->
<property name="dir-plugins" location="${basedir}/Apromore-Plugins/"/>
<property name="dir-annotation" location="${basedir}/Apromore-Plugins/plugin-annotation/"/>
<property name="dir-canoniser" location="${basedir}/Apromore-Plugins/plugin-canoniser/"/>
<property name="dir-editor-plugins" location="${basedir}/Apromore-Plugins/plugin-editor/"/>
<property name="dir-logic-plugins" location="${basedir}/Apromore-Plugins/plugin-logic/"/>
<property name="dir-portal-plugins" location="${basedir}/Apromore-Plugins/plugin-portal/"/>
<property name="dir-portal-templates" location="${basedir}/Apromore-Plugins/plugin-templates/"/>
<property name="dir-deploy" location="${basedir}/Apromore-Plugins/plugin-deployment/"/>
<property name="dir-osgi" location="${basedir}/Apromore-OSGI-Bundles/"/>
<fileset id="pickupRepo" dir=".">
<include name="Apromore-Assembly/Manager-Assembly/src/main/resources/100-manager.plan"/>
<include name="Apromore-Assembly/Portal-Assembly/src/main/resources/101-portal.plan"/>
<include name="Apromore-Assembly/Filestore-Assembly/src/main/resources/102-filestore.plan"/>
<include name="Apromore-Assembly/Editor-Assembly/src/main/resources/104-editor.plan"/>
<include name="BPMNDiagramImporter-Logic/target/bpmndiagramimporter-logic-1.1.jar"/>
<include name="Cmapper-Portal-Plugin/target/cmapper-portal-plugin-1.1.war"/>
<!-- BPMNMiner renamed ~BPMNMiner elsewhere as a workaround for its dependency on IBPStruct
<include name="BPMNMiner-Logic/target/bpmnminer-logic-1.1.jar"/>
<include name="BPMNMiner-Portal-Plugin/target/bpmnminer-portal-plugin-1.1.jar"/>
-->
<include name="Compare-Logic/target/compare-logic-1.1.jar"/>
<include name="Compare-Portal-Plugin/target/compareBP-portal-plugin-1.1.jar"/>
<include name="IBPStruct-Logic/target/ibpstruct-logic-1.1.jar"/>
<include name="IBPStruct-Portal-Plugin/target/ibpstruct-portal-plugin-1.1.jar"/>
<!-- ibpstruct-editor-plugin renamed ~ibpstruct-editor-plugin elsewhere as a workaround for its dependency upon ibpstruct-logic
<include name="Apromore-Plugins/plugin-editor/ibpstruct/target/ibpstruct-editor-plugin-1.1.war"/>
-->
<include name="Metrics-Logic/target/metrics-logic-1.1.jar"/>
<include name="Metrics-Portal-Plugin/target/metrics-portal-plugin-1.1.jar"/>
<!-- metrics-editor-plugin renamed ~metrics-editor-plugin elsewhere as a workaround for its dependency upon metrics-logic
<include name="Apromore-Plugins/plugin-editor/metrics/target/metrics-editor-plugin-1.1.war"/>
-->
<include name="ProDrift-Logic/target/prodrift-logic-1.1.jar"/>
<include name="ProDrift-Portal-Plugin/target/prodrift-portal-plugin-1.1.jar"/>
<include name="Quaestio-Portal-Plugin/target/quaestio-portal-plugin-1.1.war"/>
<include name="Similarity-Clusters-Portal-Plugin/target/similarity-clusters-portal-plugin-1.1.jar"/>
<!-- After creating the PQL tables in MySQL, uncomment these components to enable PQL indexing and querying
<include name="APQL-Portal-Plugin/target/apql-portal-plugin-1.1.war"/>
<include name="Apromore-Assembly/PQL-Indexer-Assembly/src/main/resources/103-pql-indexer.plan"/>
<include name="PQL-Logic/target/pql-logic-1.1.jar"/>
<include name="PQL-Logic-WS/target/pql-logic-ws-1.1.war"/>
<include name="PQL-Portal-Plugin/target/pql-portal-plugin-1.1.jar"/>
-->
</fileset>
<fileset id="usrRepo" dir=".">
<include name="Apromore-Assembly/**/repository/usr/*.jar"/>
<include name="Apromore-Assembly/**/repository/usr/*.war"/>
<include name="site.properties"/>
</fileset>
<!-- Virgo Related -->
<target name="setup-virgo" depends="download-virgo, configure-virgo"/>
<target name="check-virgo">
<condition property="virgo.installed">
<available file="${dir-virgo}" type="dir"/>
</condition>
</target>
<target name="download-virgo" depends="check-virgo" unless="virgo.installed">
<mkdir dir="${dir-deployment}"/>
<get src="${virgo-url}" dest="${dir-deployment}/virgo.zip"/>
<unzip src="${dir-deployment}/virgo.zip" dest="${dir-deployment}"/>
<delete file="${dir-deployment}/virgo.zip"/>
</target>
<target name="configure-virgo" depends="check-virgo">
<copy todir="${dir-virgo}/repository/ext" overwrite="true">
<fileset dir="Supplements/Virgo">
<filename name="org.eclipse.virgo.web.properties"/>
</fileset>
</copy>
<copy todir="${dir-virgo}/configuration" overwrite="true">
<fileset dir="Supplements/Virgo">
<include name="tomcat-server.xml"/>
<include name="java6-server.profile"/>
</fileset>
</copy>
<chmod file="${dir-virgo}/bin/*.sh" perm="ugo+rx" osfamily="unix"/>
</target>
<target name="clean-virgo" depends="check-virgo" if="virgo.installed">
<delete includeemptydirs="true">
<fileset dir="${dir-virgo}">
<include name="repository/usr/*.jar"/>
</fileset>
</delete>
<delete includeemptydirs="true">
<fileset dir="${dir-virgo}">
<include name="logs/*"/>
</fileset>
</delete>
<delete includeemptydirs="true">
<fileset dir="${dir-virgo}">
<include name="pickup/*.jar"/>
<include name="pickup/*.war"/>
<include name="pickup/*.par"/>
<include name="pickup/*.plan"/>
<exclude name="pickup/org.eclipse.virgo.apps.repository_3.6.2.RELEASE.par"/>
<exclude name="pickup/org.eclipse.virgo.apps.splash_3.6.2.RELEASE.jar"/>
<exclude name="pickup/org.eclipse.virgo.management.console_3.6.2.RELEASE.jar"/>
</fileset>
</delete>
</target>
<target name="dist-virgo" depends="clean-virgo, setup-virgo, copy-virgo, deploy-virgo">
<zip destfile="Apromore.zip" includes="${dir-virgo}/*"/>
</target>
<target name="deploy-virgo" depends="clean-virgo, setup-virgo, copy-virgo"/>
<target name="set-permissions" depends="setup-virgo">
<chmod file="${dir-virgo}/bin/*.sh" perm="ugo+rx" osfamily="unix"/>
</target>
<target name="clean-start-virgo" depends="set-permissions">
<exec dir="${dir-virgo}/bin/" executable="cmd" osfamily="windows">
<arg value="/c"/>
<arg value="startup.bat"/>
<arg line="-clean"/>
</exec>
<exec dir="${dir-virgo}/bin/" executable="./startup.sh" osfamily="unix">
<arg line="-clean"/>
</exec>
</target>
<target name="start-virgo" depends="set-permissions,copy-virgo">
<exec dir="${dir-virgo}/bin/" executable="cmd" osfamily="windows">
<arg value="/c"/>
<arg value="startup.bat"/>
<arg line="-clean"/>
</exec>
<exec dir="${dir-virgo}/bin/" executable="./startup.sh" osfamily="unix">
<arg line="-clean"/>
</exec>
</target>
<target name="debug-virgo" depends="set-permissions,copy-virgo">
<exec dir="${dir-virgo}/bin/" executable="cmd" osfamily="windows">
<arg value="/c"/>
<arg value="startup.bat"/>
<arg line="-clean -debug 8002"/>
</exec>
<exec dir="${dir-virgo}/bin/" executable="./startup.sh" osfamily="unix">
<arg line="-clean -debug"/>
</exec>
</target>
<target name="debug" depends="set-permissions">
<exec dir="${dir-virgo}/bin/" executable="cmd" osfamily="windows">
<arg value="/c"/>
<arg value="startup.bat"/>
<arg line="-clean -debug"/>
</exec>
<exec dir="${dir-virgo}/bin/" executable="./startup.sh" osfamily="unix">
<arg line="-clean -debug"/>
</exec>
</target>
<target name="stop-virgo" depends="setup-virgo">
<exec dir="${dir-virgo}/bin/" executable="cmd" osfamily="windows">
<arg value="/c"/>
<arg value="shutdown.bat"/>
</exec>
<exec dir="${dir-virgo}/bin/" executable="./shutdown.sh" osfamily="unix">
</exec>
</target>
<target name="copy-virgo" depends="clean-virgo">
<copy todir="${dir-virgo}/repository/usr" flatten="true" overwrite="true">
<fileset dir="${dir-osgi}">
<include name="**/target/bpmntk-osgi-1.0.jar"/>
<include name="**/target/similaritysearch-osgi-1.1.jar"/>
<include name="**/target/eventstr-confchecking-osgi-1.0.jar"/>
<include name="**/target/uma-bpdiff-osgi-1.1.jar"/>
<include name="**/target/pnapi-bpdiff-osgi-1.1.jar"/>
<!-- the PQL subsystem will add this, so it normally won't need to be done explicitly
<include name="**/target/json-osgi-20090211.jar"/>
-->
</fileset>
<!-- This bundle is a dependency for the eventstr-confchecking-code-osgi bundle, which is in turn used by Compare-Logic -->
<fileset dir="Supplements/">
<include name="org.apache.servicemix.bundles.gwt-dev-2.6.0_1.jar"/>
</fileset>
</copy>
<copy todir="${dir-virgo}/repository/usr" flatten="true" overwrite="true">
<fileset refid="usrRepo"/>
</copy>
<copy todir="${dir-virgo}/pickup" flatten="true" overwrite="true">
<fileset refid="pickupRepo"/>
</copy>
<!-- Force the BPMN Miner plugin to be alphabetically after the iBPStruct plugin it depends upon -->
<copy file="BPMNMiner-Logic/target/bpmnminer-logic-1.1.jar" tofile="${dir-virgo}/pickup/~bpmnminer-logic-1.1.jar"/>
<copy file="BPMNMiner-Portal-Plugin/target/bpmnminer-portal-plugin-1.1.jar" tofile="${dir-virgo}/pickup/~bpmnminer-portal-plugin-1.1.jar"/>
<!-- Force the editor plugins to be alphabetically after the logic plugins they depends upon -->
<copy file="Apromore-Plugins/plugin-editor/ibpstruct/target/ibpstruct-editor-plugin-1.1.war" tofile="${dir-virgo}/pickup/~ibpstruct-editor-plugin-1.1.war"/>
<copy file="Apromore-Plugins/plugin-editor/metrics/target/metrics-editor-plugin-1.1.war" tofile="${dir-virgo}/pickup/~metrics-editor-plugin-1.1.war"/>
<copy todir="${dir-virgo}/pickup" flatten="true" overwrite="true">
<fileset dir="${dir-annotation}">
<include name="**/target/*.jar"/>
<exclude name="**/target/*-sources.jar"/>
<exclude name="**/core/**/*.jar"/>
</fileset>
<fileset dir="${dir-canoniser}">
<include name="**/target/*.jar"/>
<exclude name="**/target/*-sources.jar"/>
<exclude name="**/core/**/*.jar"/>
</fileset>
<!--<fileset dir="${dir-portal-templates}">-->
<!--<include name="**/target/*.jar"/>-->
<!--<exclude name="**/target/*-sources.jar"/>-->
<!--<exclude name="**/core/**/*.jar"/>-->
<!--</fileset>-->
<fileset dir="${dir-logic-plugins}">
<include name="**/target/*.jar"/>
<exclude name="**/target/*-sources.jar"/>
<exclude name="**/core/**/*.jar"/>
</fileset>
<fileset dir="${dir-portal-plugins}">
<include name="**/target/*.jar"/>
<exclude name="**/target/*-sources.jar"/>
<exclude name="**/core/**/*.jar"/>
<exclude name="sample/target/*.jar"/>
</fileset>
<!--
<fileset dir="${dir-editor-plugins}">
<include name="**/target/*.war"/>
<exclude name="**/target/*-sources.jar"/>
<exclude name="**/core/**/*.jar"/>
</fileset>
-->
<fileset dir="${dir-deploy}">
<include name="**/target/*.jar"/>
<exclude name="**/target/*-sources.jar"/>
<exclude name="**/core/**/*.jar"/>
</fileset>
</copy>
<!-- PQL indexing bot -->
<copy file="Apromore-Extras/PQLBot/target/pql-bot-1.2.one-jar.jar" tofile="${dir-virgo}/pql-bot.jar" overwrite="true"/>
</target>
<target name="create-h2">
<delete>
<fileset dir="Apromore-Assembly" includes="Manager-Repository.*"/>
</delete>
<java classname="org.h2.tools.RunScript">
<classpath>
<pathelement location="Apromore-Assembly/Manager-Assembly/target/repository/usr/h2-1.2.128.jar"/>
</classpath>
<arg value="-url"/>
<arg value="jdbc:h2:Apromore-Assembly/Manager-Repository"/>
<arg value="-script"/>
<arg file="Apromore-Manager/src/test/resources/database/db-h2.sql"/>
</java>
<java classname="org.h2.tools.RunScript">
<classpath>
<pathelement location="Apromore-Assembly/Manager-Assembly/target/repository/usr/h2-1.2.128.jar"/>
</classpath>
<arg value="-url"/>
<arg value="jdbc:h2:Apromore-Assembly/Manager-Repository"/>
<arg value="-script"/>
<arg file="Apromore-Manager/src/test/resources/database/db-data.sql"/>
</java>
</target>
<target name="install-sample-data">
<java jar="Supplements/cpfImporter/target/cpfImporter-1.0.one-jar.jar" fork="yes">
<!-- Configurable BPMN samples -->
<arg value="-manager"/> <arg value="http://localhost:9000/manager/services/manager"/>
<arg value="-from"/> <arg value="Apromore-Extras/bpmncmap/src/test/resources"/>
<arg value="-to"/> <arg value="airport"/>
<arg value="International departure.bpmn"/>
<arg value="1 Terminal entry.bpmn"/>
<arg value="1x Manage LAGs in belongings.bpmn"/>
<arg value="2 Check-in.bpmn"/>
<arg value="2x Finalise Check-in.bpmn"/>
<arg value="2x Get restricted items checked.bpmn"/>
<arg value="2x Get tourist refund items checked.bpmn"/>
<arg value="2x Perform baggage check in.bpmn"/>
<arg value="2x Perform preliminary check in.bpmn"/>
<arg value="2x Request change of name.bpmn"/>
<arg value="3 Security.bpmn"/>
<arg value="3x Undergo Secondary screening.bpmn"/>
<arg value="3x Undergo preparation.bpmn"/>
<arg value="3x Undergo security checks.bpmn"/>
<arg value="4 Customs and Immigration.bpmn"/>
<arg value="4x Evaluate Validity.bpmn"/>
<arg value="4x Undergo customs and immigration checks.bpmn"/>
<arg value="5 Boarding.bpmn"/>
<arg value="5x Proceed through boarding checks.bpmn"/>
<arg value="6 Travel document acquisition.bpmn"/>
<arg value="7 LAGs.bpmn"/>
<arg value="91 Discretionary experience 1.bpmn"/>
<arg value="92 Discretionary experience 2.bpmn"/>
<arg value="93 Discretionary experience 3.bpmn"/>
<arg value="94 Discretionary experience 4.bpmn"/>
<!-- PQL samples -->
<arg value="-from"/> <arg value="Supplements/samples/pql"/>
<arg value="-to"/> <arg value="pql"/>
<arg value="1.pnml"/>
<arg value="2.pnml"/>
<arg value="3.pnml"/>
<arg value="4.pnml"/>
<arg value="5.pnml"/>
<arg value="6.pnml"/>
<arg value="7.pnml"/>
<arg value="8.pnml"/>
<arg value="9.pnml"/>
<arg value="10.pnml"/>
<!-- Log animation samples -->
<arg value="-from"/> <arg value="Supplements/samples/repairExample"/>
<arg value="-to"/> <arg value="repair"/>
<arg value="repairExample.bpmn"/>
</java>
<copy todir="Apromore-Assembly/Filestore-Repository" overwrite="yes" verbose="true">
<!-- Configurable BPMN samples -->
<fileset dir="Apromore-Extras/bpmncmap/src/test/resources">
<include name="*.cmap"/>
<include name="*.qml"/>
</fileset>
<!-- Log animation samples -->
<fileset dir="Supplements/samples/repairExample">
<include name="RepairExample20140901103825.mxml"/>
<include name="repairExample_complete_lifecycle_only.xes"/>
</fileset>
</copy>
</target>
</project>