blob: 48f3172fc864a2678c0b0925ddd611f2e777a759 [file] [log] [blame]
<!--
Copyright (c) 2002, 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 testproperties SYSTEM "file:./build.properties">
]>
<project name="JAXRPC Stub Properties test" default="all" basedir=".">
<!-- include common.xml and testcommon.xml -->
&commonSetup;
&commonBuild;
&testproperties;
<target name="run.wscompile">
<exec executable="${WSCOMPILE}" failonerror="true" >
<arg line="-source 1.1.2 ${wscompile.command}" />
</exec>
</target>
<!-- NOTE. the simple mapping test and full mapping test can
only be run one at a time, I didn't want to set up two
tests for this. -->
<!--
<target name="all" depends="clean,build,deploy,run,undeploy"/>
-->
<target name="all" depends="assemble, deploy, run, undeploy"/>
<target name="compile" depends="compile-web">
<antcall target="compile-common">
<param name="src" value="stubprops"/>
</antcall>
</target>
<target name="gen-ejb-wsdl" depends="init-common">
<mkdir dir="${build.classes.dir}/META-INF/wsdl"/>
<antcall target="run.wscompile">
<param name="wscompile.command"
value="-define -mapping ${build.classes.dir}/SayHelloMapping_ejb.xml -cp ${build.classes.dir} -keep -d ${build.classes.dir}/META-INF/wsdl config-interface.xml"/>
</antcall>
</target>
<target name="assemble-ejb" depends="init-common, compile, gen-ejb-wsdl">
<mkdir dir="${build.classes.dir}/WEB-INF/wsdl"/>
<copy todir="${build.classes.dir}/WEB-INF/wsdl"
file="${build.classes.dir}/META-INF/wsdl/SayHelloService.wsdl"/>
<copy todir="." file="descriptor/webservices.xml"/>
<antcall target="ejb-jar-common">
<param name="ejbjar.classes" value="SayHelloMapping_ejb.xml,META-INF/wsdl/**,stubprops/Simple*.class"/>
</antcall>
<delete file="webservices.xml"/>
</target>
<target name="assemble-web" depends="init-common, compile, gen-web-wsdl">
<copy todir="." file="../shared/war/webservices.xml"/>
<copy todir="${build.classes.dir}/WEB-INF" file="${sun-web.xml}"/>
<replace file="${build.classes.dir}/WEB-INF/sun-web.xml" token="@webHost@" value="${http.host}"/>
<replace file="${build.classes.dir}/WEB-INF/sun-web.xml" token="@webPort@" value="${http.port}"/>
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes"/>
<param name="sun-web.xml" value="${build.classes.dir}/WEB-INF/sun-web.xml"/>
<param name="mappingfile.location" value="${build.classes.dir}"/>
<param name="mappingfile.name" value="WebServiceTestMapping.xml"/>
<param name="wsdlfile.location" value="${build.classes.dir}"/>
<param name="wsdlfile.name" value="WebServiceServletTest.wsdl"/>
<param name="webwar.classes" value="SayHelloMapping_ejb.xml,WebServiceTestMapping.xml,WEB-INF/wsdl/**,stubprops/TestServlet.class, test/*.class"/>
</antcall>
<jar jarfile="${assemble.dir}/${appname}-web.war" update="true">
<fileset dir="${build.classes.dir}" casesensitive="yes">
<include name="WEB-INF/wsdl/SayHelloService.wsdl"/>
<include name="SayHelloMapping_ejb.xml"/>
</fileset>
</jar>
<delete file="webservices.xml"/>
</target>
<target name="compile-web" depends="">
<antcall target="compile-common">
<param name="src" value="../shared/war"/>
</antcall>
</target>
<target name="gen-web-wsdl" depends="init-common">
<!--<mkdir dir="${build.classes.dir}/WEB-INF/wsdl"/> -->
<antcall target="run.wscompile">
<param name="wscompile.command"
value="-define -mapping ${build.classes.dir}/WebServiceTestMapping.xml -cp ${build.classes.dir} -keep -d ${build.classes.dir} ../shared/war/config.xml"/>
</antcall>
</target>
<target name="assemble" depends="assemble-ejb, assemble-web, assemble-client"/>
<target name="assemble-client" depends="init-common">
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
<unjar src="${env.APS_HOME}/lib/reporter.jar"
dest="${build.classes.dir}"/>
<antcall target="appclient-jar-common">
<param name="appclientjar.classes"
value="Client.class, test/**,com/**" />
</antcall>
<move file="${assemble.dir}/${appname}-client.jar" toFile="${assemble.dir}/${appname}AppClient.jar"/>
</target>
<target name="run" depends="init-common">
<antcall target="runclient-common">
<param name="appclient.application.args" value="http://${http.host}:${http.port}/WebServiceTestServlet/WebServiceTestService"/>
</antcall>
</target>
<target name="deploy"
depends="init-common">
<antcall target="deploy-jar-common"/>
<antcall target="deploy-war-common">
<param name="contextroot" value="WebServiceTestServlet"/>
</antcall>
</target>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-war-common"/>
<antcall target="undeploy-jar-common"/>
</target>
</project>