| <?xml version="1.0"?> |
| <!-- |
| |
| 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 |
| |
| --> |
| |
| <!DOCTYPE project [ |
| <!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml"> |
| ]> |
| |
| <project name="Hello" default="core" basedir="."> |
| |
| |
| &commonBuild; |
| <property name="src-name" value="endpoint/WebServiceEJB.java"/> |
| <property name="client-src-name" value="client/Client.java"/> |
| |
| <target name="all" depends="clean, deploy, private-run, private-undeploy, report"/> |
| |
| |
| <target name="private-undeploy"> |
| <antcall target="autoundeploy-file"> |
| <param name="filename" value="EjbClient.jar"/> |
| </antcall> |
| <antcall target="autoundeploy-file"> |
| <param name="filename" value="WebServiceEJB.jar"/> |
| </antcall> |
| </target> |
| |
| |
| <target name="private-run"> |
| <antcall target="clean"/> |
| <antcall target="wsdl-import"> |
| <param name="server" value="WebServiceEJB"/> |
| <param name="port" value="WebServiceEJB"/> |
| </antcall> |
| <javac srcdir="." destdir="${env.APS_HOME}/build/module/classes" |
| includes="ejb/HelloEJB.java"> |
| <classpath refid="classpath"/> |
| </javac> |
| <jar destfile="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar" |
| basedir="${env.APS_HOME}/build/module/classes" |
| includes="ejb/**,endpoint/**"/> |
| <waitfor maxwait="100" maxwaitunit="second"> |
| <or> |
| <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployed"/> |
| <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployFailed"/> |
| </or> |
| </waitfor> |
| <condition property="deploy_succeeded"> |
| <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployed"/> |
| </condition> |
| <condition property="deploy_failed"> |
| <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployFailed"/> |
| </condition> |
| <fail if="deploy_failed" message="Deployment failed"/> |
| <basename file="${client-src-name}" property="client" suffix=".java"/> |
| <dirname file="${client-src-name}" property="client-directory"/> |
| <basename file="${client-directory}" property="client-pkg-name"/> |
| <property name="client-class-name" value="${client-pkg-name}/${client}.class"/> |
| <antcall target="compile-client"/> |
| <echo message="Running appclient with ${client-pkg-name}.${client}"/> |
| <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${env.APS_HOME}/build/module/classes"/> |
| <exec executable="${env.S1AS_HOME}/bin/appclient" dir="${env.APS_HOME}/build/module/classes"> |
| <arg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/> |
| <arg value="${client-pkg-name}.${client}"/> |
| </exec> |
| </target> |
| |
| <target name="report-success"> |
| <echo message="Test PASSED"/> |
| </target> |
| |
| <target name="report-failure"> |
| <echo message="Test FAILED"/> |
| </target> |
| |
| </project> |