build.xml revision ada1678a4262b208a7b87391f520a7767d25287c
<?xml version="1.0"?>
<!DOCTYPE project [
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
and Distribution License("CDDL") (collectively, the "License"). You
may not use this file except in compliance with the License. You can
obtain a copy of the License at
language governing permissions and limitations under the License.
When distributing the software, include this License Header Notice in each
GPL Classpath Exception:
Oracle designates this particular file as subject to the "Classpath"
exception as provided by Oracle in the GPL Version 2 section of the License
file that accompanied this code.
Modifications:
If applicable, add the following below the License Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyright [year] [name of copyright owner]"
Contributor(s):
If you wish your version of this file to be governed by only the CDDL or
only the GPL Version 2, indicate your decision by adding "[Contributor]
elects to include this software in this distribution under the [CDDL or GPL
Version 2] license." If you don't indicate a single choice of license, a
recipient has the option to distribute your version of this file under
either the CDDL, the GPL Version 2 or to extend the choice of license to
its licensees as provided above. However, if you add GPL Version 2 code
and therefore, elected the GPL Version 2 license, then the option applies
only if the new code is made subject to such option by the copyright
holder.
-->
]>
<project name="web-client" default="all" basedir=".">
&commonBuild;
&jaxwsTools;
&jbiproperties;
&testproperties;
<target name="all" depends="clean, setup, runtest, undeploy"/>
<target name="clean">
<antcall target="clean-common"/>
</target>
<target name="setup" depends="assemble-ejb, deploy-app, assemble-client, deploy-client, deploy-dummy-app"/>
<target name="compile">
<antcall target="compile-common">
<param name="src" value="endpoint"/>
</antcall>
</target>
<target name="assemble-ejb" depends="compile">
<echo message="Assembling web service module"/>
<mkdir dir="${assemble.dir}"/>
<jar destfile="${assemble.dir}/${appname}.jar"
basedir="${build.classes.dir}"
includes="endpoint/**">
</jar>
</target>
<target name="deploy-app">
<exec executable="${ASADMIN}">
<arg line="deploy"/>
<arg line="--user ${admin.user}"/>
<arg line="--host ${admin.host}"/>
<arg line="--port ${admin.port}"/>
<arg line="${app.jar}"/>
</exec>
</target>
<target name="assemble-client" >
<echo message="Assembling web client"/>
<mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
<mkdir dir="${assemble.dir}"/>
<echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
<antcall target="wsimport">
<param name="wsimport.args"
value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
</antcall>
classpath="${env.S1AS_HOME}/modules/javax.servlet.jar:${env.S1AS_HOME}/modules/javax.ejb.jar:${env.S1AS_HOME}/modules/javax.transaction.jar"
debug="on"
includes="webclient/**"/>
<jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
</target>
<target name="deploy-client">
<mkdir dir="/temp"/>
<antcall target="deploy-jbi-component-su">
<param name="jbi-su-dir" value="${jbi-client-su-dir}"/>
<param name="jbi-su-assembly" value="${jbi-client-su-assembly}"/>
</antcall>
</target>
<target name="deploy-dummy-app">
<antcall target="deploy-jbi-component-su">
<param name="jbi-su-dir" value="${jbi-dummy-su-dir}"/>
<param name="jbi-component-su" value="${jbi-dummy-su}"/>
<param name="jbi-su-assembly" value="${jbi-dummy-su-assembly}"/>
</antcall>
</target>
<target name="undeploy" >
<antcall target="undeploy-app"/>
<antcall target="undeploy-jbi-client"/>
<antcall target="undeploy-dummy-app"/>
</target>
<target name="undeploy-app">
<exec executable="${ASADMIN}">
<arg line="undeploy"/>
<arg line="--user ${admin.user}"/>
<arg line="--host ${admin.host}"/>
<arg line="--port ${admin.port}"/>
<arg line="${appname}"/>
</exec>
</target>
<target name="undeploy-jbi-client">
<antcall target="undeploy-jbi-component-su">
<param name="jbi-su-assembly" value="${jbi-client-su-assembly}"/>
</antcall>
</target>
<target name="undeploy-dummy-app">
<antcall target="undeploy-jbi-component-su">
<param name="jbi-su-assembly" value="${jbi-dummy-su-assembly}"/>
</antcall>
</target>
<target name="runtest" >
<mkdir dir="${build.classes.dir}/client"/>
classpath="${env.APS_HOME}/jbi/lib/reporter.jar"
includes="client/**"/>
<java classname="client.TestClient">
<classpath>
<pathelement path="${build.classes.dir}/client"/>
</classpath>
<arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
</java>
</target>
</project>