-
Notifications
You must be signed in to change notification settings - Fork 143
/
ee.xml
173 lines (150 loc) · 6.3 KB
/
ee.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
<!--
Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<target name="clean-results" depends="init-common">
<delete>
<fileset dir="${env.APS_HOME}" includes="test_results*"/>
</delete>
<delete>
<fileset dir="." includes="*.output"/>
</delete>
</target>
<target name="start-derby" depends="init-common">
<echo message="Starting database"/>
<echo message="${ASADMIN}"/>
<!-- spawn is added to prevent a hang on Windows -->
<exec spawn="true" executable="${ASADMIN}" failonerror="false">
<arg line="start-database"/>
<arg line="--dbhome"/>
<arg line="${env.S1AS_HOME}/databases"/>
<arg line="--dbport"/>
<arg line="${db.port}"/>
<arg line="--jvmoptions"/>
<arg line="'-Djava.security.manager -Djava.security.policy=${env.APS_HOME}/devtests/transaction/ee/ee-test.policy'"/>
</exec>
</target>
<target name="stop-derby" depends="init-common">
<echo message="Stopping database"/>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="stop-database"/>
<arg line="--dbport"/>
<arg line="${db.port}"/>
</exec>
</target>
<target name="start-domain" depends="init-common">
<echo message="Starting DAS"/>
<antcall target="startDomain"/>
</target>
<target name="stop-domain" depends="init-common">
<echo message="Stopping DAS"/>
<antcall target="stopDomain"/>
</target>
<target name="setup-xa-database-common" depends="init-common">
<antcall target="deploy-jdbc-common">
<param name="jdbc.conpool.name" value="${pool.name}"/>
<param name="db.class" value="org.apache.derby.jdbc.ClientXADataSource"/>
<param name="jdbc.resource.type" value="javax.sql.XADataSource"/>
<param name="jdbc.resource.name" value="${resource.name}"/>
</antcall>
<antcall target="asadmin-common">
<param name="admin.command" value="set"/>
<param name="operand.props"
value="${resources.dottedname.prefix}.jdbc-connection-pool.${pool.name}.property.connectionAttributes=;create=true"/>
</antcall>
<antcall target="setup-pool-common">
<param name="pool.name" value="${pool.name}"/>
</antcall>
<antcall target="setup-pool-common">
<param name="pool.name" value="DerbyPool"/>
</antcall>
</target>
<target name="setup-pool-common" depends="init-common">
<antcall target="asadmin-common">
<param name="admin.command" value="set"/>
<param name="operand.props"
value="${resources.dottedname.prefix}.jdbc-connection-pool.${pool.name}.connection-validation-method=table"/>
</antcall>
<antcall target="asadmin-common">
<param name="admin.command" value="set"/>
<param name="operand.props"
value="${resources.dottedname.prefix}.jdbc-connection-pool.${pool.name}.validation-table-name=sys.systables"/>
</antcall>
<antcall target="asadmin-common">
<param name="admin.command" value="set"/>
<param name="operand.props"
value="${resources.dottedname.prefix}.jdbc-connection-pool.${pool.name}.is-connection-validation-required=true"/>
</antcall>
</target>
<target name="save-logs" depends="init-common" >
<condition property="zip-logs">
<isset property="${save.logs}" />
</condition>
<echo message="saving logs to ${basedir}"/>
<zip destfile="${module}-logs.zip"
basedir="${env.S1AS_HOME}"
includes="**/server.log, **/server.log_*"
/>
</target>
<target name="unsetup-cluster" depends="init-common">
<echo message="Stopping cluster"/>
<java fork="on"
failonerror="true"
classpath="${env.S1AS_HOME}/lib/jakartaee.jar:${env.S1AS_HOME}/lib/gf-client.jar:${env.APS_HOME}/lib/target/report-builder.jar:${build.classes.dir}"
classname="${se.client}">
<arg line="clean"/>
<arg line="${appname}-web"/>
</java>
</target>
<target name="build" depends="compile-war">
<antcall target="webclient-war-common">
<param name="hasWebclient" value="false"/>
</antcall>
<antcall target="compile-client"/>
</target>
<target name="compile-war" depends="clean">
<antcall target="compile-common">
<param name="src" value="war"/>
</antcall>
</target>
<target name="compile-client" >
<javac fork="true" includeAntRuntime="false" destdir="${build.classes.dir}" debug="true"
classpath="${env.APS_HOME}/lib/target/report-builder.jar:${build.classes.dir}"
srcdir="${env.APS_HOME}/devtests/admin/cli/src" includes="**/*BaseDevTest.java">
</javac>
<javac fork="true" includeAntRuntime="false" destdir="${build.classes.dir}" debug="true"
classpath="${env.APS_HOME}/lib/target/report-builder.jar:${build.classes.dir}"
srcdir="${env.APS_HOME}/devtests/transaction/ee/common" includes="**/*.java">
</javac>
<javac fork="true" includeAntRuntime="false"
classpath="${env.APS_HOME}/lib/target/report-builder.jar:${build.classes.dir}:${env.APS_HOME}/lib/reporter.jar"
destdir="${build.classes.dir}" debug="true" srcdir="client" includes="**/*.java">
<classpath path="${classpath}"/>
</javac>
</target>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
<target name="usage">
<echo>
Usage:
ant all (Executes all transaction ee tests in this suite)
</echo>
</target>
<target name="reset-tables" depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/delete.sql"/>
</antcall>
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/delete.sql"/>
<param name="db.url" value="jdbc:derby://localhost:${db.port}/${db.name};create=true;"/>
</antcall>
</target>