Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | |
| 4 | Copyright (c) 1997, 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 | <project basedir="." default="help" name="JaxwsFromWsdl"> |
| 21 | |
| 22 | <property file="build.properties" /> |
| 23 | <property file="${ws.root}/gfproject/${deploy.platform}-config.properties"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 24 | |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 25 | <description>wsit tests</description> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 26 | <import file="${ws.root}/gfproject/build-impl.xml"/> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 27 | <import file="${ws.root}/gfproject/${deploy.platform}-targets.xml"/> |
| 28 | |
| 29 | <target name="build-deploy" depends="server,client, runtest, undeploy" /> |
| 30 | <target name="all" depends="server, client, runtest, undeploy"/> |
| 31 | |
| 32 | <target name="server" depends="build-server-wsdl, create-war, deploy"/> |
| 33 | <target name="client" depends="generate-client, build-client1, build-client2"/> |
| 34 | |
| 35 | <target name="build-setup"> |
| 36 | <echo message="build-setup: build.home=${build.home}"/> |
| 37 | <mkdir dir="${build.classes.home}"/> |
| 38 | <mkdir dir="${build.war.home}"/> |
| 39 | </target> |
| 40 | |
| 41 | <target name="build-server-wsdl" depends="declare-wsimport,build-setup" if="wsjar.available"> |
| 42 | <wsimport |
| 43 | debug="${debug}" |
| 44 | verbose="${verbose}" |
| 45 | keep="${keep}" |
| 46 | extension="${extension}" |
| 47 | destdir="${build.classes.home}" |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 48 | wsdl="${basedir}/${server.wsdl}"> |
| 49 | <binding dir="${basedir}/etc" includes="${server.binding}"/> |
| 50 | </wsimport> |
| 51 | <javac |
| 52 | srcdir="${basedir}/src" |
| 53 | destdir="${build.classes.home}" |
hs536 | ab6c311 | 2020-02-03 13:18:21 +0900 | [diff] [blame] | 54 | includes="**/server/**,**/common/**" classpathref="class.path"> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 55 | <classpath refid="wsit.classpath"/> |
| 56 | </javac> |
| 57 | </target> |
| 58 | |
| 59 | <target name="create-war"> |
| 60 | <war warfile="${app.file.ext}" webxml="metadata/web.xml"> |
| 61 | <webinf dir="metadata" includes="sun-jaxws.xml"/> |
| 62 | <zipfileset |
| 63 | dir="${basedir}/etc" |
| 64 | includes="*.wsdl, *.xsd" |
| 65 | prefix="WEB-INF/wsdl"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 66 | <classes dir="${build.classes.home}"> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 67 | <include name="**/jaxwsfromwsdl/server/**/*.class"/> |
| 68 | </classes> |
| 69 | </war> |
| 70 | <copy file="${app.file.ext}" tofile="${dist.dir}/${app.file.ext}"/> |
| 71 | </target> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 72 | |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 73 | <target name="generate-client" depends="declare-wsimport,build-setup" if="wsjar.available"> |
| 74 | <wsimport |
| 75 | debug="${debug}" |
| 76 | verbose="${verbose}" |
| 77 | failonerror="false" |
| 78 | keep="${keep}" |
| 79 | extension="${extension}" |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 80 | destdir="${build.classes.home}" |
| 81 | wsdl="${client.wsdl}"> |
| 82 | <binding dir="${basedir}/etc" includes="${client.binding}"/> |
| 83 | </wsimport> |
| 84 | </target> |
| 85 | |
| 86 | <target name="build-client" depends="generate-client"> |
| 87 | <javac |
| 88 | srcdir="src" |
| 89 | failonerror="false" |
| 90 | destdir="${build.classes.home}" |
| 91 | includes="**/client/**,**/common/**" classpathref="class.path"> |
| 92 | <classpath refid="wsit.classpath"/> |
| 93 | </javac> |
| 94 | </target> |
| 95 | |
| 96 | <target name="build-client1" depends="generate-client"> |
| 97 | <javac |
| 98 | failonerror="false" |
| 99 | srcdir="src" |
| 100 | destdir="${build.classes.home}" |
| 101 | includes="**/*Client.java" classpathref="class.path"> |
| 102 | <classpath refid="wsit.classpath"/> |
| 103 | </javac> |
| 104 | </target> |
| 105 | |
| 106 | <target name="build-client2"> |
| 107 | <javac |
| 108 | failonerror="false" |
| 109 | srcdir="src" |
| 110 | destdir="${build.classes.home}" |
| 111 | includes="**/client/*TestNG.java" classpathref="class.path"> |
| 112 | <classpath refid="wsit.classpath"/> |
| 113 | </javac> |
| 114 | </target> |
| 115 | |
arjantijms | dd4a168 | 2021-04-07 00:57:00 +0200 | [diff] [blame] | 116 | <target name="runtest"> |
| 117 | <record name="${basedir}/wsit1run.output" action="start"/> |
| 118 | <antcall target="runtest-impl"> |
| 119 | <param name="testng.test.name" value="${testng.test.name}"/> |
| 120 | <param name="testng.testclient" value="JaxwsFromWsdl"/> |
| 121 | </antcall> |
| 122 | <record name="${basedir}/wsit1run.output" action="stop"/> |
| 123 | </target> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 124 | |
| 125 | <target name="deploy"> |
| 126 | <antcall target="deploy-${deploy.platform}-impl"/> |
| 127 | </target> |
| 128 | |
| 129 | <target name="undeploy"> |
| 130 | <antcall target="undeploy-${deploy.platform}-impl"/> |
| 131 | </target> |
| 132 | |
| 133 | <target name="help"> |
| 134 | <echo message="server: Builds and deploy the service endpoint WAR"/> |
| 135 | <echo message="client: Builds the client"/> |
| 136 | <echo message="runtest: Runs the client"/> |
| 137 | <echo message="undeploy: Undeploy war"/> |
| 138 | <echo message="build-clean: Remove build dir"/> |
| 139 | </target> |
| 140 | |
| 141 | </project> |