Author: mmerz
Date: Tue Sep 21 13:56:40 2004
New Revision: 46998
Modified:
incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build.xml
Log:
Enhanced the build script.
Contributor: Daryoush Mehrtash
Modified:
incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build.xml
==============================================================================
---
incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build.xml
(original)
+++
incubator/beehive/trunk/wsm/samples/dropInDeployment/AddressBook/server/build.xml
Tue Sep 21 13:56:40 2004
@@ -1,39 +1,54 @@
<?xml version="1.0" ?>
<project name="AddressBookWS" default="all">
+ <property environment="env"/>
- <property name="AnnotatedAxisWebappHome"
value="C:\apps\jakarta-tomcat-4.1.30\webapps\AnnotatedAxis\"/>
+ <property name="webapp.dir" value="${env.TOMCAT_HOME}\webapps\"/>
+ <property name="AnnotatedAxis.base.dir"
value="${webapp.dir}\AnnotatedAxis\"/>
+
+ <condition property="isJDK15">
+ <equals arg1="${ant.java.version}" arg2="1.5"/>
+ </condition>
<path id="jars">
- <fileset dir="${AnnotatedAxisWebappHome}/WEB-INF/lib/">
+ <fileset dir="${AnnotatedAxis.base.dir}/WEB-INF/lib/">
<include name="**/*.jar"/>
</fileset>
</path>
- <target name="all" depends="verify,compile, test, build_deploy,
deploy"/>
+ <target name="all" depends="verify,compile, test, build_deploy"/>
<target name="clean">
<delete dir="build"/>
- <mkdir dir="build/classes"/>
</target>
+ <target name="dirs">
+ <mkdir dir="build/classes"/>
+ </target>
<target name="verify" >
- <fail message="AnnotatedAxisWebappHome must be set to the
Annotated Axis Webapp directory.">
+ <fail message="Failed to find the webapps directory. Set
webapp.dir in the build.xml to your servlet container's webapp directory.">
+ <condition >
+ <not>
+ <available
file="${webapp.dir}" />
+ </not>
+ </condition>
+ </fail>
+ <fail message="Failed to find the AnnotatedAxis webapp. Make
sure the AnnotatedAxis is deployed to your webapps directory.">
<condition >
<not>
- <isset property="AnnotatedAxisWebappHome"/>
+ <isset property="AnnotatedAxis.base.dir"/>
</not>
</condition>
</fail>
- <fail message="Failed to find Annototated Axis in
${AnnotatedAxisWebappHome}">
+ <fail message="Failed to find required jar files in the
Annototated Axis">
<condition >
<not>
<and>
- <available
file="${AnnotatedAxisWebappHome}/WEB-INF/lib/wsm.jar"
property="annotated.axis.present"/>
- <available
file="${AnnotatedAxisWebappHome}/WEB-INF/lib/wsm-axis.jar"
property="annotated.axis.present"/>
+ <available
file="${AnnotatedAxis.base.dir}/WEB-INF/lib/wsm.jar"
property="annotated.axis.present"/>
+ <available
file="${AnnotatedAxis.base.dir}/WEB-INF/lib/wsm-axis.jar"
property="annotated.axis.present"/>
</and>
</not>
</condition>
@@ -41,7 +56,7 @@
</target>
- <target name="compile" >
+ <target name="compile" depends="dirs" if="isJDK15">
<javac srcdir="src"
destdir="build/classes"
classpathref="jars"
@@ -87,9 +102,9 @@
</jar>
</target>
- <target name="deploy" depends="verify,compile, test, build_deploy"
if="AnnotatedAxisWebappHome">
- <copy file="AddressBookWS.jar"
todir="${AnnotatedAxisWebappHome}/WEB-INF/lib/" overwrite="true" />
- <copy file="web/AddressBookWebService.jws"
todir="${AnnotatedAxisWebappHome}/" overwrite="true" />
+ <target name="deploy" depends="verify,compile, test, build_deploy"
if="AnnotatedAxis.base.dir">
+ <copy file="AddressBookWS.jar"
todir="${AnnotatedAxis.base.dir}/WEB-INF/lib/" overwrite="true" />
+ <copy file="web/AddressBookWebService.jws"
todir="${AnnotatedAxis.base.dir}/" overwrite="true" />
</target>