blob: 6001af74d9366ac875d270f3c691a610d0ca2483 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE project [
<!--
Copyright (c) 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
-->
<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
<!ENTITY testproperties SYSTEM "file:./build.properties">
]>
<project name="SbMdbApp" default="usage" basedir=".">
&commonSetup;
&commonBuild;
&testproperties;
<target name="all"
depends="clean, build, setup, deploy, run, undeploy, unsetup"/>
<target name="run-test"
depends="clean, build, deploy, run, undeploy"/>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
<target name="setup"/>
<target name="unsetup"/>
<target name="compile" depends="init-common,clean-common, generate-artifacts">
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
<antcall target="compile-common">
<param name="src" value="web"/>
</antcall>
</target>
<target name="generate-artifacts">
<antcall target="import-wsdl">
<param name="mapping.file"
value="${client-mapping.xml}"/>
<param name="config-wsdl.file"
value="config/config-client.xml"/>
</antcall>
<antcall target="import-wsdl">
<param name="mapping.file"
value="${web-mapping.xml}"/>
<param name="config-wsdl.file"
value="config/config-web.xml"/>
</antcall>
</target>
<target name="ws-package-appclientjar-common">
<mkdir dir="${assemble.dir}"/>
<delete file="${appclient.jar}" failonerror="false"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
<copy file="${application-client.xml}"
tofile="${build.classes.dir}/META-INF/application-client.xml"/>
<copy file="${sun-application-client.xml}"
tofile="${build.classes.dir}/META-INF/sun-application-client.xml"/>
<copy file="${wsdl-file}"
tofile="${build.classes.dir}/META-INF/${wsdl-file}"/>
<jar jarfile="${appclient.jar}" basedir="${appclientjar.files}"
update="true" includes="${appclientjar.classes}"
manifest="./client/MANIFEST.MF">
<fileset dir="${build.classes.dir}" includes="${client-mapping.xml}"/>
<metainf dir="${build.classes.dir}/META-INF">
<include name="application-client.xml"/>
<include name="sun-application-client.xml"/>
<include name="${wsdl-file}"/>
</metainf>
</jar>
<delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
</target>
<target name="ws-package-war-common">
<echo message="my build classes dir is:${build.classes.dir}"/>
<delete file="${war.file}"/>
<mkdir dir="${build.classes.dir}/tmp"/>
<mkdir dir="${build.classes.dir}/tmp/WEB-INF"/>
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/classes"/>
<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 file="${mappingfile.location}/${mappingfile.name}"
tofile="${build.classes.dir}/tmp/${mappingfile.name}"
failonerror="false"/>
<copy file="${wsdlfile.location}/${wsdlfile.name}"
tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${wsdlfile.name}"
failonerror="false"/>
<copy file="${web.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/web.xml"/>
<copy todir="${build.classes.dir}/tmp/WEB-INF/classes">
<fileset dir="${build.classes.dir}">
<include name="${war.classes}"/>
</fileset>
</copy>
<echo message="Creating war file ${war.file}"/>
<jar jarfile="${war.file}" update="true">
<fileset dir="${build.classes.dir}/tmp" casesensitive="yes">
<include name="**/*class*"/>
</fileset>
<fileset dir="${basedir}/web" casesensitive="yes">
<include name="**/*.html"/>
<include name="**/*.jsp"/>
<include name="**/*.gif"/>
<include name="**/*.do"/>
<exclude name="**/*.java,**/*.xml,**/*.properties"/>
</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/wsdl/${wsdlfile.name}"/>
<include name="${mappingfile.name}"/>
</fileset>
</jar>
<echo message="created war file ${war.file}"/>
<delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/>
<echo message="my webclient war classes are:${webclient.war.classes}"/>
</target>
<target name="build" depends="init-common,compile">
<antcall target="ws-package-appclientjar-common">
<param name="appclientjar.classes"
value="com/sun/s1peqe/webservices/servlet/taxcal/client/*.class" />
<param name="appclientjar.files"
value="${build.classes.dir}"/>
<param name="appclient.jar"
value="${assemble.dir}/${appname}-client.jar"/>
</antcall>
<!--antcall target="ws-war-common"-->
<antcall target="ws-package-war-common">
<param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
<param name="war.classes"
value="com/sun/s1peqe/webservices/servlet/taxcal/*.class" />
<param name="mappingfile.name"
value="${web-mapping.xml}" />
<param name="mappingfile.location"
value="${build.classes.dir}"/>
<param name="webservices.xml"
value="${web-webservices.xml}" />
</antcall>
<antcall target="ear-common"/>
</target>
<target name="deploy"
depends="init-common, reconfig-common">
<antcall target="deploy-common"/>
</target>
<target name="run" depends="init-common">
<property name="statetax-endpoint-url"
value="http://${http.host}:${http.port}/TaxCalWSServlet/statetaxservlet"/>
<property name="fedtax-endpoint-url"
value="http://${http.host}:${http.port}/TaxCalWSServlet/fedtaxservlet"/>
<antcall target="runclient-common">
<param name="appclient.application.args"
value="${statetax-endpoint-url} ${fedtax-endpoint-url}"/>
</antcall>
</target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
</target>
<target name="usage">
<antcall target="usage-common"/>
</target>
<!--
=======================================================
User Defined specific targets
=======================================================
-->
</project>