blob: d46f9027438c1789b458af4b04b05e4250b68967 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 1997, 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
-->
<project basedir="." default="help" name="JaxwsFromWsdl">
<property file="build.properties" />
<property file="${ws.root}/gfproject/${deploy.platform}-config.properties"/>
<description>wsit tests</description>
<import file="${ws.root}/gfproject/build-impl.xml"/>
<import file="${ws.root}/gfproject/${deploy.platform}-targets.xml"/>
<target name="build-deploy" depends="server,client, runtest, undeploy" />
<target name="all" depends="server, client, runtest, undeploy"/>
<target name="server" depends="build-server-wsdl, create-war, deploy"/>
<target name="client" depends="generate-client, build-client1, build-client2"/>
<target name="build-setup">
<echo message="build-setup: build.home=${build.home}"/>
<mkdir dir="${build.classes.home}"/>
<mkdir dir="${build.war.home}"/>
</target>
<target name="build-server-wsdl" depends="declare-wsimport,build-setup" if="wsjar.available">
<wsimport
debug="${debug}"
verbose="${verbose}"
keep="${keep}"
extension="${extension}"
destdir="${build.classes.home}"
wsdl="${basedir}/${server.wsdl}">
<binding dir="${basedir}/etc" includes="${server.binding}"/>
</wsimport>
<javac
srcdir="${basedir}/src"
destdir="${build.classes.home}"
includes="**/server/**,**/common/**" classpathref="class.path">
<classpath refid="wsit.classpath"/>
</javac>
</target>
<target name="create-war">
<war warfile="${app.file.ext}" webxml="metadata/web.xml">
<webinf dir="metadata" includes="sun-jaxws.xml"/>
<zipfileset
dir="${basedir}/etc"
includes="*.wsdl, *.xsd"
prefix="WEB-INF/wsdl"/>
<classes dir="${build.classes.home}">
<include name="**/jaxwsfromwsdl/server/**/*.class"/>
</classes>
</war>
<copy file="${app.file.ext}" tofile="${dist.dir}/${app.file.ext}"/>
</target>
<target name="generate-client" depends="declare-wsimport,build-setup" if="wsjar.available">
<wsimport
debug="${debug}"
verbose="${verbose}"
failonerror="false"
keep="${keep}"
extension="${extension}"
destdir="${build.classes.home}"
wsdl="${client.wsdl}">
<binding dir="${basedir}/etc" includes="${client.binding}"/>
</wsimport>
</target>
<target name="build-client" depends="generate-client">
<javac
srcdir="src"
failonerror="false"
destdir="${build.classes.home}"
includes="**/client/**,**/common/**" classpathref="class.path">
<classpath refid="wsit.classpath"/>
</javac>
</target>
<target name="build-client1" depends="generate-client">
<javac
failonerror="false"
srcdir="src"
destdir="${build.classes.home}"
includes="**/*Client.java" classpathref="class.path">
<classpath refid="wsit.classpath"/>
</javac>
</target>
<target name="build-client2">
<javac
failonerror="false"
srcdir="src"
destdir="${build.classes.home}"
includes="**/client/*TestNG.java" classpathref="class.path">
<classpath refid="wsit.classpath"/>
</javac>
</target>
<target name="runtest">
<record name="${basedir}/wsit1run.output" action="start"/>
<antcall target="runtest-impl">
<param name="testng.test.name" value="${testng.test.name}"/>
<param name="testng.testclient" value="JaxwsFromWsdl"/>
</antcall>
<record name="${basedir}/wsit1run.output" action="stop"/>
</target>
<target name="deploy">
<antcall target="deploy-${deploy.platform}-impl"/>
</target>
<target name="undeploy">
<antcall target="undeploy-${deploy.platform}-impl"/>
</target>
<target name="help">
<echo message="server: Builds and deploy the service endpoint WAR"/>
<echo message="client: Builds the client"/>
<echo message="runtest: Runs the client"/>
<echo message="undeploy: Undeploy war"/>
<echo message="build-clean: Remove build dir"/>
</target>
</project>