blob: 01ef8c3d282268994b33fa9e133de73465988073 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Copyright (c) 2017, 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 commonRun SYSTEM "file:./../../../../config/run.xml">
<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
<!ENTITY testproperties SYSTEM "file:./build.properties">
]>
<project name="libdependent" default="all" basedir=".">
&commonSetup;
&commonBuild;
&commonRun;
&testproperties;
&jaxwsTools;
<target name="all" depends="clean, setup, runclient, undeploy"/>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
<target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
<target name="compile" depends="init-common">
<antcall target="compile-common">
<param name="src" value="outsidepkg"/>
</antcall>
<antcall target="compile-common">
<param name="src" value="endpoint"/>
</antcall>
</target>
<target name="assemble-web" depends="init-common, compile">
<mkdir dir="${assemble.dir}"/>
<echo message="my build classes dir is:${build.classes.dir}" level="verbose"/>
<mkdir dir="${build.classes.dir}/tmp"/>
<mkdir dir="${build.classes.dir}/tmp/WEB-INF"/>
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/classes"/>
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/lib"/>
<jar jarfile="${build.classes.dir}/tmp/WEB-INF/lib/dep.jar" update="true">
<fileset dir="${build.classes.dir}" casesensitive="yes">
<include name="outsidepkg/*class*"/>
</fileset>
</jar>
<copy file="${web.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/web.xml" failonerror="false"/>
<copy todir="${build.classes.dir}/tmp/WEB-INF/classes">
<fileset dir="${build.classes.dir}">
<include name="endpoint/*.class"/>
</fileset>
</copy>
<echo message="Creating war file ${assemble.dir}/${appname}-web.war" level="verbose"/>
<jar jarfile="${assemble.dir}/${appname}-web.war" update="true">
<fileset dir="${build.classes.dir}/tmp" casesensitive="yes">
<include name="**/*class*"/>
</fileset>
<fileset dir="${build.classes.dir}/tmp/" casesensitive="true">
<include name="WEB-INF/web.xml"/>
<include name="WEB-INF/lib/*.jar"/>
</fileset>
</jar>
<echo message="created war file ${assemble.dir}/${appname}-web.war" level="verbose"/>
</target>
<target name="assemble-client" depends="init-common">
<antcall target="compile-client">
<param name="test-wsdl-uri" value="${appname}/webservice/HelloService?WSDL"/>
<param name="client-src" value="client"/>
</antcall>
</target>
<target name="deploy-app">
<antcall target="deploy-war-common">
<param name="contextroot" value="${appname}"/>
</antcall>
</target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-war-common"/>
</target>
<target name="runclient">
<antcall target="run-client">
<param name="client-class" value="client.Client"/>
<param name="other-args" value="libdependent-war"/>
</antcall>
</target>
</project>