blob: f42d6d65ce6182e8dd03cd8f55dae689dc03385c [file] [log] [blame]
<?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 commonSetup SYSTEM "file:../../../../../../config/properties.xml">
<!ENTITY commonBuild SYSTEM "file:../../../../../../config/common.xml">
<!ENTITY jbiCommon SYSTEM "file:../../../jbi_commons.properties">
<!ENTITY commonEjbAnnotationsBuild SYSTEM "file:./../../../../ejb_annotations/annotations-common.xml">
<!ENTITY buildProperties SYSTEM "file:./build.properties">
<!ENTITY jbiBuild SYSTEM "file:./../../../jbi_commons.xml">
]>
<project name="Hello" default="all" basedir=".">
&commonSetup;
&commonBuild;
&buildProperties;
&commonEjbAnnotationsBuild;
&jbiCommon;
&jbiBuild;
<property name="src-name" value="endpoint/jaxws/HelloEJB.java"/>
<property name="client-src-name" value="stressclient/StressSOAPEjbConsumer.java"/>
<property name="pkg-name" value="endpoint/jaxws"/>
<target name="all" depends="deploy-jbi-component-su, another_servlet, another_ejb, mytest-all, undeploy-jbi-component-su,undeploy-all,clean"/>
<target name="mytest-all" >
<basename file="${src-name}" property="server" suffix=".java"/>
<dirname file="${src-name}" property="directory"/>
<echo message="Starting Test ${directory}"/>
<basename file="${directory}" property="pkg-name"/>
<antcall target="deploy">
<param name="pkg-name" value="${pkg-name}"/>
</antcall>
<condition property="deploy_succeeded">
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployed"/>
</condition>
<condition property="deploy_failed">
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployFailed"/>
</condition>
<fail message="Deployment failed" if="deploy_failed"/>
<antcall target="wsdl-import">
<param name="server" value="${server}"/>
<param name="port" value="HelloEJB"/>
</antcall>
<javac srcdir="." destdir="${env.APS_HOME}/build/module/classes"
classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar:${env.APS_HOME}/build/module/classes/client"
includes="${client-src-name}">
</javac>
<unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${env.APS_HOME}/build/module/classes"/>
<copydir src="${env.APS_HOME}/build/module/classes/client/com" dest="${env.APS_HOME}/build/module/classes/com"/>
<exec executable="${env.S1AS_HOME}/bin/appclient" dir="${env.APS_HOME}/build/module/classes">
<arg line="stressclient.StressSOAPEjbConsumer ${minutes}"/>
</exec>
<echo message="Removing jar bundle ${server}.jar from autodeploy directory"/>
<antcall target="undeploy"/>
<antcall target="report"/>
</target>
<target name="another_ejb">
<ant inheritAll="false" dir="./another_ejb"/>
</target>
<target name="another_servlet">
<ant inheritAll="false" dir="./another_servlet"/>
</target>
<target name="undeploy-all">
<ant inheritAll="false" dir="./another_ejb" target="custom-undeploy"/>
<ant inheritAll="false" dir="./another_servlet" target="custom-undeploy"/>
</target>
<target name="report-success">
<echo message="Test passed"/>
</target>
<target name="report-failure">
<echo message="Test failed"/>
</target>
</project>