]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-6585: Move tenant management-related Ant targets and properties into main...
authorAron Roberts <aron@socrates.berkeley.edu>
Thu, 19 Mar 2015 21:39:06 +0000 (14:39 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Thu, 19 Mar 2015 21:39:06 +0000 (14:39 -0700)
build-tenant.xml [deleted file]
build.xml

diff --git a/build-tenant.xml b/build-tenant.xml
deleted file mode 100644 (file)
index 217f75a..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-<project name="app-tenant-mgmt" default="clone-tenant" basedir=".">
-  <description>Manage Application layer folders and files containing per-tenant configurations</description>
-  
-  <!-- Location of the 'tenants' directory for this CollectionSpace source code layer. -->
-  <property name="src.dir" value="${basedir}" />
-  <property name="tenants.dir" value="${src.dir}/services/common/src/main/cspace/config/services/tenants"/>
-
-  <!-- Locations of the tenant folders for the
-       template tenant and newly-cloned tenant. -->
-  <property name="template.tenant.dir" value="${tenants.dir}/${template.tenant.shortname}"/>
-  <property name="tenant.dir" value="${tenants.dir}/${tenant.shortname}"/>
-  
-  <!-- Location of the tenant bindings delta files for the
-       template tenant and newly-cloned tenant. -->
-  <property name="tenant.bindings.delta.suffix" value="-tenant-bindings.delta.xml"/>
-  <property name="template.bindings.delta.file"
-    value="${template.tenant.dir}/${template.tenant.shortname}${tenant.bindings.delta.suffix}"/>
-  <property name="tenant.bindings.delta.file"
-    value="${tenant.dir}/${tenant.shortname}${tenant.bindings.delta.suffix}"/>
-  
-  <!-- Imports a set of utility routines for managing tenant folders
-       from a separate Ant buildfile.
-       See http://wiki.apache.org/ant/NewAntFeaturesInDetail/Import -->
-  <import file="./tenant-utils-build.xml"/>
-  
-   <!-- This target inherits from an existing target in the imported
-        utility routines buildfile, and adds its own behavior specific to this
-        CollectionSpace source code layer. -->
-   <target name="rename-files-in-cloned-tenant" depends="tenant-utils.rename-files-in-cloned-tenant">
-     <move todir="${tenants.dir}/${tenant.shortname}" includeemptydirs="false">
-       <fileset dir="${tenants.dir}/${tenant.shortname}"/>
-       <mapper type="regexp" from="^(.*?)${template.tenant.shortname}(.*)$" to="\1${tenant.shortname}\2"/>
-     </move>
-   </target>
-   
-  <!-- This target inherits from an (essentially empty) target in the imported
-      utility routines buildfile, and adds its own behavior specific to this
-      CollectionSpace source code layer. -->
-  <target name="delete-files-in-cloned-tenant"
-    depends="tenant-utils.delete-files-in-cloned-tenant,
-    delete-obsolete-tenant-bindings-delta,
-    delete-merged-tenant-bindings">
-  </target>
-
-  <!-- TODO: Delete the (obsolete) tenant-bindings.delta.xml file, if any,
-      as this file is used only by CollectionSpace 3.3 and earlier versions. -->
-  <target name="delete-obsolete-tenant-bindings-delta">
-    <delete file="${tenant.dir}/tenant-bindings.delta.xml" failonerror="false"/>
-  </target>
-
-  <target name="delete-merged-tenant-bindings">
-    <delete file="${tenant.dir}/tenant-bindings.merged.xml" failonerror="false"/>
-  </target>
-
-  <!-- This target inherits from an (essentially empty) target in the imported
-       utility routines buildfile, and adds its own behavior specific to this
-       CollectionSpace source code layer. -->
-  <target name="update-text-in-cloned-tenant"
-    depends="tenant-utils.update-text-in-cloned-tenant,
-    update-text-in-tenant-bindings-delta">
-  </target>
-  
-  <target name="update-text-in-tenant-bindings-delta"
-    depends="update-tenant-id-in-tenant-bindings-delta,
-    remove-enclosing-xml-comments-in-tenant-bindings-delta">
-  </target>
-  
-  <target name="update-tenant-id-in-tenant-bindings-delta">
-    <replaceregexp
-      file="${tenant.bindings.delta.file}"
-      match="&lt;tenant:tenantBinding id=&quot;(.*)&quot;&gt;"
-      replace="&lt;tenant:tenantBinding id=&quot;${tenant.id}&quot;&gt;"/>
-  </target>
-  
-  <!-- Remove opening and closing XML comment tags, when found
-       on lines by themselves: the convention currently used
-       in the tenant bindings delta file. -->
-  <target name="remove-enclosing-xml-comments-in-tenant-bindings-delta">
-    <replaceregexp
-      file="${tenant.bindings.delta.file}"
-      match="^\s*?&lt;!--\s*$"
-      replace=""
-      byline="true"
-      flags="gm"/>
-    <replaceregexp
-      file="${tenant.bindings.delta.file}"
-      match="^\s*?--&gt;\s*$"
-      replace=""
-      byline="true"
-      flags="gm"/>
-  </target>
-  
-  <!-- This target inherits from an (essentially empty) target in the imported
-       utility routines buildfile, and adds its own behavior specific to this
-       CollectionSpace source code layer. -->
-  <target name="check-tenant-extended-properties" 
-    depends="tenant-utils.check-tenant-extended-properties">
-    <!-- ID of the new tenant to create -->
-    <antcall target="check-property-is-defined">
-      <param name="property-to-check" value="tenant.id"/>
-    </antcall>
-    <antcall target="check-property-value-is-not-blank">
-      <param name="property-to-check" value="tenant.id"/>
-      <param name="property-to-check-value" value="${tenant.id}"/>
-    </antcall>
-    <echo message="tenant.id=${tenant.id}"/>
-  </target>
-    
-</project>
\ No newline at end of file
index 41c0ba0b63bf84a1f5cec42203868146cd2f2620..a56e022de91662f60f5e631a02c83f2df449cb9c 100644 (file)
--- a/build.xml
+++ b/build.xml
                        <arg value="${mvn.opts}" />
                </exec>
        </target>
+  
+  <!-- ################################################
+       Tenant management-related properties and targets
+       ################################################ -->
+  
+  <!-- Location of the 'tenants' directory for this CollectionSpace source code layer. -->
+  <property name="src.dir" value="${basedir}" />
+  <property name="tenants.dir" value="${src.dir}/services/common/src/main/cspace/config/services/tenants"/>
+
+  <!-- Locations of the tenant folders for the
+       template tenant and newly-cloned tenant. -->
+  <property name="template.tenant.dir" value="${tenants.dir}/${template.tenant.shortname}"/>
+  <property name="tenant.dir" value="${tenants.dir}/${tenant.shortname}"/>
+  
+  <!-- Location of the tenant bindings delta files for the
+       template tenant and newly-cloned tenant. -->
+  <property name="tenant.bindings.delta.suffix" value="-tenant-bindings.delta.xml"/>
+  <property name="template.bindings.delta.file"
+    value="${template.tenant.dir}/${template.tenant.shortname}${tenant.bindings.delta.suffix}"/>
+  <property name="tenant.bindings.delta.file"
+    value="${tenant.dir}/${tenant.shortname}${tenant.bindings.delta.suffix}"/>
+  
+  <!-- Imports a set of utility routines for managing tenant folders
+       from a separate Ant buildfile.
+       See http://wiki.apache.org/ant/NewAntFeaturesInDetail/Import -->
+  <import file="./tenant-utils-build.xml"/>
+  
+   <!-- This target inherits from an existing target in the imported
+        utility routines buildfile, and adds its own behavior specific to this
+        CollectionSpace source code layer. -->
+   <target name="rename-files-in-cloned-tenant" depends="tenant-utils.rename-files-in-cloned-tenant">
+     <move todir="${tenants.dir}/${tenant.shortname}" includeemptydirs="false">
+       <fileset dir="${tenants.dir}/${tenant.shortname}"/>
+       <mapper type="regexp" from="^(.*?)${template.tenant.shortname}(.*)$" to="\1${tenant.shortname}\2"/>
+     </move>
+   </target>
+   
+  <!-- This target inherits from an (essentially empty) target in the imported
+      utility routines buildfile, and adds its own behavior specific to this
+      CollectionSpace source code layer. -->
+  <target name="delete-files-in-cloned-tenant"
+    depends="tenant-utils.delete-files-in-cloned-tenant,
+    delete-obsolete-tenant-bindings-delta,
+    delete-merged-tenant-bindings">
+  </target>
+
+  <!-- TODO: Delete the (obsolete) tenant-bindings.delta.xml file, if any,
+      as this file is used only by CollectionSpace 3.3 and earlier versions. -->
+  <target name="delete-obsolete-tenant-bindings-delta">
+    <delete file="${tenant.dir}/tenant-bindings.delta.xml" failonerror="false"/>
+  </target>
+
+  <target name="delete-merged-tenant-bindings">
+    <delete file="${tenant.dir}/tenant-bindings.merged.xml" failonerror="false"/>
+  </target>
+
+  <!-- This target inherits from an (essentially empty) target in the imported
+       utility routines buildfile, and adds its own behavior specific to this
+       CollectionSpace source code layer. -->
+  <target name="update-text-in-cloned-tenant"
+    depends="tenant-utils.update-text-in-cloned-tenant,
+    update-text-in-tenant-bindings-delta">
+  </target>
+  
+  <target name="update-text-in-tenant-bindings-delta"
+    depends="update-tenant-id-in-tenant-bindings-delta,
+    remove-enclosing-xml-comments-in-tenant-bindings-delta">
+  </target>
+  
+  <target name="update-tenant-id-in-tenant-bindings-delta">
+    <replaceregexp
+      file="${tenant.bindings.delta.file}"
+      match="&lt;tenant:tenantBinding id=&quot;(.*)&quot;&gt;"
+      replace="&lt;tenant:tenantBinding id=&quot;${tenant.id}&quot;&gt;"/>
+  </target>
+  
+  <!-- Remove opening and closing XML comment tags, when found
+       on lines by themselves: the convention currently used
+       in the tenant bindings delta file. -->
+  <target name="remove-enclosing-xml-comments-in-tenant-bindings-delta">
+    <replaceregexp
+      file="${tenant.bindings.delta.file}"
+      match="^\s*?&lt;!--\s*$"
+      replace=""
+      byline="true"
+      flags="gm"/>
+    <replaceregexp
+      file="${tenant.bindings.delta.file}"
+      match="^\s*?--&gt;\s*$"
+      replace=""
+      byline="true"
+      flags="gm"/>
+  </target>
+  
+  <!-- This target inherits from an (essentially empty) target in the imported
+       utility routines buildfile, and adds its own behavior specific to this
+       CollectionSpace source code layer. -->
+  <target name="check-tenant-extended-properties" 
+    depends="tenant-utils.check-tenant-extended-properties">
+    <!-- ID of the new tenant to create -->
+    <antcall target="check-property-is-defined">
+      <param name="property-to-check" value="tenant.id"/>
+    </antcall>
+    <antcall target="check-property-value-is-not-blank">
+      <param name="property-to-check" value="tenant.id"/>
+      <param name="property-to-check-value" value="${tenant.id}"/>
+    </antcall>
+    <echo message="tenant.id=${tenant.id}"/>
+  </target>
 
 </project>