]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-3325: Minor changes to Ant property names for clarity. Stubbed a task for...
authorAron Roberts <aron@socrates.berkeley.edu>
Tue, 4 Jan 2011 01:47:19 +0000 (01:47 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Tue, 4 Jan 2011 01:47:19 +0000 (01:47 +0000)
3rdparty/nuxeo/nuxeo-database-templates/build.xml
build.properties

index a74a536c873c535df94b35c589c32ce0fc19b789..0a4a132c2dde5760decf745cdd275276ce3e18d1 100644 (file)
@@ -7,8 +7,13 @@
     <!-- set global properties for this build -->
     <property name="services.trunk" value="../../.."/>
     <!-- environment should be declared before reading build.properties -->
-    <property environment="env" />
-    <property file="${services.trunk}/build.properties" />
+    <property environment="env"/>
+    <property file="${services.trunk}/build.properties"/>
+    <!-- set the name of CollectionSpace's template directory, based in part -->
+    <!-- on the name of the current database specified in top-level build.properties -->
+    <property name="collectionspace.prefix" value="collectionspace_"/>
+    <property name="collectionspace.template.dir" value="${collectionspace.prefix}${db}"/>
+    <property name="backup.suffix" value=".cspace.bak"/>
 
     <target name="init">
     <!-- Create the time stamp -->
     </target>
 
     <target name="deploy"
-       description="deploys nuxeo database template folder for the ${db} database to ${jboss.deploy.nuxeo.templates}">
-        <mkdir dir="${jboss.deploy.nuxeo.templates}/collectionspace_${db}"/>
-        <copy todir="${jboss.deploy.nuxeo.templates}/collectionspace_${db}">
-            <fileset dir="${basedir}/${db}/collectionspace_${db}"/>
+       description="deploys a database template directory to Nuxeo"
+        depends="copy-templates-dir, update-nuxeo-config">
+    </target>
+
+    <target name="copy-templates-dir"
+       description="deploys nuxeo database template folder for the ${db} database to ${nuxeo.templates.dir}">
+        <mkdir dir="${nuxeo.templates.dir}/${collectionspace.template.dir}"/>
+        <copy todir="${nuxeo.templates.dir}/${collectionspace.template.dir}">
+            <fileset dir="${basedir}/${db}/${collectionspace.template.dir}"/>
         </copy>
     </target>
 
+    <target name="update-nuxeo-config"
+       description="updates the main nuxeo configuration file to specify the database template folder to use for CollectionSpace}">
+        <!-- Currently requires an optional Ant task, such as PropertyFile or ReplaceRegExp -->
+        <!-- copy file="${nuxeo.main.config.file}" tofile="${nuxeo.main.config.file}${backup.suffix}" overwrite="true"/ -->
+        <!-- propertyfile file="${nuxeo.main.config.file}">
+            <entry key="nuxeo.templates" value="${collectionspace.template.dir}"/>
+        </propertyfile -->
+    </target>
+
     <target name="undeploy"
-    description="undeploys nuxeo database template folder for the ${db} database from ${jboss.deploy.nuxeo.templates}">
-        <delete dir="${jboss.deploy.nuxeo.templates}/collectionspace_${db}"/>
+    description="undeploys nuxeo database template folder for the ${db} database from ${nuxeo.templates.dir}">
+        <delete dir="${nuxeo.templates.dir}/${collectionspace.template.dir}"/>
     </target>
 
 </project>
index 98a7352f22e7d422628959d8bbd7cadf4d66a7ff..889b062a33f979918ce571412d0fa610c4bf4478 100644 (file)
@@ -40,6 +40,7 @@ dist.deploy.nuxeo.plugins=${dist.deploy.nuxeo}/${nuxeo.plugins}
 jboss.release=jboss-4.2.3.GA\r
 jboss.dir=${env.JBOSS_HOME}\r
 jboss.home=${jboss.dir}\r
+jboss.bin=${jboss.home}/bin\r
 \r
 #jboss cspace domain\r
 jboss.domain.cspace=${domain.cspace}\r
@@ -58,8 +59,11 @@ jboss.lib.nuxeo=${jboss.server.nuxeo}/lib
 jboss.deploy.nuxeo.system=${jboss.deploy.nuxeo}/${nuxeo.system}\r
 jboss.deploy.nuxeo.plugins=${jboss.deploy.nuxeo}/${nuxeo.plugins}\r
 \r
-#nuxeo database templates\r
-jboss.deploy.nuxeo.templates=${jboss.home}/${nuxeo.templates}\r
+#nuxeo database templates directory\r
+nuxeo.templates.dir=${jboss.home}/${nuxeo.templates}\r
+\r
+#nuxeo main config file\r
+nuxeo.main.config.file=${jboss.bin}/nuxeo.conf\r
 \r
 #database\r
 db=mysql\r