]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-6329: Copy prototype Nuxeo repo config file to a directory outside the Nuxeo...
authorAron Roberts <aron@socrates.berkeley.edu>
Thu, 6 Mar 2014 04:16:03 +0000 (20:16 -0800)
committerAron Roberts <aron@socrates.berkeley.edu>
Thu, 6 Mar 2014 04:16:03 +0000 (20:16 -0800)
3rdparty/nuxeo/build.xml
services/common-api/src/main/java/org/collectionspace/services/common/api/JEEServerDeployment.java
services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java

index 9cbec3722d3706a3e875c816035e09158fa1d482..45d8a54a44593daa28004beb2ee4b2ebf2f77132 100644 (file)
     <target name="deploy" depends="package"\r
        description="deploy nuxeo server libs to ${jee.server.cspace}">\r
         <copy todir="${jee.server.cspace}/nuxeo-server">\r
-           <fileset dir="${basedir}/nuxeo-server/${nuxeo.release}"/>\r
-        </copy>\r
-        <copy todir="${jee.server.cspace}/nuxeo-server/config" overwrite="true">\r
-            <fileset dir="${basedir}/nuxeo-server/${nuxeo.release}/config"/>\r
-            <filterset>\r
-                <filter token="DB" value="${db}" />\r
-                               <filter token="DB_URL" value="jdbc:${db}://${db.host}:${db.port}/nuxeo"/>\r
-               <filter token="DB_SERVER_HOSTNAME" value="${db.host}"/>\r
-                               <filter token="XA_DATASOURCE" value="${db.xaDataSource}" />\r
-                <filter token="NUXEO_USER" value="${db.nuxeo.user}" />\r
-                <filter token="NUXEO_PW" value="${db.nuxeo.user.password}" />\r
-            </filterset>\r
+           <fileset dir="${basedir}/nuxeo-server/${nuxeo.release}">\r
+                <exclude name="**/config/*-repo-config.xml"/>\r
+           </fileset>\r
         </copy>\r
+        <echo message="Copying Nuxeo prototype repo config file ..."/>\r
+        <copy file="${basedir}/nuxeo-server/${nuxeo.release}/config/proto-repo-config.xml"\r
+            todir="${jee.server.cspace}/cspace/services" overwrite="true"/>\r
         <ant antfile="nuxeo-platform-collectionspace/build.xml" target="deploy" inheritall="false"/>\r
         <ant antfile="nuxeo-platform-listener/build.xml" target="deploy" inheritall="false"/>\r
                                <!-- Disabled due to integration issues between ImageMagick and Ghostscript on Linux systems        \r
         <delete dir="${jee.server.cspace}/nuxeo-server/bundles"/>\r
         <delete dir="${jee.server.cspace}/nuxeo-server/config"/>\r
         <delete dir="${jee.server.cspace}/nuxeo-server/lib"/>\r
+        <delete file="${jee.server.cspace}/cspace/config/services/proto-repo-config.xml" failonerror="false"/>\r
         <ant antfile="nuxeo-platform-collectionspace/build.xml" target="undeploy" inheritall="false"/>\r
         <ant antfile="nuxeo-platform-listener/build.xml" target="undeploy" inheritall="false"/>\r
                <ant antfile="nuxeo-platform-quote/build.xml" target="undeploy" inheritall="false"/>\r
index 3f4210bb216f219d116eafafc2afe29464bb0a9b..e42755a33e53a1c64de57f05e34338810d6f1e6f 100644 (file)
@@ -3,8 +3,12 @@ package org.collectionspace.services.common.api;
 import java.io.File;
 
 public interface JEEServerDeployment {
+    final public static String CONFIG_DIR_NAME = "config";
     final public static String CSPACE_DIR_NAME = "cspace";
-    final public static String CONFIG_DIR_PATH = "config" + File.separator + "services";
+    final public static String SERVICES_DIR_NAME = "services";
+    final public static String CONFIG_DIR_PATH = CONFIG_DIR_NAME + File.separator + SERVICES_DIR_NAME;
+    
+    final public static String CSPACE_SERVICES_DIR_PATH = CSPACE_DIR_NAME + File.separator + SERVICES_DIR_NAME;
 
     final public static String TENANT_BINDINGS_FILENAME_PREFIX = "tenant-bindings";
     final public static String TENANT_BINDINGS_PROTOTYPE_FILENAME = TENANT_BINDINGS_FILENAME_PREFIX + "-proto.xml";
@@ -12,7 +16,7 @@ public interface JEEServerDeployment {
        
        public final static String NUXEO_CLIENT_DIR = "nuxeo-client";
        public final static String NUXEO_SERVER_DIR = "nuxeo-server";
-       public final static String NUXEO_CONFIG_DIR = "config";
+       public final static String NUXEO_CONFIG_DIR = CONFIG_DIR_NAME;
        public final static String NUXEO_SERVER_CONFIG_DIR = NUXEO_SERVER_DIR + File.separator + NUXEO_CONFIG_DIR;
         public final static String NUXEO_REPO_CONFIG_FILENAME_SUFFIX = "-repo-config.xml";
         public final static String NUXEO_PROTOTYPE_CONFIG_FILENAME = "proto" + NUXEO_REPO_CONFIG_FILENAME_SUFFIX;
index 6542e2da5ae7a0d1754070ff32d7073f663a7f78..90b643f7e72a65df9872d19c989ea65b00e27ac1 100644 (file)
@@ -375,6 +375,10 @@ public class ServiceMain {
     public String getServerRootDir() {\r
         return serverRootDir;\r
     }\r
+\r
+    public String getCspaceServicesConfigDir() {\r
+        return getServerRootDir() + File.separator + JEEServerDeployment.CSPACE_SERVICES_DIR_PATH;\r
+    }\r
     \r
     public String getNuxeoConfigDir() {\r
         return getServerRootDir() + File.separator + JEEServerDeployment.NUXEO_SERVER_CONFIG_DIR;\r
@@ -764,7 +768,7 @@ public class ServiceMain {
         \r
         // Get the prototype copy of the Nuxeo repository config file.\r
         File prototypeNuxeoConfigFile =\r
-                new File(getNuxeoConfigDir() + File.separator + getNuxeoProtoConfigFilename());\r
+                new File(getCspaceServicesConfigDir() + File.separator + getNuxeoProtoConfigFilename());\r
         // FIXME: Consider checking for the presence of existing configuration files,\r
         // rather than always failing outright if the prototype file for creating\r
         // new or updated files can't be located.\r