[MOBY-guts] biomoby commit

Andreas Groscurth groscurt at dev.open-bio.org
Tue Feb 3 08:59:20 UTC 2009


groscurt
Tue Feb  3 03:59:20 EST 2009
Update of /home/repository/moby/moby-live/Java/xmls
In directory dev.open-bio.org:/tmp/cvs-serv22917/xmls

Modified Files:
	deployBuild.xml tomcat.xml servletsBuild.xml 
Log Message:
corrected version for server deployment... backward compatible
moby-live/Java/xmls deployBuild.xml,1.9,1.10 tomcat.xml,1.5,1.6 servletsBuild.xml,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Java/xmls/deployBuild.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- /home/repository/moby/moby-live/Java/xmls/deployBuild.xml	2009/01/06 09:40:12	1.9
+++ /home/repository/moby/moby-live/Java/xmls/deployBuild.xml	2009/02/03 08:59:20	1.10
@@ -11,13 +11,13 @@
 
 <!--
         Deploying a service means usually two things: (a) copying
-        necessary classes to the server, and (b) creating a deployment
+        necessary classes to Tomcat, and (b) creating a deployment
         descriptor (an XML file) and calling Axis's AdminClient to
         install this deployment descriptor into Axis's configuration
         file (WEB-INF/server-config.wsdd).
 
         Also, there are two kinds of deployments: (a) to a local
-        server, and (b) to a server running of a different machine
+        Tomcat, and (b) to a Tomcat running of a different machine
         than this Ant. For the latter case, a tarred file is created
         with all necessary contents - it must be then manually moved
         to the remote machine.
@@ -31,7 +31,7 @@
 
         Targets for local deployment are:
            deploy-services
-              server-populate
+              tomcat-populate
                  -populate
               deploy-wsdd
                  -find-services
@@ -47,7 +47,7 @@
 <!-- ================================================================== -->
 <!-- Do it all (for the local deployment)...                            -->
 <!-- ================================================================== -->
-<target name="deploy-services" depends="server-running,server-populate,deploy-wsdd"
+<target name="deploy-services" depends="tomcat-running,tomcat-populate,deploy-wsdd"
   description="Deploy (given) BioMoby services.">
 </target>
 
@@ -55,7 +55,7 @@
 <!-- ================================================================== -->
 <!-- Undeploy services (given by 'service.NNN', or by 'service.list')   -->
 <!-- ================================================================== -->
-<target name="undeploy-services" depends="server-running,-find-services"
+<target name="undeploy-services" depends="tomcat-running,-find-services"
   description="Undeploy (given) BioMoby services.">
   
   <!-- undeploy each service -->
@@ -83,11 +83,11 @@
 </target>
 
 <!-- ================================================================== -->
-<!-- Populate local server with files needed for BioMoby Web Services   -->
+<!-- Populate local Tomcat with files needed for BioMoby Web Services   -->
 <!-- ================================================================== -->
-<target name="server-populate" depends="server-init,jars,jar-datatypes,jar-services">
+<target name="tomcat-populate" depends="tomcat-init,jars,jar-datatypes,jar-services">
 
-  <!-- merge jar files in ${build.lib} with the same-named jar files in servert/Axis -->
+  <!-- merge jar files in ${build.lib} with the same-named jar files in Tomcat/Axis -->
   <foreach
     inheritall="yes"
     target="-merge-jars"
@@ -95,7 +95,7 @@
     <fileset dir="${build.lib}" includes="${datatypes.jar},${skeletons.jar}"/>
   </foreach>
   
-  <!-- copy user-defined and remaining jar files to server/Axis -->
+  <!-- copy user-defined and remaining jar files to Tomcat/Axis -->
   <antcall target="-populate">
     <param name="destination.axis.lib.dir"     location="${deploy.axis.dir}/lib"/>
     <param name="destination.axis.classes.dir" location="${deploy.axis.dir}/classes"/>
@@ -104,7 +104,7 @@
 </target>
 
 <!-- ================================================================== -->
-<!-- Sub-target of server-populate (called for each jar file)           -->
+<!-- Sub-target of tomcat-populate (called for each jar file)           -->
 <!-- ================================================================== -->
 <!-- parameter: ${jarfile.name} -->
 <target name="-merge-jars">
@@ -129,14 +129,14 @@
 </target>
 
 <!-- ================================================================== -->
