[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Wed Dec 6 16:07:11 UTC 2006


gordonp
Wed Dec  6 11:07:11 EST 2006
Update of /home/repository/moby/moby-live/Java/xmls
In directory dev.open-bio.org:/tmp/cvs-serv24370/xmls

Modified Files:
	seahawkBuild.xml 
Log Message:
Major commit to allow automated construction of MobyServlet.war, and revised cvode for Java annotation-based service meta-data specification
moby-live/Java/xmls seahawkBuild.xml,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Java/xmls/seahawkBuild.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Java/xmls/seahawkBuild.xml	2006/11/24 21:10:39	1.5
+++ /home/repository/moby/moby-live/Java/xmls/seahawkBuild.xml	2006/12/06 16:07:11	1.6
@@ -1,12 +1,13 @@
 <!-- This is an XML entity included in jMoby build.xml file -->
-<!-- It contains targets for the Seahawk MOBY-S client      -->
+<!-- It contains targets for the Seahawk MOBY-S client and  -->
+<!-- the MobyServlet WAR.                                   -->
 <!-- ====================================================== -->
 
   <!-- This block is site-specific parameters (2) for applet deployment, they'll go in a properties file shortly. -->
   <property name="seahawk_applet.dir" location="/export/data/web/bluejay/java/seahawk"/>
   <property name="cert.alias" value="mycert"/>  <!-- Verisign certificate name -->
 
-  <!-- Class containing a static main method to luanch the MOBY browser as a standalone app -->
+  <!-- Class containing a static main method to launch the MOBY browser as a standalone app -->
   <property name="seahawk.classname" value="ca.ucalgary.seahawk.gui.MobyContentGUI"/>
   <!-- Test class that will call all of the major functionality of Seahawk (for testing, plus automated minimal app-jar building ) -->
   <property name="seahawk.auto.classname" value="ca.ucalgary.seahawk.gui.test.SeahawkTestCase"/>
@@ -19,6 +20,11 @@
   <property name="splash.appGUIHelper" value="ca/ucalgary/seahawk/util/SplashWindow$1.class"/>
   <property name="splash.jar" value="launcher.jar"/>
 
+  <property name="servlet.auto.classname" value="org.biomoby.service.test.MobyServletTestCase"/>
+  <property name="servlet.classname" value="org.biomoby.service.MobyServlet"/>
+  <property name="servlet.tester.classname" value="org.biomoby.service.test.ServletTester"/>
+  <property name="servlet.warname" value="MobyServlet"/>
+
   <property name="jarmaker.dir" location="${build.dir}/jarmaker"/>
   <property name="jarmaker.fullname" value="ca.ucalgary.seahawk.util.MinJarMaker"/>
   <property name="jarmaker.name" value="MinJarMaker"/>
@@ -37,9 +43,6 @@
   <path id="seahawk.build.classpath">
     <path refid="build.classpath"/>
     <pathelement location="${src.main}"/>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-    </fileset>
   </path>
 
   <property name="scp" refid="seahawk.build.classpath"/>
@@ -55,6 +58,7 @@
 
   <property name="build.clients.absolute" location="${build.clients}"/>
   <target name="seahawk-jar" depends="compile, make_maker" description="(User) Builds the Seahawk MOBY-S interface as a standalone JAR">
+
     <echo message="Building seahawk standalone JAR to ${build.clients.absolute}"/>
     <echo message="Note that the test cases run will hijack your desktop for a few minutes."/>
     <echo message="Don't touch your mouse!  Sit back. Relax. Have a cup of tea." level="info"/>
@@ -76,6 +80,55 @@
     
   </target>
 
+  <target name="servlet-war" depends="compile, make_maker" description="(User) Builds the MobyServlet WAR for MOBY-S service creation">
+    <echo message="Building servlet standalone WAR to ${build.clients.absolute}"/>
+    <java dir="${jarmaker.dir}" jvm="${jarmaker.virgin_jvm}" classname="${jarmaker.fullname}" fork="true">
+      <classpath>
+	<pathelement path="${jarmaker.dir}"/>
+      </classpath>
+	<jvmarg value="-D${jarmaker.classPathProperty}=${scp}:${src.webapps}"/>
+	<jvmarg value="-D${jarmaker.manifestMainClassProperty}=${servlet.classname}"/>
+	<!-- The following is a list of classes that aren't picked up by the unit
+	     tests, but which the applet might need.  -->
+	<jvmarg value="-D${jarmaker.extraClassesProperty}=org/apache/xerces/xs/*PSVI.class:org/biomoby/**Exception.class:org/apache/**Exception.class:org/apache/**Error.class:org/apache/**ErrorResources.class:org/apache/**Messages.class:org/apache/log4j/spi/*.class:org/apache/axis/utils/*.class:org/apache/**.properties:javax/**/soap/*.class:org/jdom/*.class"/>
+
+	<arg value="${build.clients.absolute}/${servlet.warname}.war"/>
+	<arg value="${servlet.auto.classname}"/>
+    </java>
+
+	<mkdir dir="${build.classes}/WEB-INF"/>
+	<mkdir dir="${build.classes}/WEB-INF/classes"/>
+	<mkdir dir="${build.classes}/WEB-INF/lib"/>
+	<unjar src="${build.clients.absolute}/${servlet.warname}.war" dest="${build.classes}/WEB-INF/classes"/>
+        <copy file="${src.webapps}/WEB-INF/web.xml" todir="${build.classes}/WEB-INF"/>
+
+        <!-- Okay, we had to unjar the classes, and repack them (2nd copy) into WEB-INF/classes so 
+             the servlet container can see them (unfortunately) -->
+	<jar destfile="${build.clients.absolute}/${servlet.warname}.war"
+		filesonly="true"
+		update="true"
+		compress="true"
+	        includes="WEB-INF/**"
+	        excludes="WEB-INF/classes/javax/servlet/**"
+		basedir="${build.classes}">
+            <manifest>
+		<attribute name="Built-By" value="${user.name}"/>
+		<attribute name="Main-Class" value="${servlet.tester.classname}"/>
+		<section name="common">
+		<attribute name="Implementation-Title" value="MobyServlet: A Framework for providing MOBY-S Web Services"/>
+		<attribute name="Implementation-Version" value="${version}"/>
+		<attribute name="Implementation-Vendor"
+                   value="University of Calgary, Sun Center of Excellence for Visual Genomics"/>
+		</section>
+    	    </manifest>
+        </jar>
+	
+	<delete dir="${build.classes}/WEB-INF"/>
+
+	<echo message="The servlet standalone WAR is ${build.clients.absolute}/${servlet.warname}.war"/>
+    
+  </target>
+
   <target name="seahawk" depends="compile" description="(User) Run the Seahawk MOBY client interface as a standalone application">
       <java classname="${seahawk.classname}" classpathref="seahawk.build.classpath" fork="true">
 	<jvmarg value="-Dmoby.debug=1"/>




More information about the MOBY-guts mailing list