Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | <!-- |
| 3 | |
| 4 | Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. |
| 5 | |
| 6 | This program and the accompanying materials are made available under the |
| 7 | terms of the Eclipse Public License v. 2.0, which is available at |
| 8 | http://www.eclipse.org/legal/epl-2.0. |
| 9 | |
| 10 | This Source Code may also be made available under the following Secondary |
| 11 | Licenses when the conditions for such availability set forth in the |
| 12 | Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| 13 | version 2 with the GNU Classpath Exception, which is available at |
| 14 | https://www.gnu.org/software/classpath/license.html. |
| 15 | |
| 16 | SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| 17 | |
| 18 | --> |
| 19 | |
| 20 | <!DOCTYPE project [ |
| 21 | <!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml"> |
| 22 | <!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml"> |
| 23 | <!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml"> |
| 24 | <!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml"> |
| 25 | <!ENTITY testproperties SYSTEM "file:./build.properties"> |
| 26 | ]> |
| 27 | |
| 28 | <project name="webservicerefs" default="all" basedir="."> |
| 29 | |
| 30 | &commonSetup; |
| 31 | &commonBuild; |
| 32 | &commonRun; |
| 33 | &testproperties; |
| 34 | &jaxwsTools; |
| 35 | |
| 36 | <target name="all" depends="clean, setup-web, clean, setup-ejb, assemble-client, runclient, undeploy"/> |
| 37 | |
| 38 | <target name="clean" depends="init-common"> |
| 39 | <antcall target="clean-common"/> |
| 40 | </target> |
| 41 | |
| 42 | <target name="setup-web" depends="assemble-web, deploy-web-app"/> |
| 43 | <target name="setup-ejb" depends="assemble-ejb, deploy-ejb-jar"/> |
| 44 | |
| 45 | <target name="assemble-ejb"> |
| 46 | <antcall target="compile-common"> |
| 47 | <param name="src" value="ejb_endpoint"/> |
| 48 | </antcall> |
| 49 | <antcall target="pkg-ejb-jar"> |
| 50 | <param name="jar.classes" value="ejb_endpoint"/> |
| 51 | <param name="jar.file" value="${assemble.dir}/${appname}-ejb.jar"/> |
| 52 | </antcall> |
| 53 | </target> |
| 54 | |
| 55 | <target name="assemble-web"> |
| 56 | <antcall target="compile-common"> |
| 57 | <param name="src" value="servlet_endpoint"/> |
| 58 | </antcall> |
| 59 | <antcall target="pkg-war"> |
| 60 | <param name="war.classes" value="${build.classes.dir}"/> |
| 61 | <param name="war.file" value="${assemble.dir}/${appname}-web.war"/> |
| 62 | </antcall> |
| 63 | </target> |
| 64 | |
| 65 | <target name="assemble-client" depends="init-common"> |
| 66 | <mkdir dir="${build.classes.dir}/client"/> |
| 67 | <echo message="wsimporting http://${http.host}:${http.port}/${appname}/webservice/ServletHelloService?WSDL"/> |
| 68 | <antcall target="wsimport"> |
| 69 | <param name="wsimport.args" |
| 70 | value="-keep -d ${build.classes.dir}/client http://${http.host}:${http.port}/${appname}/webservice/ServletHelloService?WSDL"/> |
| 71 | </antcall> |
| 72 | <echo message="wsimporting http://${http.host}:${http.port}/WSHelloEJBService/WSHelloEJB?WSDL"/> |
| 73 | <antcall target="wsimport"> |
| 74 | <param name="wsimport.args" |
| 75 | value="-keep -d ${build.classes.dir}/client http://${http.host}:${http.port}/WSHelloEJBService/WSHelloEJB?WSDL"/> |
| 76 | </antcall> |
| 77 | |
| 78 | <replace file="client/Client.java" value="${http.host}" token="HTTP_HOST"/> |
| 79 | <replace file="client/Client.java" value="${http.port}" token="HTTP_PORT"/> |
| 80 | |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 81 | <javac srcdir="." destdir="${build.classes.dir}/client" |
| 82 | 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" |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 83 | includes="client/**"/> |
| 84 | </target> |
| 85 | |
| 86 | <target name="deploy-web-app"> |
| 87 | <antcall target="deploy-war-common"> |
| 88 | <param name="contextroot" value="${appname}"/> |
| 89 | </antcall> |
| 90 | </target> |
| 91 | |
| 92 | <target name="deploy-ejb-jar"> |
| 93 | <antcall target="deploy-jar-common"/> |
| 94 | </target> |
| 95 | |
| 96 | <target name="undeploy" depends="init-common"> |
| 97 | <antcall target="undeploy-war-common"/> |
| 98 | <antcall target="undeploy-jar-common"/> |
| 99 | </target> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 100 | |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 101 | <target name="runclient"> |
| 102 | <antcall target="run-client"> |
| 103 | <param name="client-class" value="client.Client"/> |
| 104 | <param name="other-args" value="webservicerefs-test"/> |
| 105 | </antcall> |
| 106 | <replace file="client/Client.java" token="${http.host}" value="HTTP_HOST"/> |
| 107 | <replace file="client/Client.java" token="${http.port}" value="HTTP_PORT"/> |
| 108 | </target> |
| 109 | </project> |
| 110 | |