| <?xml version="1.0" encoding="ISO-8859-1"?> |
| <!DOCTYPE project [ |
| <!-- |
| |
| Copyright (c) 2017, 2018 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 |
| |
| --> |
| |
| <!ENTITY commonBuild SYSTEM "./../../config/common.xml"> |
| ]> |
| |
| <!-- |
| Test directory deployment for ejb with directory structure such |
| as bar.jar |
| --> |
| |
| <project name="directoryDeploy-withEjbSuffix" default="all" basedir="."> |
| |
| &commonBuild; |
| |
| <property name="testName" value="dirDeployWithEjbSuffix"/> |
| <property name="ejb.build.dir" |
| value="${build}/${testName}.jar"/> |
| <property name="client.build.dir" value="${build}/client"/> |
| |
| <target name="prepare" depends="init"> |
| <mkdir dir="${build}" /> |
| <mkdir dir="${ejb.build.dir}" /> |
| <mkdir dir="${client.build.dir}" /> |
| </target> |
| |
| <target name="compile" depends="prepare"> |
| <javac srcdir="../ejb/ejb" destdir="${ejb.build.dir}"> |
| <classpath refid="gfv3.classpath"/> |
| </javac> |
| <javac destdir="${client.build.dir}/"> |
| <src path="../client"/> |
| <include name="HelloClient.java"/> |
| <classpath> |
| <path refid="gfv3.classpath"/> |
| <path location="${ejb.build.dir}"/> |
| </classpath> |
| </javac> |
| |
| </target> |
| |
| <target name="assemble" depends="compile"> |
| <mkdir dir="${ejb.build.dir}/META-INF"/> |
| <copy file="../ejb/descriptor/ejb-jar.xml" |
| todir="${ejb.build.dir}/META-INF"/> |
| <copy file="../ejb/descriptor/sun-ejb-jar.xml" |
| todir="${ejb.build.dir}/META-INF" |
| failonerror="false"/> |
| </target> |
| |
| <target name="deploydir.asadmin" depends="prepare"> |
| <antcall target="common.deploy.asadmin"> |
| <param name="arg.list" |
| value="--name ${testName} --retrieve ${client.build.dir} ${build}/${testName}.jar"/> |
| </antcall> |
| </target> |
| |
| <target name="redeploydir.asadmin" depends="prepare"> |
| <antcall target="common.redeploydir.asadmin"> |
| <param name="arg.list" |
| value="--name ${testName} --retrieve ${client.build.dir} ${build}/${testName}.jar"/> |
| </antcall> |
| </target> |
| |
| <target name="undeploy.asadmin"> |
| <antcall target="common.undeploy.asadmin"> |
| <param name="arg.list" |
| value="${testName}"/> |
| </antcall> |
| </target> |
| |
| <target name="run" depends="run.positive"/> |
| |
| <target name="run.positive" depends="init,setOrbPort"> |
| <antcall target="runclient"> |
| <param name="arg.list" value="true"/> |
| <param name="log.id" value="${log.id}"/> |
| <param name="tgtPort" value="${depltest.orbport}"/> |
| </antcall> |
| </target> |
| |
| <target name="run.negative" depends="init,setOrbPort"> |
| <antcall target="runclient"> |
| <param name="arg.list" value="false"/> |
| <param name="log.id" value="${log.id}"/> |
| <param name="tgtPort" value="${depltest.orbport}"/> |
| </antcall> |
| </target> |
| |
| <target name="runclient" depends="init, setOrbPort"> |
| <javaWithResult |
| fork="true" |
| failonerror="false" |
| jvm="${JAVA}" |
| classname="standaloneclient.HelloClient" |
| output="${build}/${log.id}.output.log" |
| resultproperty="result"> |
| |
| <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${http.host}"/> |
| <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${tgtPort}"/> |
| |
| <classpath> |
| <path refid="gfv3.classpath"/> |
| <path location="${ejb.build.dir}"/> |
| <path location="${client.build.dir}"/> |
| <path location="${client.build.dir}/dirDeployWithEjbSuffixClient.jar"/> |
| </classpath> |
| |
| <arg line="${arg.list}"/> |
| </javaWithResult> |
| |
| <antcall target="processResult"> |
| <param name="result" value="${result}"/> |
| <param name="log" value="${build}/${log.id}.output.log"/> |
| </antcall> |
| </target> |
| |
| |
| <target name="private-all"> |
| <antcall target="assemble"/> |
| <antcall target="declare-test"> |
| <param name="description" value="directorydeploy/ejbWithSuffix Test asadmin deploydir"/> |
| </antcall> |
| <antcall target="deploydir.asadmin"/> |
| <antcall target="run.positive"> |
| <param name="log.id" value="1"/> |
| </antcall> |
| <antcall target="declare-test"> |
| <param name="description" value="directorydeploy/ejbWithSuffix Test asadmin redeploydir"/> |
| </antcall> |
| <antcall target="redeploydir.asadmin"/> |
| <antcall target="run.positive"> |
| <param name="log.id" value="2"/> |
| </antcall> |
| <antcall target="declare-test"> |
| <param name="description" value="directorydeploy/ejbWithSuffix Test asadmin undeploydir"/> |
| </antcall> |
| <antcall target="undeploy.asadmin"/> |
| <antcall target="run.negative"> |
| <param name="log.id" value="3"/> |
| </antcall> |
| </target> |
| |
| <target name="clobber" depends="clean"> |
| <delete dir="${build}"/> |
| </target> |
| |
| |
| </project> |