| <?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 commonlazyinit SYSTEM "file:./../common.xml"> | |
| <!ENTITY testproperties SYSTEM "file:./build.properties"> | |
| ]> | |
| <project name="EjbBasedWebService" default="usage" basedir="."> | |
| &commonSetup; | |
| &commonBuild; | |
| &commonlazyinit; | |
| &testproperties; | |
| <target name="all" | |
| depends="pre-start, 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="ejb"/> | |
| </antcall> | |
| <antcall target="compile-common"> | |
| <param name="src" value="client"/> | |
| </antcall> | |
| </target> | |
| <target name="generate-artifacts"> | |
| <antcall target="import-wsdl"> | |
| <param name="mapping.file" | |
| value="${ejb-mapping.xml}"/> | |
| <param name="config-wsdl.file" | |
| value="config/config-ejb.xml"/> | |
| </antcall> | |
| <antcall target="import-wsdl"> | |
| <param name="mapping.file" | |
| value="${client-mapping.xml}"/> | |
| <param name="config-wsdl.file" | |
| value="config/config-client.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-ejb-jar-common" depends="init-common"> | |
| <mkdir dir="${assemble.dir}"/> | |
| <delete file="${ejb.jar}" failonerror="false"/> | |
| <mkdir dir="${build.classes.dir}/META-INF"/> | |
| <copy file="${ejb-jar.xml}" | |
| tofile="${build.classes.dir}/META-INF/ejb-jar.xml"/> | |
| <copy file="${sun-ejb-jar.xml}" | |
| tofile="${build.classes.dir}/META-INF/sun-ejb-jar.xml"/> | |
| <copy file="${webservices.xml}" | |
| tofile="${build.classes.dir}/META-INF/webservices.xml"/> | |
| <copy file="${sun-cmp-mappings.xml}" | |
| tofile="${build.classes.dir}/META-INF/sun-cmp-mappings.xml" | |
| failonerror="false"/> | |
| <copy file="${wsdl-file}" | |
| tofile="${build.classes.dir}/META-INF/${wsdl-file}" | |
| failonerror="false"/> | |
| <copy file="${dbschema}" todir="${build.classes.dir}" failonerror="false"/> | |
| <jar jarfile="${ejb.jar}" basedir="${ejbjar.files}" update="true" | |
| includes ="${ejbjar.classes}"> | |
| <fileset dir="${build.classes.dir}" includes="${ejb-mapping.xml}"/> | |
| <metainf dir="${build.classes.dir}/META-INF"> | |
| <include name="ejb-jar.xml"/> | |
| <include name="sun-ejb-jar.xml"/> | |
| <include name="sun-cmp-mappings.xml"/> | |
| <include name="webservices.xml"/> | |
| <include name="${wsdl-file}"/> | |
| <!--<include name="${dbschema}"/>--> | |
| </metainf> | |
| </jar> | |
| <delete dir="${build.classes.dir}/META-INF" | |
| failonerror="false"/> | |
| </target> | |
| <target name="build" depends="init-common,compile"> | |
| <antcall target="ws-package-ejb-jar-common"> | |
| <param name="ejbjar.classes" | |
| value="com/sun/s1peqe/webservices/ejb/taxcal/*.class" /> | |
| <param name="ejbjar.files" value="${build.classes.dir}"/> | |
| <param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/> | |
| </antcall> | |
| <antcall target="ws-package-appclientjar-common"> | |
| <param name="appclientjar.classes" | |
| value="com/sun/s1peqe/webservices/ejb/taxcal/client/*.class" /> | |
| <param name="appclientjar.files" | |
| value="${build.classes.dir}"/> | |
| <param name="appclient.jar" | |
| value="${assemble.dir}/${appname}-client.jar"/> | |
| </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"> | |
| <antcall target="restart-server"/> | |
| <property name="statetax-ejb-endpoint-url" | |
| value="http://${http.host}:${http.port}/statetaxejb"/> | |
| <property name="fedtax-ejb-endpoint-url" | |
| value="http://${http.host}:${http.port}/fedtaxejb"/> | |
| <echo message="property statetax-ejb-endpoint-url is set to: ${statetax-ejb-endpoint-url}"/> | |
| <echo message="property fedtax-ejb-endpoint-url is set to: ${fedtax-ejb-endpoint-url}"/> | |
| <antcall target="runclient-common"> | |
| <param name="appclient.application.args" | |
| value="${statetax-ejb-endpoint-url} ${fedtax-ejb-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> |