blob: df1d91ad38c977db7b061de059b4f60966f5f1c4 [file] [log] [blame]
<!--
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
-->
<path id="classpath">
<fileset dir="${env.S1AS_HOME}/modules">
<include name="*.jar"/>
</fileset>
<fileset dir="${env.APS_HOME}/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="wsgen" depends="init-common">
<exec executable="${WSGEN}" failonerror="true" >
<arg line="${wsgen.args}" />
</exec>
</target>
<target name="wsimport" depends="init-common">
<exec executable="${WSIMPORT}" failonerror="true" >
<arg line="${wsimport.args}" />
</exec>
</target>
<target name="compile-client">
<mkdir dir="${build.classes.dir}/client"/>
<echo message="wsimporting http://${http.host}:${http.port}/${test-wsdl-uri}"/>
<antcall target="wsimport">
<param name="wsimport.args"
value="-keep -Xendorsed -d ${build.classes.dir}/client http://${http.host}:${http.port}/${test-wsdl-uri}"/>
</antcall>
<javac srcdir="." destdir="${build.classes.dir}/client"
includes="${client-src}/**">
<classpath refid="classpath"/>
</javac>
</target>
<target name="run-client">
<unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
<exec executable="${APPCLIENT}" dir="${build.classes.dir}/client">
<arg value="${client-class}"/>
<arg value="${other-args}"/>
</exec>
</target>
<target name="pkg-war">
<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/wsit/web/WEB-INF/"/>
<copy file="${sun-web.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/sun-web.xml" failonerror="false"/>
<copy file="${webservices.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/webservices.xml"
failonerror="false"/>
<copy verbose="true" toDir="${build.classes.dir}/tmp/WEB-INF/">
<fileset dir="${basedir}" includes="weblogic-webservices.xml"/>
</copy>
<copy file="${wsdlfile.location}/${wsdlfile.name}"
tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${wsdlfile.name}"
failonerror="false"/>
<copy file="${schemafile.location}/${schemafile.name}"
tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${schemafile.name}"
failonerror="false"/>
<copy file="${catalog.location}/jax-ws-catalog.xml"
todir="${build.classes.dir}/tmp/WEB-INF/"
failonerror="false"/>
<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="${war.classes}">
<include name="**/*.class"/>
<include name="**/${handler.name}"/>
</fileset>
</copy>
<copy toDir="${build.classes.dir}/tmp/wsit/web/WEB-INF" failonerror="false">
<fileset dir="${web.wsit.descriptors}"/>
</copy>
<echo message="Creating war file ${war.file}" level="verbose"/>
<jar jarfile="${war.file}" update="true">
<fileset dir="${build.classes.dir}/tmp" casesensitive="yes">
<include name="**/*class*"/>
<include name="**/${handler.name}"/>
</fileset>
<fileset dir="${build.classes.dir}/tmp/" casesensitive="true">
<include name="WEB-INF/web.xml"/>
<include name="WEB-INF/sun-web.xml"/>
<include name="WEB-INF/webservices.xml"/>
<include name="WEB-INF/weblogic-webservices.xml"/>
<include name="WEB-INF/jax-ws-catalog.xml"/>
<include name="WEB-INF/wsdl/${wsdlfile.name}"/>
<include name="WEB-INF/wsdl/${schemafile.name}"/>
</fileset>
<!-- Put WSIT descriptors under WEB-INF -->
<fileset dir="${build.classes.dir}/tmp/wsit/web" casesensitive="true">
<include name="WEB-INF/**"/>
</fileset>
</jar>
<echo message="created war file ${war.file}" level="verbose"/>
<delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/>
<echo message="my webclient war classes are:${webclient.war.classes}"
level="verbose"/>
</target>
<target name="pkg-ejb-jar">
<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/wsit/ejb/META-INF"/>
<copy toDir="${build.classes.dir}/tmp/wsit/ejb/META-INF" failonerror="false">
<fileset dir="${ejb.wsit.descriptors}"/>
</copy>
<jar destfile="${jar.file}">
<fileset dir="${build.classes.dir}" casesensitive="yes">
<include name="${jar.classes}/**"/>
</fileset>
<!-- Put WSIT descriptors under META-INF -->
<fileset dir="${build.classes.dir}/tmp/wsit/ejb" casesensitive="yes">
<include name="META-INF/**"/>
</fileset>
</jar>
</target>