-<!-- Sub-target of server-populate                                      -->
+<!-- Sub-target of tomcat-populate                                      -->
 <!-- (used both for local and remote deployment)                        -->
 <!-- ================================================================== -->
 <!-- parameter: ${destination.axis.lib.dir} -->
 <!-- parameter: ${destination.axis.classes.dir} -->
 <target name="-populate" depends="initmaven">
   
-  <!-- copy user-defined jar files to server/Axis -->
+  <!-- copy user-defined jar files to Tomcat/Axis -->
   <if>
     <isset property="users.lib.dir"/>
     <then>
@@ -152,7 +152,7 @@
     </then>
   </if>
   
-  <!-- copy remaining jar files to server/Axis -->
+  <!-- copy remaining jar files to Tomcat/Axis -->
   <copy
     todir="${destination.axis.lib.dir}"
     flatten="true">
@@ -172,7 +172,7 @@
   </copy>
   
   <!-- copy log4j configuration file -->
-  <property name="server.log.dir" value="$${server.home}/logs"/>
+  <property name="server.log.dir" value="$${catalina.home}/logs"/>
   <property
     name="server.log4j.configuration"
     location="${src.config}/log4j.properties.template"/>
@@ -236,7 +236,7 @@
 <!--    parameter: ${wsdd.file} ... a file with a [un]deployment descr. -->
 <!--    parameter: ${deploy.task.name} ... a name given to this task    -->
 <!-- ================================================================== -->
-<target name="axis-deploy" depends="initmaven,server-running">
+<target name="axis-deploy" depends="initmaven,tomcat-running">
   
   <!-- an optional parameter: how to name this task -->
   <property name="deploy.task.name" value="Deploy"/>
@@ -247,9 +247,9 @@
     fork="true"
     failonerror="true">
     <arg value="-h"/>
-    <arg value="${server.host}"/>
+    <arg value="${tomcat.host}"/>
     <arg value="-p"/>
-    <arg value="${server.port}"/>
+    <arg value="${tomcat.port}"/>
     <arg value="-s"/>
     <arg value="${axis.admin.url}"/>
     <arg file="${wsdd.file}"/>
@@ -290,7 +290,7 @@
 <!-- ================================================================== -->
 <!-- Create a file that will be used to do a remote deployment          -->
 <!-- ================================================================== -->
-<target name="deploy-remote" depends="init,server-init,-find-services,jars,jar-datatypes,jar-services"
+<target name="deploy-remote" depends="init,tomcat-init,-find-services,jars,jar-datatypes,jar-services"
   description="Create a file helping to deploy services on a different machine">
 
   <tempfile property="build.remote.dir" destDir="${java.io.tmpdir}/mobyremotedeploy-${user.name}"/>
@@ -328,18 +328,20 @@
   </delete>
   
   <!-- add separate build.xml for deployment, and scripts to use it -->
-  <property name="cross.server.home"        value="${real.server.home}"/>
-  <property name="cross.server.port"        value="${server.port}"/>
-  <property name="cross.server.host"        value="${server.host}"/>
+  <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="${axis.admin.url}"/>
+  <property name="cross.tomcat.webapps"     value="${tomcat.webapps}"/>
+  <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="SERVER_HOME" value="${cross.server.home}"/>
-      <filter token="SERVER_PORT" value="${cross.server.port}"/>
-      <filter token="SERVER_HOST" value="${cross.server.host}"/>
+      <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="TOMACT_WEBAPPS" value="${cross.tomcat.webapps}"/>
       <filter token="AXIS_RELATIVE_PATH" value="${cross.axis.relative.path}"/>
       <filter token="AXIS_ADMIN_URL" value="${cross.axis.admin.url}"/>
     </filterset>

===================================================================
RCS file: /home/repository/moby/moby-live/Java/xmls/tomcat.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Java/xmls/tomcat.xml	2009/01/05 09:40:36	1.5
+++ /home/repository/moby/moby-live/Java/xmls/tomcat.xml	2009/02/03 08:59:20	1.6
@@ -4,59 +4,73 @@
 
 <!-- ====================================================== -->
 <!--                                                        -->
-<!-- Targets dealing with a server                   		-->
+<!-- Targets dealing with a Tomcat server                   -->
 <!--                                                        -->
 <!-- ====================================================== -->
 
-<!-- server access -->
-<property name="server.port" value="8080"/>
-<property name="server.host" value="localhost"/>
+<!-- Tomcat access -->
+<property name="tomcat.port" value="8080"/>
+<property name="tomcat.host" value="localhost"/>
 
 <!-- ================================================================== -->
