forked from uniba-dsg/betsy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
229 lines (178 loc) · 10.2 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
<project name="setup infrastructure" default="all" basedir=".">
<property environment="env"/>
<property name="download.dir" value="downloads"/>
<property name="download.base.url" value="https://svn.lspi.wiai.uni-bamberg.de/svn/betsy/"/>
<property name="tomcat.file.name" value="apache-tomcat-7.0.26-windows-x64.zip"/>
<property name="tomcat.download.url" value="${download.base.url}${tomcat.file.name}"/>
<property name="tomcat.name" value="apache-tomcat-7.0.26"/>
<property name="tomcat.dir" value="server/${tomcat.name}"/>
<property name="tomcat.webapps.dir" value="${tomcat.dir}/webapps"/>
<property name="tomcat.lib.dir" value="${tomcat.dir}/lib"/>
<property name="tomcat.startup.script.name" value="tomcat_startup.bat"/>
<property name="tomcat.shutdown.script.name" value="tomcat_shutdown.bat"/>
<property name="tomcat.startup.script" value="server/${tomcat.startup.script.name}"/>
<property name="tomcat.shutdown.script" value="server/${tomcat.shutdown.script.name}"/>
<property name="ode.file.name" value="apache-ode-war-1.3.5.zip"/>
<property name="ode.download.url" value="${download.base.url}${ode.file.name}"/>
<property name="ode.name" value="apache-ode-war-1.3.5"/>
<property name="ode.dir" value="server/ode"/>
<property name="ode.server.xml" value="src/main/resources/ode/server.xml"/>
<property name="ode.log4j.properties" value="src/main/resources/ode/log4j.properties"/>
<property name="bpelg.file.name" value="bpel-g.war"/>
<property name="bpelg.download.url" value="${download.base.url}${bpelg.file.name}"/>
<property name="bpelg.dir" value="server/bpelg"/>
<property name="bpelg.database.name" value="h2-1.2.122.jar"/>
<property name="bpelg.database.url" value="${download.base.url}${bpelg.database.name}"/>
<property name="bpelg.server.xml" value="src/main/resources/bpelg/server.xml"/>
<property name="bpelg.log4j.properties" value="src/main/resources/bpelg/log4j.properties"/>
<property name="orchestra.dir" value="server/orchestra"/>
<property name="orchestra.name" value="orchestra-cxf-tomcat-4.9.0"/>
<property name="orchestra.file.name" value="orchestra-cxf-tomcat-4.9.0.zip"/>
<property name="orchestra.download.url" value="${download.base.url}${orchestra.file.name}"/>
<property name="openesb.dir" value="server/openesb"/>
<property name="openesb.file.name" value="glassfishesb-v2.2-full-installer-windows.exe"/>
<property name="openesb.download.url"
value="${download.base.url}${openesb.file.name}"/>
<property name="petalsesb.dir" value="server/petalsesb"/>
<property name="petalsesb.file.name" value="petals-esb-distrib-4.0.zip"/>
<property name="petalsesb.download.url" value="${download.base.url}${petalsesb.file.name}"/>
<macrodef name="install-tomcat" description="installs tomcat at a specific directory">
<attribute name="dest"/>
<attribute name="additional-vm-param" default=""/>
<sequential>
<mkdir dir="${download.dir}"/>
<get dest="${download.dir}" skipexisting="true">
<url url="${tomcat.download.url}"/>
</get>
<delete dir="@{dest}"/>
<mkdir dir="@{dest}"/>
<unzip src="${download.dir}/${tomcat.file.name}" dest="@{dest}"/>
<echo file="@{dest}/${tomcat.startup.script.name}">
SET "CATALINA_OPTS=-Xmx3048M -XX:MaxPermSize=2048m @{additional-vm-param}"
cd ${tomcat.name}/bin && call startup.bat
</echo>
<echo file="@{dest}/${tomcat.shutdown.script.name}">
cd ${tomcat.name}/bin && call shutdown.bat
</echo>
</sequential>
</macrodef>
<target name="prepare">
<mkdir dir="${download.dir}"/>
</target>
<target name="openesb" description="Install OpenESB">
<get dest="${download.dir}" skipexisting="true">
<url url="${openesb.download.url}"/>
</get>
<delete dir="${openesb.dir}"/>
<mkdir dir="${openesb.dir}"/>
<property name="openesb.dir.absolute" location="${openesb.dir}"/>
<copy file="src/main/resources/openesb/state.xml.template" tofile="${openesb.dir}/state.xml">
<filterchain>
<replacetokens>
<token key="INSTALL_PATH" value="${openesb.dir.absolute}"/>
<token key="JDK_LOCATION" value="${env.JAVA_HOME}"/>
<token key="HTTP_PORT" value="8383"/>
<token key="HTTPS_PORT" value="8384"/>
</replacetokens>
</filterchain>
</copy>
<exec executable="cmd">
<arg value="/c"/>
<arg value="${basedir}/src/main/resources/openesb/reinstallGlassFish.bat"/>
<arg value="${basedir}/${download.dir}/${openesb.file.name}"/>
<arg value="${basedir}/${openesb.dir}/state.xml"/>
</exec>
</target>
<target name="petalsesb" description="Install Petals ESB">
<!-- delete petals esb dir fast and recreate afterwards-->
<delete dir="${petalsesb.dir}"/>
<mkdir dir="${petalsesb.dir}"/>
<get dest="${download.dir}" skipexisting="true">
<url url="${petalsesb.download.url}"/>
</get>
<unzip src="${download.dir}/${petalsesb.file.name}" dest="${petalsesb.dir}"/>
<unzip src="${petalsesb.dir}/petals-esb-distrib-4.0/esb/petals-esb-4.0.zip" dest="${petalsesb.dir}"/>
<!-- install bpel service engine and binding connector for soap messages -->
<copy file="${petalsesb.dir}/petals-esb-distrib-4.0/esb-components/petals-se-bpel-1.1.0.zip"
todir="${petalsesb.dir}/petals-esb-4.0/install"/>
<copy file="${petalsesb.dir}/petals-esb-distrib-4.0/esb-components/petals-bc-soap-4.1.0.zip"
todir="${petalsesb.dir}/petals-esb-4.0/install"/>
</target>
<target name="ode" description="Install Apache ODE">
<install-tomcat dest="${ode.dir}"/>
<get dest="${download.dir}" skipexisting="true">
<url url="${ode.download.url}"/>
</get>
<unzip src="${download.dir}/${ode.file.name}" dest="${ode.dir}"/>
<unzip src="${ode.dir}/${ode.name}/ode.war" dest="${ode.dir}/${tomcat.name}/webapps/ode"/>
<copy file="${ode.log4j.properties}" todir="${ode.dir}/${tomcat.name}/webapps/ode/WEB-INF/classes"
overwrite="true"/>
</target>
<target name="bpelg" description="Install Bpel-g">
<install-tomcat dest="${bpelg.dir}"
additional-vm-param="-Djavax.xml.soap.MessageFactory=org.apache.axis.soap.MessageFactoryImpl"/>
<get dest="${download.dir}" skipexisting="true">
<url url="${bpelg.download.url}"/>
</get>
<unzip src="${download.dir}/${bpelg.file.name}" dest="${bpelg.dir}/${tomcat.name}/webapps/bpel-g"/>
<copy file="${bpelg.log4j.properties}" todir="${bpelg.dir}/${tomcat.name}/webapps/bpel-g/WEB-INF"
overwrite="true"/>
<get dest="${download.dir}" skipexisting="true">
<url url="${bpelg.database.url}"/>
</get>
<!-- add missing h2 database to tomcat installation -->
<copy file="${download.dir}/${bpelg.database.name}"
tofile="${bpelg.dir}/${tomcat.name}/lib/${bpelg.database.name}"/>
</target>
<target name="orchestra" description="Install Orchestra">
<install-tomcat dest="${orchestra.dir}"/>
<get dest="${download.dir}" skipexisting="true">
<url url="${orchestra.download.url}"/>
</get>
<unzip src="${download.dir}/${orchestra.file.name}" dest="${orchestra.dir}"/>
<!-- set properties to custom tomcat installation (not the one included) -->
<propertyfile file="${orchestra.dir}/${orchestra.name}/conf/install.properties">
<entry key="catalina.home" value="../apache-tomcat-7.0.26"/>
</propertyfile>
<!-- configure orchestra to use custom tomcat installation -->
<ant target="install" dir="${orchestra.dir}/${orchestra.name}"/>
</target>
<target name="jbpmbpel" description="Install jBPM BPEL">
<get dest="${download.dir}" skipexisting="true">
<url url="https://svn.lspi.wiai.uni-bamberg.de/svn/betsy/jbpm-bpel-1.1.1.zip"/>
</get>
<get dest="${download.dir}" skipexisting="true">
<url url="https://svn.lspi.wiai.uni-bamberg.de/svn/betsy/jboss-4.2.3.GA.zip"/>
</get>
<delete dir="server/jbpmbpel"/>
<unzip src="${download.dir}/jboss-4.2.3.GA.zip" dest="server/jbpmbpel"/>
<unzip src="${download.dir}/jbpm-bpel-1.1.1.zip" dest="server/jbpmbpel"/>
<!-- set properties to custom tomcat installation (not the one included) -->
<propertyfile file="server/jbpmbpel/jbpm-bpel-1.1.1/config/build.properties">
<entry key="software.installation.dir" value="../../"/>
</propertyfile>
<ant target="deploy.ear" antfile="server/jbpmbpel/jbpm-bpel-1.1.1/deploy/build.xml" usenativebasedir="yes"/>
<echo file="server/jbpmbpel/startup.bat">
cd jboss-4.2.3.GA/bin && start run.bat
</echo>
<copy file="server/jbpmbpel/jboss-4.2.3.GA/client/jaxb-api.jar"
todir="server/jbpmbpel/jboss-4.2.3.GA/lib/endorsed"/>
<copy file="server/jbpmbpel/jboss-4.2.3.GA/client/jboss-jaxrpc.jar"
todir="server/jbpmbpel/jboss-4.2.3.GA/lib/endorsed"/>
<copy file="server/jbpmbpel/jboss-4.2.3.GA/client/jboss-jaxws.jar"
todir="server/jbpmbpel/jboss-4.2.3.GA/lib/endorsed"/>
<copy file="server/jbpmbpel/jboss-4.2.3.GA/client/jboss-jaxws-ext.jar"
todir="server/jbpmbpel/jboss-4.2.3.GA/lib/endorsed"/>
<copy file="server/jbpmbpel/jboss-4.2.3.GA/client/jboss-saaj.jar"
todir="server/jbpmbpel/jboss-4.2.3.GA/lib/endorsed"/>
</target>
<target name="printEnvironmentVariables">
<property environment="env"/>
<echoproperties/>
</target>
<target name="all" depends="ode, bpelg, orchestra, openesb, petalsesb" description="Install all BPEL engines"/>
<target name="clean">
<delete dir="downloads"/>
<delete dir="server"/>
</target>
</project>