blob: fc34f0695b29efa570895b6e59ac0869daafa0de [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="xsd test" default="usage" basedir=".">
<!-- include common.xml and testcommon.xml -->
&commonSetup;
&commonBuild;
&testproperties;
<target name="all" depends="clean,build,deploy,run,undeploy"/>
<target name="run.wscompile">
<exec executable="${WSCOMPILE}" failonerror="true" >
<arg line="-source 1.1.2 ${wscompile.command}" />
</exec>
</target>
<target name="compile" depends="">
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
<antcall target="compile-common">
<param name="src" value="ejb"/>
</antcall>
</target>
<target name="build" depends="init-common, clean">
<antcall target="gen-mapping-appclient"/>
<antcall target="gen-mapping-ejb"/>
<antcall target="wscompile-appclient"/>
<antcall target="wscompile-ejb"/>
<antcall target="assemble"/>
</target>
<target name="wscompile-appclient" depends="init-common">
<mkdir dir="output"/>
<antcall target="run.wscompile">
<param name="wscompile.command"
value="-import -keep -d output -s output -classpath . wscompile_config_appclient.xml"/>
</antcall>
<copy todir="${build.classes.dir}/xsdany">
<fileset dir="output/xsdany"
includes="TestService.class, Test.class, SingleWildcardType.class, RepeatedWildcardType.class, Test1RequestType.class, Test1ResponseType.class"/>
</copy>
<delete dir="output"/>
</target>
<target name="wscompile-ejb" depends="init-common">
<mkdir dir="output"/>
<antcall target="run.wscompile">
<param name="wscompile.command"
value="-import -keep -d output -s output -classpath . wscompile_config_ejb.xml"/>
</antcall>
<copy todir="${build.classes.dir}/xsdanyejb">
<fileset dir="output/xsdanyejb"
includes="TestService.class, Test.class, SingleWildcardType.class, RepeatedWildcardType.class, Test1RequestType.class, Test1ResponseType.class"/>
</copy>
<delete dir="output"/>
</target>
<target name="assemble" depends="init-common, compile">
<copy todir="${build.classes.dir}/META-INF/wsdl"
file="xsdany.wsdl"/>
<copy todir="${build.classes.dir}"
file="XsdAnyMapping_appclient.xml"/>
<antcall target="appclient-jar-common">
<param name="appclientjar.classes"
value="XsdAnyMapping_appclient.xml,META-INF/wsdl/**,xsdany/*.class" />
</antcall>
<copy todir="${build.classes.dir}"
file="XsdAnyMapping_ejb.xml"/>
<antcall target="ejb-jar-common">
<param name="ejbjar.classes"
value="XsdAnyMapping_ejb.xml,META-INF/wsdl/**,xsdanyejb/*.class" />
</antcall>
<antcall target="ear-common" />
</target>
<target name="deploy"
depends="init-common">
<antcall target="deploy-common"/>
</target>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
<delete dir="output"/>
<delete dir="xsdany"/>
<delete dir="xsdanyejb"/>
<delete file="XsdAnyMapping_ejb.xml"/>
<delete file="XsdAnyMapping_appclient.xml"/>
<delete file="jaxrpc.log"/>
</target>
<target name="run" depends="init-common">
<antcall target="runclient-common">
<param name="appclient.application.args" value="http://${http.host}:${http.port}/xsdanyejb/XsdAnyTest"/>
</antcall>
</target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
</target>
<target name="gen-mapping-appclient" depends="init-common">
<antcall target="run.wscompile">
<param name="wscompile.command"
value="-gen -cp . -mapping XsdAnyMapping_appclient.xml wscompile_config_appclient.xml"/>
</antcall>
</target>
<target name="gen-mapping-ejb" depends="init-common">
<antcall target="run.wscompile">
<param name="wscompile.command"
value="-gen -cp . -mapping XsdAnyMapping_ejb.xml wscompile_config_ejb.xml"/>
</antcall>
</target>
<target name="usage">
<echo>
Usage:
ant all (Executes the WebServices test)
</echo>
</target>
</project>