blob: 039721821bb7e8934af8b14b4a25aac8c38c8b75 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021 Contributors to Eclipse Foundation.
Copyright (c) 2014, 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="jsr109tester">
<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, 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" depends="declare-wsimport,build-setup" if="wsjar.available">
<javac srcdir="${basedir}/src" destdir="${build.classes.home}" includes="**/server/**,**/common/**" classpathref="class.path">
<classpath refid="wsit.classpath" />
</javac>
</target>
<target name="create-war">
<zip destfile="${app.file.ext}">
<zipfileset dir="${build.classes.home}" prefix="WEB-INF/classes">
<include name="fromjava/server/**/**" />
</zipfileset>
</zip>
<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}" package="${client.package}">
</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}/wsit2run.output" action="start" />
<antcall target="runtest-impl">
<param name="testng.test.name" value="${testng.test.name}" />
<param name="testng.testclient" value="jsr109tester" />
</antcall>
<record name="${basedir}/wsit2run.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>