]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5678: Adding Ant target that will generate Service config artifacts from the...
authorRichard Millet <remillet@berkeley.edu>
Fri, 2 Aug 2013 19:36:51 +0000 (12:36 -0700)
committerRichard Millet <remillet@berkeley.edu>
Fri, 2 Aug 2013 19:36:51 +0000 (12:36 -0700)
services/JaxRsServiceProvider/build.xml

index 072ebad4c8d3eafe170dce95f761afcc5887038c..228e3401d90d4e5fb724bcf281909b2fc8110b5d 100644 (file)
@@ -8,6 +8,8 @@
     <!-- enviornment should be declared before reading build.properties -->
     <property environment="env" />
     <property file="${services.trunk}/build.properties" />
+       <property name="application.trunk" location="${services.trunk}/../application" />
+       <property name="cspace.tool.csmake" value="csmake" />
     <property name="mvn.opts" value="-V" />
     <property name="src" location="src"/>
 
         </exec>
     </target>
 
-    <target name="deploy" depends="package"
+    <target name="deploy" depends="deploy_services_bundles"
     description="deploy cspace services in ${jee.server.cspace}">
                <delete file="${catalina.context.cspace}"/> <!-- This is a Tomcat specific file that we seem to need to delete inorder for it to be replace with a more recent one during deployment -->
                <delete dir="${jee.deploy.cspace}/${cspace.services.context}"/>
         <copy file="${basedir}/target/${cspace.services.war}" todir="${jee.deploy.cspace}"/>
     </target>
+       
+       <!--
+               This target attempts to generate a set of Service artifacts (Nuxeo bundles and tenant bindings) by using the
+               Application layer's configuration files.
+               
+               This target has a dependency on the Application layer's source tree.  It assumes the Application layer's src tree root
+               is a directory sibling of the Source layer's source tree root.  Also, it assumes the "csmake.jar" exists in the target
+               directory of the Application layer's "tomcat-main" module.
+               
+               This target also assumes that the system environment variable 'CSPACE_JEESERVER_HOME' is set and pointing to the root
+               JEE server (usually Apache Tomcat) where CollectionSpace is installed.  All generated Service artifacts wi
+       -->
+       <target name="deploy_services_bundles" depends="package"
+               description="Generates and deploys the CollectionSpace Services' schema bundles, doctype bundles, and tenant bindings.">
+               <exec executable="${env.JAVA_HOME}/bin/java" failonerror="true">
+                       <arg value="-Done-jar.silent=true" />
+                       <arg value="-jar" />
+                       <arg value="${application.trunk}/tomcat-main/target/${cspace.tool.csmake}.jar" />
+                       <arg value="-ac" />
+                       <arg value="${application.trunk}/tomcat-main/src/main/resources" />
+                       <arg value="-sc" />
+                       <arg value="${services.trunk}/services/common/src/main" />
+                       <arg value="-o" />
+                       <arg value="${env.CSPACE_JEESERVER_HOME}" />
+               </exec>
+       </target>
 
     <target name="undeploy"
     description="undeploy cspace services from ${jee.server.cspace}">