[MOBY-guts] biomoby commit
Martin Senger
senger at pub.open-bio.org
Thu Sep 22 09:47:43 UTC 2005
senger
Thu Sep 22 05:47:43 EDT 2005
Update of /home/repository/moby/moby-live/Java
In directory pub.open-bio.org:/tmp/cvs-serv15725
Modified Files:
build.xml
Log Message:
moby-live/Java build.xml,1.36,1.37
===================================================================
RCS file: /home/repository/moby/moby-live/Java/build.xml,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- /home/repository/moby/moby-live/Java/build.xml 2005/09/21 04:02:15 1.36
+++ /home/repository/moby/moby-live/Java/build.xml 2005/09/22 09:47:43 1.37
@@ -95,9 +95,11 @@
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
+ <!--
<fileset dir="${lib.dir}/ant_home/lib">
<include name="*.jar"/>
</fileset>
+ -->
</path>
<!-- this differs from the ${build.classpath} by not including
@@ -750,33 +752,16 @@
<fileset dir="${build.lib}" includes="${datatypes.jar},${skeletons.jar}"/>
</foreach>
- <!-- copy user-defined jar files to Tomcat/Axis -->
- <if>
- <isset property="users.lib.dir"/>
- <then>
- <copy todir="${deploy.axis.dir}/lib">
- <fileset dir="${users.lib.dir}" includes="*.jar"/>
- </copy>
- </then>
- </if>
- <if>
- <isset property="users.lib.file"/>
- <then>
- <copy todir="${deploy.axis.dir}/lib" file="${users.lib.file}"/>
- </then>
- </if>
-
- <!-- copy remaining jar files to Tomcat/Axis -->
- <copy todir="${deploy.axis.dir}/lib">
- <fileset dir="${lib.dir}">
- <include name="${alltools2}"/>
- <include name="${jdom}"/>
- </fileset>
- <fileset dir="${build.lib}" includes="*.jar"/>
- </copy>
+ <!-- copy user-defined and remaining jar files to Tomcat/Axis -->
+ <antcall target="-populate">
+ <param name="destination.axis.dir" location="${deploy.axis.dir}/lib"/>
+ </antcall>
</target>
+ <!-- ================================================================== -->
+ <!-- Sub-target of tomcat-populate (called for each jar file) -->
+ <!-- ================================================================== -->
<!-- parameter: ${jarfile.name} -->
<target name="-merge-jars">
<basename property="jarfile.base.name" file="${jarfile.name}"/>
@@ -799,6 +784,41 @@
</target>
+ <!-- ================================================================== -->
+ <!-- Sub-target of tomcat-populate -->
+ <!-- (used both for local and remote deployment) -->
+ <!-- ================================================================== -->
+ <!-- parameter: ${destination.axis.dir} -->
+ <target name="-populate">
+
+ <!-- copy user-defined jar files to Tomcat/Axis -->
+ <if>
+ <isset property="users.lib.dir"/>
+ <then>
+ <copy todir="${destination.axis.dir}">
+ <fileset dir="${users.lib.dir}" includes="*.jar"/>
+ </copy>
+ </then>
+ </if>
+ <if>
+ <isset property="users.lib.file"/>
+ <then>
+ <copy todir="${destination.axis.dir}" file="${users.lib.file}"/>
+ </then>
+ </if>
+
+ <!-- copy remaining jar files to Tomcat/Axis -->
+ <!-- (TBD: perhaps the list of jar files should be in a property,
+ so usesr can change it...) -->
+ <copy todir="${destination.axis.dir}">
+ <fileset dir="${lib.dir}">
+ <include name="${alltools2}"/>
+ <include name="${jdom}"/>
+ </fileset>
+ <fileset dir="${build.lib}" includes="*.jar"/>
+ </copy>
+
+ </target>
<!-- ================================================================== -->
<!-- Find all services (in properties), create and use their wsdd files -->
@@ -897,8 +917,141 @@
</fail>
<echo message="${services.list}" taskname="Services names"/>
</target>
+
+
+ <!-- ================================================================== -->
+ <!-- Create a file that will be used to do a remote deployment -->
+ <!-- ================================================================== -->
+ <target name="deploy-remote" depends="init,-find-services"
+ description="Create a file for the service deployment of services">
+
+ <tempfile property="build.remote.dir" destDir="${java.io.tmpdir}/mobyremotedeploy-${user.name}"/>
+ <property name="result.file" value="moby-services-to-deploy-${TODAY_SHORT}"/>
+ <property name="result.dir" location="${build.remote.dir}/${result.file}"/>
+ <mkdir dir="${result.dir}"/>
+
+ <!-- create wsdd for deployment of each service -->
+ <foreach list="${services.list}"
+ delimiter=","
+ inheritall="yes"
+ target="-wsdd-for-remote"
+ param="service.name"/>
+
+ <!-- create wsdd for un-deployment of each service -->
+ <mkdir dir="${result.dir}/undeploy-wsdd"/>
+ <foreach list="${services.list}"
+ delimiter=","
+ inheritall="yes"
+ target="-un-wsdd-for-remote"
+ param="service.name"/>
+
+ <!-- add jar files that will need to be merged -->
+ <copy todir="${result.dir}/lib2">
+ <fileset dir="${build.lib}" includes="${datatypes.jar},${skeletons.jar}"/>
+ </copy>
+
+ <!-- add user-defined and other jar files (but not those already in lib2) -->
+ <antcall target="-populate">
+ <param name="destination.axis.dir" location="${result.dir}/lib"/>
+ </antcall>
+ <delete quiet="true">
+ <fileset dir="${result.dir}/lib" includes="${datatypes.jar},${skeletons.jar}"/>
+ </delete>
+
+ <!-- add separate build.xml for deployment, and scripts to use it -->
+ <property name="cross.tomcat.home" value="${real.catalina.home}"/>
+ <property name="cross.tomcat.port" value="${tomcat.port}"/>
+ <property name="cross.tomcat.host" value="${tomcat.host}"/>
+ <property name="cross.axis.relative.path" value="${axis.relative.path}"/>
+ <property name="cross.axis.admin.url" value="${cross.axis.relative.path}/servlet/AxisServlet"/>
+
+ <copy file="${src.webapps}/remote.deploy.build.xml.template"
+ tofile="${result.dir}/build.xml">
+ <filterset>
+ <filter token="TOMCAT_HOME" value="${cross.tomcat.home}"/>
+ <filter token="TOMCAT_PORT" value="${cross.tomcat.port}"/>
+ <filter token="TOMCAT_HOST" value="${cross.tomcat.host}"/>
+ <filter token="AXIS_RELATIVE_PATH" value="${cross.axis.relative.path}"/>
+ <filter token="AXIS_ADMIN_URL" value="${cross.axis.admin.url}"/>
+ </filterset>
+ </copy>
+ <copy todir="${result.dir}">
+ <fileset dir="${src.webapps}" includes="*.bat,deploy"/>
+ </copy>
+
+ <!-- add (some) Ant libraries -->
+ <copy todir="${result.dir}/ant_home/lib">
+ <fileset dir="${lib.dir}/ant_home/lib">
+ <include name="ant-antlr.jar"/>
+ <include name="ant.jar"/>
+ <include name="ant-apache-log4j.jar"/>
+ <include name="ant-apache-regexp.jar"/>
+ <include name="ant-launcher.jar"/>
+ <include name="xercesImpl.jar"/>
+ <include name="ant-contrib.jar"/>
+ <include name="xml-apis.jar"/>
+ </fileset>
+ </copy>
+
+ <!-- add Axis libraries -->
+ <copy todir="${result.dir}/lib">
+ <fileset dir="${lib.dir}">
+ <include name="activation.jar"/>
+ <include name="axis-ant.jar"/>
+ <include name="axis.jar"/>
+ <include name="commons-discovery-0.2.jar"/>
+ <include name="commons-httpclient-3.0-rc2.jar"/>
+ <include name="commons-logging-1.0.4.jar"/>
+ <include name="jaxrpc.jar"/>
+ <include name="log4j-1.2.8.jar"/>
+ <include name="mailapi_1_3_1.jar"/>
+ <include name="saaj.jar"/>
+ <include name="servlet.jar"/>
+ <include name="wsdl4j-1.5.1.jar"/>
+ </fileset>
+ </copy>
+
+ <!-- pack it together and say a warm message -->
+ <tar tarfile="${build.dir}/${result.file}.tar.gz"
+ basedir="${build.remote.dir}"
+ longfile="gnu"
+ compression="gzip"/>
+ <delete dir="${build.remote.dir}" quiet="true"/>
+ <echo taskname="To do">
+===========================================================
+File ${build.dir}/${result.file}.tar.gz
+for a remote deployment was created. Copy it to the machine
+where you wish the services to be deployed. Untar it,
+change to the created directory, and invoke:
+ sh deploy (or deploy.bat on Windows)
+===========================================================
+ </echo>
+ </target>
<!-- ================================================================== -->
+ <!-- Call to create a wsdd file that will be used for a remote deployment -->
+ <!-- ================================================================== -->
+ <target name="-wsdd-for-remote">
+ <antcall target="create-wsdd">
+ <param name="service.name" value="${service.name}"/>
+ <param name="wsdd.file" location="${result.dir}/deploy-wsdd/${service.name}.wsdd"/>
+ </antcall>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Call to create a wsdd file that will be used for un-deployment -->
+ <!-- ================================================================== -->
+ <target name="-un-wsdd-for-remote">
+ <echo file="${result.dir}/undeploy-wsdd/${service.name}.wsdd">
+<undeployment xmlns="http://xml.apache.org/axis/wsdd/">
+ <service name="${service.name}"/>
+</undeployment>
+ </echo>
+ </target>
+
+
+
+ <!-- ================================================================== -->
<!-- -->
<!-- Samples, tutorials... -->
<!-- -->
More information about the MOBY-guts
mailing list