blob: 76a2c05c63464ec6d0817a470f1f0d856cd11398 [file] [log] [blame]
Vinay Vishal57171472018-09-18 20:22:00 +05301<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE project [
3<!--
4
Gaurav Gupta36555072020-03-26 14:10:23 +05305 Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
Vinay Vishal57171472018-09-18 20:22:00 +05306
7 This program and the accompanying materials are made available under the
8 terms of the Eclipse Public License v. 2.0, which is available at
9 http://www.eclipse.org/legal/epl-2.0.
10
11 This Source Code may also be made available under the following Secondary
12 Licenses when the conditions for such availability set forth in the
13 Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
14 version 2 with the GNU Classpath Exception, which is available at
15 https://www.gnu.org/software/classpath/license.html.
16
17 SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
18
19-->
20
21<!ENTITY commonBuild SYSTEM "./../../../../config/common.xml">
22]>
23
24<project name="ejb-ejb30-hello-mdbApp" default="usage" basedir=".">
25
26 &commonBuild;
27 <property name="archivedir" value="${build}/archives"/>
28
29 <property name="testName" value="ejb-ejb30-hello-mdbApp"/>
30 <property name="contextRoot" value="webclient"/>
31
32 <target name="prepare" depends="init">
33 <mkdir dir="${build}"/>
34 <mkdir dir="${archivedir}"/>
35 <property name="all.ear" value="${archivedir}/${testName}App.ear"/>
36 <property name="ejb.jar" value="${archivedir}/${testName}-ejb.jar"/>
37 <property name="web.war" value="${archivedir}/${testName}-web.war"/>
38 </target>
39
40 <target name="compile" depends="prepare">
41 <javac srcdir="ejb" destdir="${build}" debug="on" failonerror="true">
42 <classpath refid="gfv3.classpath"/>
43 </javac>
44
45 <javac srcdir="servlet" destdir="${build}" debug="on" failonerror="true">
46 <classpath refid="gfv3.classpath"/>
47 </javac>
48 </target>
49
50 <target name="assemble" depends="compile">
51 <jar destfile="${ejb.jar}">
52 <metainf file="descriptor/sun-ejb-jar.xml"/>
David Matějčekf4dc06a2021-05-17 12:10:57 +020053 <fileset dir="${build}" excludes="**/Servlet.class, **/TestClient.class"/>
Vinay Vishal57171472018-09-18 20:22:00 +053054 </jar>
55
56 <war destfile="${web.war}" webxml="descriptor/web.xml">
57 <webinf file="descriptor/sun-web.xml"/>
58 <classes dir="${build}" includes="**/Servlet.class,**/Sful.class,**/Sless.class"/>
59 </war>
60
61 <ear destfile="${all.ear}" basedir="${archivedir}"
62 appxml="descriptor/application.xml" includes="*.jar, *.war">
63 </ear>
64 </target>
65
66 <target name="deploy.asadmin" depends="prepare">
67 <antcall target="common.deploy.asadmin">
68 <param name="arg.list" value="--retrieve ${archivedir} --name ${testName} ${all.ear}"/>
69 <param name="testName" value="${testName}"/>
70 </antcall>
71 </target>
72
73 <target name="redeploy.asadmin" depends="prepare">
74 <antcall target="common.redeploy.asadmin">
75 <param name="arg.list" value="--retrieve ${archivedir} --name ${testName} ${all.ear}"/>
76 <param name="testName" value="${testName}"/>
77 </antcall>
78 </target>
79
80 <target name="runclient" depends="init,setOrbPort2">
81 <echo message="TestClient ${arg.list}"/>
82 <javaWithResult
83 fork="true"
84 failonerror="false"
85 jvm="${JAVA}"
86 classname="com.sun.s1asdev.ejb.ejb30.hello.mdb.TestClient"
87 output="${build}/${log.id}.output.log"
88 resultproperty="result">
89 <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${http.host}"/>
90 <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${depltest.orbport}"/>
Vinay Vishal57171472018-09-18 20:22:00 +053091
92 <classpath>
93 <path location="${inst}/lib/j2ee.jar"/>
94 <path location="${build}"/>
95 </classpath>
96
97 <arg line="${arg.list}"/>
98 </javaWithResult>
99
100 <antcall target="processResult">
101 <param name="result" value="${result}"/>
102 <param name="log" value="${build}/${log.id}.output.log"/>
103 </antcall>
104 </target>
105
106 <target name="run" depends="run.positive"/>
107
108 <target name="run.positive" depends="setHttpPort">
109 <antcall target="common.run.positive">
110 <param name="link" value="${contextRoot}/${testName}"/>
111 <param name="log.id" value="${log.id}"/>
112 </antcall>
113 </target>
114
115 <target name="run.negative" depends="setHttpPort">
116 <antcall target="common.run.negative">
117 <param name="link" value="${contextRoot}/${testName}"/>
118 <param name="log.id" value="${log.id}"/>
119 </antcall>
120 </target>
121
122 <target name="undeploy.asadmin" depends="prepare">
123 <antcall target="common.undeploy.asadmin">
124 <param name="arg.list" value="${testName}"/>
125 <param name="testName" value="${testName}"/>
126 </antcall>
127 </target>
128
129 <target name="deploy.jms.queues" depends="prepare">
130 <antcall target="common.create.jms.connection">
Gaurav Gupta36555072020-03-26 14:10:23 +0530131 <param name="jms.factory.type" value="jakarta.jms.QueueConnectionFactory"/>
David Matějčekf4dc06a2021-05-17 12:10:57 +0200132 <param name="jms.factory.name" value="jms/ejb_ejb30_hello_mdb_QCF"/>
Vinay Vishal57171472018-09-18 20:22:00 +0530133 </antcall>
134 <antcall target="common.create.jms.resource">
135 <param name="dest.type" value="queue"/>
136 <param name="dest.name" value="ejb_ejb30_hello_mdb_InQueue"/>
Gaurav Gupta36555072020-03-26 14:10:23 +0530137 <param name="res.type" value="jakarta.jms.Queue"/>
David Matějčekf4dc06a2021-05-17 12:10:57 +0200138 <param name="jms.resource.name" value="jms/ejb_ejb30_hello_mdb_InQueue"/>
Vinay Vishal57171472018-09-18 20:22:00 +0530139 </antcall>
140 <antcall target="common.create.jms.resource">
141 <param name="dest.type" value="queue"/>
142 <param name="dest.name" value="ejb_ejb30_hello_mdb_OutQueue"/>
Gaurav Gupta36555072020-03-26 14:10:23 +0530143 <param name="res.type" value="jakarta.jms.Queue"/>
David Matějčekf4dc06a2021-05-17 12:10:57 +0200144 <param name="jms.resource.name" value="jms/ejb_ejb30_hello_mdb_OutQueue"/>
Vinay Vishal57171472018-09-18 20:22:00 +0530145 </antcall>
146 </target>
147
148 <target name="undeploy.jms.queues" depends="prepare">
149 <antcall target="common.delete.jms.resource">
150 <param name="jms.resource.name" value="jms/ejb_ejb30_hello_mdb_InQueue"/>
151 <param name="dest.type" value="queue"/>
152 <param name="dest.name" value="ejb_ejb30_hello_mdb_InQueue"/>
153 </antcall>
154 <antcall target="common.delete.jms.resource">
155 <param name="jms.resource.name" value="jms/ejb_ejb30_hello_mdb_OutQueue"/>
156 <param name="dest.type" value="queue"/>
157 <param name="dest.name" value="ejb_ejb30_hello_mdb_OutQueue"/>
158 </antcall>
159 <antcall target="common.delete.jms.connection">
160 <param name="jms.factory.name" value="jms/ejb_ejb30_hello_mdb_QCF"/>
161 </antcall>
162 </target>
163
164 <target name="private-all">
165 <antcall target="assemble"/>
166
167 <antcall target="deploy.jms.queues"/>
168 <antcall target="deploy.asadmin"/>
169
170 <antcall target="run.positive">
171 <param name="log.id" value="1"/>
172 <param name="desc" value="ejb30/mdb/webClient Test asadmin deploy"/>
173 </antcall>
174
175 <antcall target="redeploy.asadmin"/>
176 <antcall target="run.positive">
177 <param name="log.id" value="2"/>
178 <param name="desc" value="ejb30/mdb/webClient Test asadmin redeploy"/>
179 </antcall>
180
181 <antcall target="undeploy.asadmin"/>
182 <antcall target="undeploy.jms.queues"/>
183 </target>
184</project>