| <!-- |
| |
| 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="google 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="mejbclient"/> |
| </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}/google"> |
| <fileset dir="output/google" |
| includes="DirectoryCategory.class, GoogleSearchResult.class, GoogleSearchService.class, GoogleSearchPort.class, ResultElement.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}/googleejb"> |
| <fileset dir="output/googleejb" |
| includes="DirectoryCategory.class, GoogleSearchResult.class, GoogleSearchPort.class, ResultElement.class"/> |
| </copy> |
| <delete dir="output"/> |
| </target> |
| |
| <target name="assemble" depends="init-common, compile"> |
| <copy todir="${build.classes.dir}/META-INF/wsdl" |
| file="GoogleSearch.wsdl"/> |
| <copy todir="${build.classes.dir}" |
| file="GoogleMapping_appclient.xml"/> |
| <antcall target="appclient-jar-common"> |
| <param name="appclientjar.classes" |
| value="GoogleMapping_appclient.xml,META-INF/wsdl/**,google/*.class" /> |
| |
| </antcall> |
| <copy todir="${build.classes.dir}" |
| file="GoogleMapping_ejb.xml"/> |
| <antcall target="ejb-jar-common"> |
| <param name="ejbjar.classes" |
| value="GoogleMapping_ejb.xml,META-INF/wsdl/**,googleejb/*.class" /> |
| |
| </antcall> |
| <antcall target="ear-common" /> |
| </target> |
| |
| <target name="build-mejb" depends="init-common, compile"> |
| <copy file="mejbclient/application-client.xml" tofile="${build.classes.dir}/META-INF/application-client.xml"/> |
| <copy file="mejbclient/sun-application-client.xml" tofile="${build.classes.dir}/META-INF/sun-application-client.xml"/> |
| <mkdir dir="${assemble.dir}"/> |
| <jar destfile="${assemble.dir}/mejbclient.jar" manifest="mejbclient/MANIFEST.MF"> |
| <fileset dir="${build.classes.dir}" |
| includes="google/MEJBClient.class META-INF/application-client.xml META-INF/sun-application-client.xml" |
| /> |
| </jar> |
| </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="google"/> |
| <delete dir="googleejb"/> |
| <delete file="GoogleMapping_ejb.xml"/> |
| <delete file="GoogleMapping_appclient.xml"/> |
| <delete file="jaxrpc.log"/> |
| </target> |
| |
| <target name="run-mejbclient" depends="init-common"> |
| <exec executable="${APPCLIENT}" failonerror="true"> |
| <arg line="-client ${assemble.dir}/mejbclient.jar"/> |
| <arg line="-textauth"/> |
| <arg line="-user j2ee"/> |
| <arg line="-password j2ee"/> |
| <arg line="${appclient.application.args}"/> |
| </exec> |
| </target> |
| |
| <target name="run" depends="init-common"> |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="spellng http://${http.host}:${http.port}/googleejb/GoogleSearch"/> |
| </antcall> |
| </target> |
| |
| <target name="undeploy" depends="init-common"> |
| <antcall target="undeploy-common"/> |
| </target> |
| |
| <target name="contactgoogle"> |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="spellng"/> |
| </antcall> |
| </target> |
| |
| <target name="gen-mapping-appclient" depends="init-common"> |
| <antcall target="run.wscompile"> |
| <param name="wscompile.command" |
| value="-gen -cp . -mapping GoogleMapping_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 GoogleMapping_ejb.xml wscompile_config_ejb.xml"/> |
| </antcall> |
| </target> |
| |
| <target name="usage"> |
| <echo> |
| Usage: |
| ant all (Executes the WebServices test) |
| ant contactgoogle (Executes the appclient contacting the Google.com WebServices) |
| </echo> |
| </target> |
| </project> |