blob: 4f831952302a8d80efd976ad7f707e1abb996a0a [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 commonBuild SYSTEM "file:./../../ejb_annotations/annotations-common.xml">
]>
<project name="Hello" default="core" basedir=".">
&commonBuild;
<property name="src-name" value="endpoint/HelloImpl.java"/>
<property name="client-src-name" value="client/Client.java"/>
<basename file="${src-name}" property="server" suffix=".java"/>
<dirname file="${src-name}" property="directory"/>
<basename file="${directory}" property="pkg-name"/>
<target name="all" depends="clean">
<exec executable="${env.S1AS_HOME}/bin/wsimport">
<arg line="-keep -d ${env.APS_HOME}/build/module/classes endpoint/wsdl/HelloImplService.wsdl"/>
</exec>
<antcall target="test-compile"/>
<war destfile="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war" needxmlfile="false">
<webinf dir="${pkg-name}"
includes="*.xml **/*.wsdl **/*.xsd"/>
<classes dir="${env.APS_HOME}/build/module/classes"
includes="${pkg-name}/**"/>
</war>
<waitfor maxwait="100" maxwaitunit="second">
<or>
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployed"/>
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployFailed"/>
</or>
</waitfor>
<condition property="deploy_succeeded">
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployed"/>
</condition>
<condition property="deploy_failed">
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployFailed"/>
</condition>
<fail if="deploy_failed" message="Deployment failed"/>
<antcall target="compile-client"/>
<exec executable="${env.S1AS_HOME}/bin/wsimport">
<arg line="-keep -d ${env.APS_HOME}/build/module/classes http://${http.host}:${http.port}/${server}/${server}Service?WSDL"/>
</exec>
<antcall target="unjar-client-utils"/>
<antcall target="internal-run"/>
<antcall target="autoundeploy-file">
<param name="filename" value="${server}.war"/>
</antcall>
<condition property="undeploy_succeeded">
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_undeployed"/>
</condition>
<condition property="undeploy_failed">
<available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_undeployFailed"/>
</condition>
<fail if="undeploy_failed" message="undeployment failed"/>
<antcall target="report"/>
</target>
<target name="test_build">
<exec executable="${env.S1AS_HOME}/bin/wsimport">
<arg line="-keep -d ${env.APS_HOME}/build/module/classes endpoint/wsdl/HelloImplService.wsdl"/>
</exec>
<antcall target="build"/>
</target>
<target name="report-success">
<echo message="Test passed"/>
</target>
<target name="report-failure">
<echo message="Test failed"/>
</target>
</project>