-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
137 lines (108 loc) · 4.71 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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="opengse" default="help">
<property name="opengse.jar" value="${basedir}/engines/minigse/opengse.jar"/>
<property name="webapps.dir" value="${basedir}/testing/server-side/webapps"/>
<property name="tomcat.version" value="apache-tomcat-6.0.18"/>
<property name="tomcat.dir" value="${basedir}/engines/${tomcat.version}"/>
<property name="tomcat.zip" value="${basedir}/engines/${tomcat.version}.zip"/>
<property name="tomcat.bootstrap.jar" value="${tomcat.dir}/bin/bootstrap.jar"/>
<property name="jetty.version" value="jetty-6.1.15.rc3"/>
<property name="jetty.dir" value="${basedir}/engines/${jetty.version}"/>
<property name="jetty.logs.dir" value="${basedir}/engines/${jetty.version}-logs"/>
<property name="jetty.zip" value="${basedir}/engines/${jetty.version}.zip"/>
<property name="jetty.start.jar" value="${jetty.dir}/start.jar"/>
<target name="help">
<echo>
Helpful targets:
build-minigse: Creates the opengse.jar file in ${basedir}/engines/minigse
Use this "mini" servlet engine to run the server-side tests
build-wars: Creates the war files used for server-side testing. These
war files can be deployed in any servlet engine (not just the "mini" servlet engine)
deploy-wars-in-mini-engine: Deploys the war files used for server-side testing
in the "mini" servlet engine
deploy-wars-in-tomcat: Deploys the war files used for server-side testing
in the ${tomcat.version} servlet engine
deploy-wars-in-jetty: Deploys the war files used for server-side testing
in the ${jetty.version} servlet engine
</echo>
</target>
<target name="build-minigse">
<ant dir="${basedir}/engines/minigse"/>
</target>
<target name="build-wars">
<ant dir="${basedir}/testing/server-side/webapps-src"/>
</target>
<target name="deploy-wars-in-mini-engine">
<available property="opengse.jar.exists" file="${opengse.jar}"/>
<fail unless="opengse.jar.exists"
message="Cannot find ${opengse.jar} please build it with the build-minigse target"/>
<java
jar="${opengse.jar}"
fork="true"
>
<arg value="--webapps=${basedir}/testing/server-side/webapps"/>
<arg value="--port=8080"/>
</java>
</target>
<target name="check-if-tomcat-is-unzipped">
<available property="tomcat.is.unzipped" file="${tomcat.dir}"/>
</target>
<target name="unzip-tomcat-distribution" depends="check-if-tomcat-is-unzipped" unless="tomcat.is.unzipped">
<echo>
unzipping tomcat...
</echo>
<unzip dest="${basedir}/engines" src="${tomcat.zip}">
</unzip>
</target>
<target name="deploy-wars-in-tomcat" depends="unzip-tomcat-distribution">
<echo>
Deploying tomcat in ${tomcat.dir}
</echo>
<available property="bootstrap.jar.exists" file="${tomcat.bootstrap.jar}"/>
<fail unless="bootstrap.jar.exists"
message="Cannot find ${tomcat.bootstrap.jar}"/>
<java
classpath="${tomcat.bootstrap.jar}"
classname="org.apache.catalina.startup.Bootstrap"
fork="true"
>
<sysproperty key="java.util.logging.manager" value="org.apache.juli.ClassLoaderLogManager"/>
<sysproperty key="java.util.logging.config.file" value="${tomcat.dir}/conf/logging.properties"/>
<sysproperty key="java.endorsed.dirs" value="${tomcat.dir}/endorsed"/>
<sysproperty key="catalina.base" value="${tomcat.dir}"/>
<sysproperty key="catalina.home" value="${tomcat.dir}"/>
<sysproperty key="java.io.tmpdir" value="${tomcat.dir}/temp"/>
<arg value="-config"/>
<arg value="${basedir}/engines/tomcat-config.xml"/>
<arg value="start"/>
</java>
</target>
<target name="check-if-jetty-is-unzipped">
<available property="jetty.is.unzipped" file="${jetty.dir}"/>
</target>
<target name="unzip-jetty-distribution" depends="check-if-jetty-is-unzipped" unless="jetty.is.unzipped">
<echo>
unzipping jetty...
</echo>
<unzip dest="${basedir}/engines" src="${jetty.zip}">
</unzip>
<mkdir dir="${jetty.logs.dir}"/>
</target>
<target name="deploy-wars-in-jetty" depends="unzip-jetty-distribution">
<echo>
Deploying jetty in ${jetty.dir}
</echo>
<available property="start.jar.exists" file="${jetty.start.jar}"/>
<fail unless="start.jar.exists"
message="Cannot find ${jetty.start.jar}"/>
<java
jar="${jetty.start.jar}"
fork="true"
>
<sysproperty key="jetty.home" value="${jetty.dir}"/>
<sysproperty key="jetty.logs" value="${jetty.logs.dir}"/>
<sysproperty key="opengse.webapps.dir" value="${webapps.dir}"/>
<arg value="${basedir}/engines/jetty-config.xml"/>
</java>
</target>
</project>