Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
| 2 | <!DOCTYPE project [ |
| 3 | <!-- |
| 4 | |
Gaurav Gupta | 3655507 | 2020-03-26 14:10:23 +0530 | [diff] [blame^] | 5 | Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 6 | |
| 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"/> |
| 53 | <fileset dir="${build}" excludes="**/Servlet.class, **/TestClient.class"/> |
| 54 | </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}"/> |
| 91 | <jvmarg value="-Djava.endorsed.dirs=${inst}/lib/endorsed"/> |
| 92 | |
| 93 | <classpath> |
| 94 | <path location="${inst}/lib/j2ee.jar"/> |
| 95 | <path location="${build}"/> |
| 96 | </classpath> |
| 97 | |
| 98 | <arg line="${arg.list}"/> |
| 99 | </javaWithResult> |
| 100 | |
| 101 | <antcall target="processResult"> |
| 102 | <param name="result" value="${result}"/> |
| 103 | <param name="log" value="${build}/${log.id}.output.log"/> |
| 104 | </antcall> |
| 105 | </target> |
| 106 | |
| 107 | <target name="run" depends="run.positive"/> |
| 108 | |
| 109 | <target name="run.positive" depends="setHttpPort"> |
| 110 | <antcall target="common.run.positive"> |
| 111 | <param name="link" value="${contextRoot}/${testName}"/> |
| 112 | <param name="log.id" value="${log.id}"/> |
| 113 | </antcall> |
| 114 | </target> |
| 115 | |
| 116 | <target name="run.negative" depends="setHttpPort"> |
| 117 | <antcall target="common.run.negative"> |
| 118 | <param name="link" value="${contextRoot}/${testName}"/> |
| 119 | <param name="log.id" value="${log.id}"/> |
| 120 | </antcall> |
| 121 | </target> |
| 122 | |
| 123 | <target name="undeploy.asadmin" depends="prepare"> |
| 124 | <antcall target="common.undeploy.asadmin"> |
| 125 | <param name="arg.list" value="${testName}"/> |
| 126 | <param name="testName" value="${testName}"/> |
| 127 | </antcall> |
| 128 | </target> |
| 129 | |
| 130 | <target name="deploy.jms.queues" depends="prepare"> |
| 131 | <antcall target="common.create.jms.connection"> |
Gaurav Gupta | 3655507 | 2020-03-26 14:10:23 +0530 | [diff] [blame^] | 132 | <param name="jms.factory.type" value="jakarta.jms.QueueConnectionFactory"/> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 133 | <param name="jms.factory.name" value="jms/ejb_ejb30_hello_mdb_QCF"/> |
| 134 | </antcall> |
| 135 | <antcall target="common.create.jms.resource"> |
| 136 | <param name="dest.type" value="queue"/> |
| 137 | <param name="dest.name" value="ejb_ejb30_hello_mdb_InQueue"/> |
Gaurav Gupta | 3655507 | 2020-03-26 14:10:23 +0530 | [diff] [blame^] | 138 | <param name="res.type" value="jakarta.jms.Queue"/> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 139 | <param name="jms.resource.name" value="jms/ejb_ejb30_hello_mdb_InQueue"/> |
| 140 | </antcall> |
| 141 | <antcall target="common.create.jms.resource"> |
| 142 | <param name="dest.type" value="queue"/> |
| 143 | <param name="dest.name" value="ejb_ejb30_hello_mdb_OutQueue"/> |
Gaurav Gupta | 3655507 | 2020-03-26 14:10:23 +0530 | [diff] [blame^] | 144 | <param name="res.type" value="jakarta.jms.Queue"/> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 145 | <param name="jms.resource.name" value="jms/ejb_ejb30_hello_mdb_OutQueue"/> |
| 146 | </antcall> |
| 147 | </target> |
| 148 | |
| 149 | <target name="undeploy.jms.queues" depends="prepare"> |
| 150 | <antcall target="common.delete.jms.resource"> |
| 151 | <param name="jms.resource.name" value="jms/ejb_ejb30_hello_mdb_InQueue"/> |
| 152 | <param name="dest.type" value="queue"/> |
| 153 | <param name="dest.name" value="ejb_ejb30_hello_mdb_InQueue"/> |
| 154 | </antcall> |
| 155 | <antcall target="common.delete.jms.resource"> |
| 156 | <param name="jms.resource.name" value="jms/ejb_ejb30_hello_mdb_OutQueue"/> |
| 157 | <param name="dest.type" value="queue"/> |
| 158 | <param name="dest.name" value="ejb_ejb30_hello_mdb_OutQueue"/> |
| 159 | </antcall> |
| 160 | <antcall target="common.delete.jms.connection"> |
| 161 | <param name="jms.factory.name" value="jms/ejb_ejb30_hello_mdb_QCF"/> |
| 162 | </antcall> |
| 163 | </target> |
| 164 | |
| 165 | <target name="private-all"> |
| 166 | <antcall target="assemble"/> |
| 167 | |
| 168 | <antcall target="deploy.jms.queues"/> |
| 169 | <antcall target="deploy.asadmin"/> |
| 170 | |
| 171 | <antcall target="run.positive"> |
| 172 | <param name="log.id" value="1"/> |
| 173 | <param name="desc" value="ejb30/mdb/webClient Test asadmin deploy"/> |
| 174 | </antcall> |
| 175 | |
| 176 | <antcall target="redeploy.asadmin"/> |
| 177 | <antcall target="run.positive"> |
| 178 | <param name="log.id" value="2"/> |
| 179 | <param name="desc" value="ejb30/mdb/webClient Test asadmin redeploy"/> |
| 180 | </antcall> |
| 181 | |
| 182 | <antcall target="undeploy.asadmin"/> |
| 183 | <antcall target="undeploy.jms.queues"/> |
| 184 | </target> |
| 185 | </project> |