-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild-script.sh
342 lines (299 loc) · 11.7 KB
/
build-script.sh
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
#!/bin/bash
#Script to build Bonita BPM from GitHub sources
# sudo apt-get install maven openjdk-7-jdk icedtea-7-jre-jamvm
#reste à faire:
# ajouter la gestion des erreurs
# tester que ça marche en partant de rien, donc en ré-initialisant maven
# ajouter les langues depuis Crowdin pour builder avec les dernières traductions
#start
#test that java, git and maven are installed
for req in git java mvn
do
which $req
if [ $? -eq 0 ]
then
echo "req $req ok"
else
echo "req $req ko, please install $req"
exit 1
fi
done
#Create folder for files
mkdir BonitaBPM-build
cd BonitaBPM-build
# jms.jar Needed at least for Bonita Engine
wget http://download.java.net/glassfish/4.0/release/glassfish-4.0.zip
unzip glassfish-4.0.zip
mvn install:install-file -Dfile=glassfish4/mq/lib/jms.jar -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -DgeneratePom=true
#**** BUILD SIMULATION MODULE ****
git clone https://github.com/bonitasoft/bonita-simulation.git
cd bonita-simulation
# Replace 'bos-simulation-6.1.0' by the tag you want to build
git checkout bos-simulation-6.1.0
mvn clean install -DskipTests
cd ..
#**** BUILD ENGINE MODULE ****
git clone https://github.com/bonitasoft/bonita-engine.git
cd bonita-engine
# Replace '6.1.0' by the tag you want to build
git checkout 6.2.1
mvn clean install -DskipTests=true -P package
git checkout 6.1.0
mvn clean install -DskipTests=true -P package
cd ..
#**** BUILD USERFILTERS MODULE ****
git clone https://github.com/bonitasoft/bonita-userfilters.git
cd bonita-userfilters
# Replace '6.1.0' by the tag you want to build
git checkout 6.2.1
mvn clean install -DskipTests
cd ..
#**** BUILD CONNECTORS MODULE ****
git clone https://github.com/bonitasoft/bonita-connectors.git
cd bonita-connectors
# Replace 'bonita-connectors-6.1.0' by the tag you want to build
git checkout bonita-connectors-6.1.0
mvn clean install -DskipTests
#Connectors might have different version of this module as a dependency
git checkout bonita-connectors-6.1.1
mvn clean install -DskipTests
cd ..
#**** BUILD CONNECTORS ASSEMBLY MODULE ****
git clone https://github.com/bonitasoft/bonita-connectors-assembly.git
cd bonita-connectors-assembly
# Replace 'bonita-connectors-assembly-6.1.0' by the tag you want to build
git checkout bonita-connectors-assembly-6.1.0
mvn clean install -DskipTests
cd ..
#**** BUILD GOOGLE CALENDAR CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-googlecalendar.git
cd bonita-connector-googlecalendar
# Replace 'bonita-connector-googlecalendar-6.1.0' by the tag
# you want to build
git checkout bonita-connector-googlecalendar-6.1.0
# add Google gdata .jar files to Maven
mvn install:install-file -Dfile=bonita-connector-googlecalendar-common/lib/gdata-calendar-2.0.jar -DgroupId=com.google.gdata -DartifactId=gdata-calendar -Dversion=2.0 -Dpackaging=jar -DgeneratePom=true
mvn install:install-file -Dfile=bonita-connector-googlecalendar-common/lib/gdata-core-1.0.jar -DgroupId=com.google.gdata -DartifactId=gdata-core -Dversion=1.0 -Dpackaging=jar -DgeneratePom=true
mvn install:install-file -Dfile=bonita-connector-googlecalendar-common/lib/gdata-client-1.0.jar -DgroupId=com.google.gdata -DartifactId=gdata-client -Dversion=1.0 -Dpackaging=jar -DgeneratePom=true
mvn install:install-file -Dfile=bonita-connector-googlecalendar-common/lib/google-collect-1.0-rc1.jar -DgroupId=com.google.common -DartifactId=google-collect -Dversion=1.0-rc1 -Dpackaging=jar -DgeneratePom=true
mvn clean install -DskipTests
cd ..
#**** BUILD ALFRESCO CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-alfresco.git
cd bonita-connector-alfresco
# Replace 'bonita-connector-alfresco-6.1.0' by the tag you want to build
git checkout bonita-connector-alfresco-6.1.0
mvn clean install -DskipTests
cd ..
#**** BUILD DATABASE CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-database.git
cd bonita-connector-database
# Replace 'bonita-connector-database-6.1.0' by the tag you want to build
git checkout bonita-connector-database-6.1.1
sed -i "s/6.1.1-rc-01/6.1.0/g" pom.xml
mvn clean install -DskipTests
cd ..
#**** BUILD EMAIL CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-email.git
cd bonita-connector-email
# Replace 'bonita-connector-email-6.1.0' by the tag you want to build
git checkout bonita-connector-email-6.1.0
mvn clean install -DskipTests
cd ..
#**** BUILD JASPER CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-jasper.git
cd bonita-connector-jasper
# Replace 'bonita-connector-jasper-6.1.0' by the tag you want to build
git checkout bonita-connector-jasper-6.1.0
mvn clean install -DskipTests
cd ..
#**** BUILD SALESFORCE CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-salesforce.git
cd bonita-connector-salesforce
# Replace 'bonita-connector-salesforce-6.1.0' by the tag
# you want to build
git checkout bonita-connector-salesforce-6.1.0
mvn clean install -DskipTests
cd ..
#**** BUILD SAP CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-sap.git
cd bonita-connector-sap
# add sapjco.jar file to Maven
# Replace 'bonita-connector-sap-6.1.0' by the tag you want to build
git checkout bonita-connector-sap-6.1.0
cp bonita-connector-sap-jco2-impl/lib/com/sap/sapjco/1.0/sapjco-1.0.jar sapjco-1.0.jar
mvn install:install-file -Dfile=sapjco-1.0.jar -DgroupId=com.sap -DartifactId=sapjco -Dversion=2.1.9 -Dpackaging=jar -DgeneratePom=true
mvn clean install -DskipTests
cd ..
#**** BUILD SCRIPTING CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-scripting.git
cd bonita-connector-scripting
# Replace 'bonita-connector-scripting-6.1.0' by the tag you want to build
git checkout bonita-connector-scripting-6.1.0
mvn clean install -DskipTests
cd ..
#**** BUILD SUGARCRM CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-sugarcrm.git
cd bonita-connector-sugarcrm
# Replace 'bonita-connector-sugarcrm-6.1.0' by the tag you want to build
git checkout bonita-connector-sugarcrm-6.1.0
mvn clean install -DskipTests
cd ..
#**** BUILD TALEND CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-talend.git
cd bonita-connector-talend
# Replace 'bonita-connector-talend-6.1.0' by the tag you want to build
git checkout bonita-connector-talend-6.1.0
mvn clean install -DskipTests
cd ..
#**** BUILD WEBSERVICE CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-webservice.git
cd bonita-connector-webservice
# Replace 'bonita-connector-webservice-6.1.0' by the tag
# you want to build
git checkout bonita-connector-webservice-6.1.0
mvn clean install -DskipTests
cd ..
#**** BUILD CMIS CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-cmis.git
cd bonita-connector-cmis
# Replace 'bonita-connector-cmis-6.1.0' by the tag
# you want to build
git checkout bonita-connector-cmis-6.1.0
mvn clean install -DskipTests
cd ..
#**** BUILD LDAP CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-ldap.git
cd bonita-connector-ldap
# Replace 'bonita-connector-ldap-6.1.0' by the tag
# you want to build
git checkout bonita-connector-ldap-6.1.0
mvn clean install -DskipTests
cd ..
#**** BUILD TWITTER CONNECTOR MODULE ****
git clone https://github.com/bonitasoft/bonita-connector-twitter.git
cd bonita-connector-twitter
# Replace 'master' by the tag
# you want to build
git checkout development
sed -i "s/6.1.0-SNAPSHOT/6.1.0/g" pom.xml
sed -i "s/6.1.0-SNAPSHOT/6.1.0/g" bonita-connector-twitter-common/pom.xml
sed -i "s/6.1.0-SNAPSHOT/6.1.0/g" bonita-connector-twitter-direct-def/pom.xml
sed -i "s/6.1.0-SNAPSHOT/6.1.0/g" bonita-connector-twitter-direct-impl/pom.xml
sed -i "s/6.1.0-SNAPSHOT/6.1.0/g" bonita-connector-twitter-update-def/pom.xml
sed -i "s/6.1.0-SNAPSHOT/6.1.0/g" bonita-connector-twitter-update-impl/pom.xml
mvn clean install -DskipTests
cd ..
#**** BUILD CONNECTORS PACKAGE MODULE ****
git clone https://github.com/bonitasoft/bonita-connectors-packaging.git
cd bonita-connectors-packaging
# Replace 'bonita-connectors-packaging-6.1.0' by the tag
# you want to build
git checkout bonita-connectors-package-6.1.1
mvn clean install -DskipTests
cd ..
#**** BUILD THEME BUILDER MODULE ****
git clone https://github.com/bonitasoft/bonita-theme-builder.git
cd bonita-theme-builder
# Replace 'bonita-connectors-packaging-6.1.0' by the tag
# you want to build
git checkout 6.1.0
mvn clean install -DskipTests
cd ..
#**** BUILD TOMCAT H2 LISTENER MODULE ****
git clone https://github.com/bonitasoft/bonita-tomcat-h2-listener.git
cd bonita-tomcat-h2-listener
# Replace 'bonita-tomcat-h2-listener-1.0.1' by the tag you want to build
git checkout bonita-tomcat-h2-listener-1.0.1
mvn clean install -DskipTests
cd ..
#**** BUILD JBOSS H2 BEAN LISTENER MODULE ****
git clone https://github.com/bonitasoft/bonita-jboss-h2-mbean.git
cd bonita-jboss-h2-mbean
# Replace 'bonita-jboss-h2-mbean-1.0.0' by the tag you want to build
git checkout bonita-jboss-h2-mbean-1.0.0
mvn clean install -DskipTests
cd ..
#**** BUILD TOMCAT VALVE MODULE ****
git clone https://github.com/bonitasoft/bonita-tomcat-valve.git
cd bonita-tomcat-valve
git checkout CoreProduct
mvn clean install -DskipTests
cd ..
#**** BUILD STUDIO WATCHDOG MODULE ****
git clone https://github.com/bonitasoft/bonita-studio-watchdog.git
cd bonita-studio-watchdog
git checkout studio-watchdog-6.0.1
mvn clean install -DskipTests
cd ..
#**** BUILD GWT TOOLS MODULE ****
git clone https://github.com/bonitasoft/bonita-gwt-tools.git
cd bonita-gwt-tools
git checkout master
mvn clean install -DskipTests
cd ..
#**** BUILD WEB MODULE ****
git clone https://github.com/bonitasoft/bonita-web.git
cd bonita-web
# Replace '6.1.0' by the tag you want to build
git checkout 6.2.1
sed '244s/<repository>/<!-- <repository>/' -i pom.xml
sed '257s/<\/repository>/<\/repository> -->/' -i pom.xml
mvn clean install -DskipTests
cd ..
#**** BUILD BONITA DISTRIB MODULE ****
git clone https://github.com/bonitasoft/bonita-distrib.git
cd bonita-distrib
# Replace '6.1.0' by the tag you want to build
git checkout 6.2.1
mvn clean install -DskipTests
cd ..
#****BUILD STUDIO - COMMON ACTION ****
# Prerequisite step for building any of the Studio modules listed below
# You must have a correct target platform, available at http://download.forge.ow2.org/bonita/TargetPlatform-6.1.zip
wget http://download.forge.ow2.org/bonita/TargetPlatform-6.1.zip
unzip TargetPlatform-6.1.zip
DIR=`pwd`
# You might need to increase max perm size of maven
export MAVEN_OPTS="-XX:MaxPermSize=256m"
git clone https://github.com/bonitasoft/bonita-studio.git
cd bonita-studio
# Replace '6.1.0' by the tag you want to build
git checkout bos-studio-6.2.1-201401090931
#**** BUILD STUDIO PLATFORM MODULE ****
cd platform
mvn clean install -Pmirrored -Dp2MirrorUrl=file://$DIR/6.1/
cd ..
#**** BUILD STUDIO PATCHED PLUGINS MODULE ****
cd patched-plugins
mvn clean install
cd ..
#**** GENERATE STUDIO MODELS SOURCES ****
cd bundles/plugins/org.bonitasoft.studio-models/
# Replace '6.1.0' by the tag you want to build
mvn clean initialize -Pgenerate -Dp2MirrorUrl=file://$DIR/6.1/
cd ../../..
#**** BUILD STUDIO BUNDLES MODULE ****
cd bundles
mvn clean install
cd ..
#**** BUILD STUDIO I18N BUNDLES MODULE ****
cd translations
mvn clean install
cd ..
#**** BUILD STUDIO ALL-IN-ONE MODULE ****
cd all-in-one
# If you also want to build the installers, you need to provide a correct installation of Bitrock and
# set the BITROCK_HOME system property
mvn clean package
cd ../..
echo '---------------------------'
echo ''
echo 'You just finished to build Bonita BPM. Congratulations !!!'
echo 'You you can find it in:'
echo ''
echo 'BonitaBPM-build/bonita-studio/all-in-one/target/BonitaBPMCommunity-6.2.1'
echo ''
echo '---------------------------'
echo ''
#end