-<!-- server init sets property 'real.catalina.home' to its location     -->
+<!-- Tomcat init sets property 'real.catalina.home' to its location     -->
 <!-- ================================================================== -->
-<target name="server-init">
-  <!-- server location -->
-  <condition property="real.server.home" value="${env.CATALINA_HOME}">
+<target name="tomcat-init">
+
+  <!-- Tomcat location -->
+  <condition property="real.catalina.home" value="${env.CATALINA_HOME}">
     <isset property="env.CATALINA_HOME"/>
   </condition>
-  <condition property="real.server.home" value="${server.home}">
-    <isset property="server.home"/>
+  <condition property="real.catalina.home" value="${catalina.home}">
+    <isset property="catalina.home"/>
+  </condition>
+  <condition property="real.catalina.home" value="${tomcat.home}">
+    <isset property="tomcat.home"/>
+  </condition>
+  <condition property="real.server.host" value="${tomcat.host}">
+  	<isset property="tomcat.host"/>
+  </condition>
+  <condition property="real.server.port" value="${tomcat.port}">
+  	<isset property="tomcat.port"/>
+  </condition>
+  <condition property="real.server.host" value="${server.host}">
+  	<isset property="server.host"/>
+  </condition>
+  <condition property="real.server.port" value="${server.port}">
+  	<isset property="server.port"/>
   </condition>
 
   <!-- properties set from other properties that were set in conditions above -->
   <property name="deploy.axis.dir"
-    location="${real.server.home}/${axis.relative.path}/WEB-INF"/>
-    
-  <!-- check that we know about server -->
-  <fail unless="real.server.home">
+    location="${real.catalina.home}/${tomcat.webapps}/${axis.relative.path}/WEB-INF"/>
+        
+  <!-- check that we know about Tomcat -->
+  <fail unless="real.catalina.home">
 '
-
     ERROR: Server not found.
     -------------------------------
     Please set environment variable CATALINA_HOME to point to it,
     or create a file 'build.properties' and put there the line:
-    server.home = &lt;location of your server&gt;
+    catalina.home = &lt;location of your server&gt;
     (do not include '&lt;' and '&gt;' there),
     or start your Ant with this property on the command-line:
-    ant -Dserver.home=&lt;location of your server&gt; 
+    ant -Dcatalina.home=&lt;location of your server&gt; 
   </fail>
 </target>
 
-<target name="server-running" depends="server-init">
-  <condition property="server.is.running">
-    <socket server="${server.host}" port="${server.port}"/>
+<target name="tomcat-running" depends="tomcat-init">
+  <condition property="tomcat.is.running">
+    <socket server="${real.server.host}" port="${real.server.port}"/>
   </condition>
-  <fail unless="server.is.running">
+  <fail unless="tomcat.is.running">
 '
-
     ERROR: Server does not seem to be running.
     ------------------------------------------
-    I have just checked ${server.host}:${server.port}...
+    I have just checked ${real.server.host}:${real.server.port}...
     You may perhaps consider to start it.
     Or to set differently the following properties:
-    "server.host" (current value: ${server.host}), and
-    "server.port" (current value: ${server.port})
+    "server.host" (current value: ${real.server.host}), and
+    "server.port" (current value: ${real.server.port}).
   </fail>
 </target>
 
@@ -65,6 +79,6 @@
 <!-- ================================================================== -->
 <!--
 <target name="_cleandeploy" depends="tomcat-init">
-  <delete dir="${real.server.home}/webapps/${param.context.name}"/>
+  <delete dir="${real.catalina.home}/webapps/${param.context.name}"/>
 </target>
 -->

===================================================================
RCS file: /home/repository/moby/moby-live/Java/xmls/servletsBuild.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/xmls/servletsBuild.xml	2009/01/05 08:46:07	1.3
+++ /home/repository/moby/moby-live/Java/xmls/servletsBuild.xml	2009/02/03 08:59:20	1.4
@@ -10,7 +10,7 @@
 <!-- ================================================================== -->
 <property name="deploy.war.file" value="${build.webapps}/jmoby.war"/>
 
-<target name="deploy-servlets" depends="server-init,war"
+<target name="deploy-servlets" depends="tomcat-init,war"
   description="Deploy jMoby servlets to local Tomcat.">
   <property name="deploy.webapp.dir" location="${real.catalina.home}/webapps"/>
   <delete dir="${deploy.webapp.dir}/jmoby"/>




More information about the MOBY-guts mailing list