]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
DRYD-692: Rework UI config/deployment process.
authorRay Lee <ray.lee@lyrasis.org>
Thu, 18 Jul 2019 00:26:04 +0000 (17:26 -0700)
committerRay Lee <ray.lee@lyrasis.org>
Thu, 18 Jul 2019 06:09:43 +0000 (23:09 -0700)
39 files changed:
build.properties
cspace-ui/anthro/WEB-INF/web.xml [moved from cspace-ui/cspace#anthro/WEB-INF/web.xml with 100% similarity]
cspace-ui/anthro/build.properties [new file with mode: 0644]
cspace-ui/anthro/index.html [new file with mode: 0644]
cspace-ui/bonsai/WEB-INF/web.xml [moved from cspace-ui/cspace#core#template/WEB-INF/web.xml with 100% similarity]
cspace-ui/bonsai/build.properties [new file with mode: 0644]
cspace-ui/bonsai/index.html [new file with mode: 0644]
cspace-ui/build.xml
cspace-ui/core/WEB-INF/web.xml [moved from cspace-ui/cspace#core/WEB-INF/web.xml with 100% similarity]
cspace-ui/core/build.properties [new file with mode: 0644]
cspace-ui/core/index.html [new file with mode: 0644]
cspace-ui/cspace#anthro/index.html [deleted file]
cspace-ui/cspace#bonsai/index.html [deleted file]
cspace-ui/cspace#core#template/index.html [deleted file]
cspace-ui/cspace#core/index.html [deleted file]
cspace-ui/cspace#fcart/index.html [deleted file]
cspace-ui/cspace#lhmc/index.html [deleted file]
cspace-ui/cspace#materials/index.html [deleted file]
cspace-ui/cspace#publicart/index.html [deleted file]
cspace-ui/cspace#template/WEB-INF/web.xml [deleted file]
cspace-ui/cspace#template/index.html [deleted file]
cspace-ui/dvp/WEB-INF/web.xml [moved from cspace-ui/cspace#fcart/WEB-INF/web.xml with 100% similarity]
cspace-ui/dvp/build.properties [new file with mode: 0644]
cspace-ui/dvp/index.html [new file with mode: 0644]
cspace-ui/fcart/WEB-INF/web.xml [moved from cspace-ui/cspace#materials/WEB-INF/web.xml with 100% similarity]
cspace-ui/fcart/build.properties [new file with mode: 0644]
cspace-ui/fcart/index.html [new file with mode: 0644]
cspace-ui/incubator/build.xml [deleted file]
cspace-ui/incubator/cspace#dvp/WEB-INF/web.xml [deleted file]
cspace-ui/incubator/cspace#dvp/index.html [deleted file]
cspace-ui/lhmc/WEB-INF/web.xml [moved from cspace-ui/cspace#publicart/WEB-INF/web.xml with 100% similarity]
cspace-ui/lhmc/build.properties [new file with mode: 0644]
cspace-ui/lhmc/index.html [new file with mode: 0644]
cspace-ui/materials/WEB-INF/web.xml [moved from cspace-ui/cspace#lhmc/WEB-INF/web.xml with 92% similarity]
cspace-ui/materials/build.properties [new file with mode: 0644]
cspace-ui/materials/index.html [new file with mode: 0644]
cspace-ui/publicart/WEB-INF/web.xml [moved from cspace-ui/cspace#bonsai/WEB-INF/web.xml with 92% similarity]
cspace-ui/publicart/build.properties [new file with mode: 0644]
cspace-ui/publicart/index.html [new file with mode: 0644]

index 856de977b38c48f5133906e3b0b56a8801233a57..1a09e43c8c3ba1f388ea25778b156a959a9c87f7 100644 (file)
@@ -19,16 +19,9 @@ cspace.services.context=${domain.cspace}
 cspace.services.war=${cspace.services.context}.war
 domain.nuxeo=nuxeo-server
 
-# CSpace UI plugin defaults
-cspace.ui.dest=
-cspace.ui.tenantid=1
-cspace.ui.logo=undefined
-cspace.ui.message.title=CollectionSpace Default Profile
+# UI settings
+cspace.ui.library.name=cspaceUI
 cspace.ui.version=^2.0.0
-cspace.ui.basename=/cspace/core
-cspace.ui.webapp=cspace#core
-cspace.ui.webapp.name=cspaceUI
-cspace.ui.js=${cspace.ui.webapp.name}@${cspace.ui.version}.min.js
 
 #nuxeo
 nuxeo.release=9.10-HF30
diff --git a/cspace-ui/anthro/build.properties b/cspace-ui/anthro/build.properties
new file mode 100644 (file)
index 0000000..efb3acd
--- /dev/null
@@ -0,0 +1,6 @@
+tenant.ui.webapp.dir=cspace#${tenant.shortname}
+tenant.ui.basename=/cspace/${tenant.shortname}
+
+tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-anthro
+tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileAnthro
+tenant.ui.profile.plugin.version=^2.0.0
diff --git a/cspace-ui/anthro/index.html b/cspace-ui/anthro/index.html
new file mode 100644 (file)
index 0000000..1a3b160
--- /dev/null
@@ -0,0 +1,20 @@
+<html>
+       <head>
+               <meta charset="UTF-8" />
+       </head>
+       <body>
+               <div id="cspace"></div>
+               <script src="/cspace-ui/@UI_FILENAME@"></script>
+               <script src="/cspace-ui/@UI_PROFILE_PLUGIN_FILENAME@"></script>
+               <script>
+                       cspaceUI({
+                               basename: '@BASENAME@',
+                               plugins: [
+                                       @UI_PROFILE_PLUGIN_LIBRARY_NAME@(),
+                               ],
+                               prettyUrls: true,
+                               tenantId: '@TENANT_ID@',
+                       });
+               </script>
+       </body>
+</html>
diff --git a/cspace-ui/bonsai/build.properties b/cspace-ui/bonsai/build.properties
new file mode 100644 (file)
index 0000000..1677148
--- /dev/null
@@ -0,0 +1,6 @@
+tenant.ui.webapp.dir=cspace#${tenant.shortname}
+tenant.ui.basename=/cspace/${tenant.shortname}
+
+tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-bonsai
+tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileBonsai
+tenant.ui.profile.plugin.version=^1.0.0
diff --git a/cspace-ui/bonsai/index.html b/cspace-ui/bonsai/index.html
new file mode 100644 (file)
index 0000000..1a3b160
--- /dev/null
@@ -0,0 +1,20 @@
+<html>
+       <head>
+               <meta charset="UTF-8" />
+       </head>
+       <body>
+               <div id="cspace"></div>
+               <script src="/cspace-ui/@UI_FILENAME@"></script>
+               <script src="/cspace-ui/@UI_PROFILE_PLUGIN_FILENAME@"></script>
+               <script>
+                       cspaceUI({
+                               basename: '@BASENAME@',
+                               plugins: [
+                                       @UI_PROFILE_PLUGIN_LIBRARY_NAME@(),
+                               ],
+                               prettyUrls: true,
+                               tenantId: '@TENANT_ID@',
+                       });
+               </script>
+       </body>
+</html>
index f478a8355b54df8e7448222e0b7f0eb63ea18ba0..60a8720aedb8c0e340642a83a323089871576338 100644 (file)
-<project name="react.ui" default="package" basedir="." xmlns:if="ant:if" xmlns:unless="ant:unless">
+<project name="cspace.ui" default="package" xmlns:if="ant:if" xmlns:unless="ant:unless">
        <description>
-               CollectionSpace UI Component build
+               CollectionSpace UI
        </description>
 
+       <macrodef name="propertycopy">
+               <attribute name="name"/>
+               <attribute name="from"/>
+               <sequential>
+                       <property name="@{name}" value="${@{from}}"/>
+               </sequential>
+       </macrodef>
+
+       <scriptdef name="uppercase" language="javascript">
+               <attribute name="property" />
+               <attribute name="string" />
+
+               project.setProperty(attributes.get("property"), attributes.get("string").toUpperCase());
+       </scriptdef>
+
        <!-- set global properties for this build -->
        <property name="services.trunk" value=".."/>
 
-       <!-- Enviornment should be declared before reading build.properties -->
+       <!-- Environment should be declared before reading build.properties -->
        <property environment="env" />
        <property file="${services.trunk}/build.properties" />
 
-       <!--
-               Properties set in this file will override all corresponding <property> definitions
-               made in this Ant file.
-       -->
-       <property file="${jee.server.cspace}/primary.tenant.properties" />
-       <property name="primary.profile.plugin.enabled" value="${env.CSPACE_PRIMARY_UIPLUGIN}"/>
-
-       <!--
-               #
-               # Default tenant ID's for profiles - You can override these values in the "primary.tenant.properties" file at
-               # the top-level directory of the tomcat deployment location.
-               #
-       -->
-       <property name="cspace.profile.core.default.id" value="1"/>
-       <property name="cspace.profile.testsci.default.id" value="2"/>
-       <property name="cspace.profile.anthro.default.id" value="1500"/>
-       <property name="cspace.profile.publicart.default.id" value="5000"/>
-       <property name="cspace.profile.bonsai.default.id" value="3000"/>
-       <property name="cspace.profile.botgarden.default.id" value="3500"/>
-       <property name="cspace.profile.fcart.default.id" value="1000"/>
-       <property name="cspace.profile.herbarium.default.id" value="4000"/>
-       <property name="cspace.profile.lhmc.default.id" value="501"/>
-       <property name="cspace.profile.materials.default.id" value="2000"/>
-
-       <condition property="osfamily-unix">
-               <os family="unix" />
-       </condition>
-       <condition property="osfamily-windows">
-               <os family="windows" />
-       </condition>
-
-       <target name="package" depends="deploy">
-       </target>
-
-       <!--
-               Set all the values for a single/primary tenant deployment
-       -->
-       <target name="set_primary" if="${primary.profile.plugin.enabled}">
-               <echo>Setting primary vars</echo>
-               <echo>The value of primary.profile.plugin.name is ${primary.profile.plugin.name}</echo>
-               <property name="primary.profile.plugin.name" value="${env.CSPACE_PRIMARY_UIPLUGIN_NAME}" />
-               <!--
-               <condition property="primary.profile.plugin.name" value="${env.CSPACE_PRIMARY_UIPLUGIN_NAME}">
-                  <not>
-                         <isset property="primary.profile.plugin.name"/>
-                  </not>
-               </condition>
-               -->
-               <echo>The value of primary.profile.plugin.name is ${primary.profile.plugin.name}</echo>
-
-
-               <property name="primary.profile.plugin.version" value="${env.CSPACE_PRIMARY_UIPLUGIN_VERSION}" />
-               <property name="primary.profile.plugin.package" value="${env.CSPACE_PRIMARY_UIPLUGIN_PACKAGE}" />
-               <property name="primary.profile.plugin.dir" value="${env.CSPACE_PRIMARY_UIPLUGIN_DIR}" />
-               <property name="primary.profile.plugin.basename" value="${env.CSPACE_PRIMARY_UIPLUGIN_BASENAME}" />
-               <property name="primary.profile.plugin.tenantid" value="${env.CSPACE_PRIMARY_UIPLUGIN_TENANTID}" />
-               <property name="primary.profile.plugin.message.title" value="${env.CSPACE_PRIMARY_UIPLUGIN_TITLE_MESSAGE}" />
-               <property name="primary.profile.plugin.message.about" value="${env.CSPACE_PRIMARY_UIPLUGIN_ABOUT_MESSAGE}" />
-               <property name="primary.profile.plugin.logo" value="${env.CSPACE_PRIMARY_UIPLUGIN_LOGO}" />
-
-               <!-- Derived from the other props -->
-               <property name="primary.profile.plugin.js" value="${primary.profile.plugin.name}@${primary.profile.plugin.version}.min.js" />
-
-               <!-- Set the logo URL value     base on the env var CSPACE_PRIMARY_UIPLUGIN_LOGO value.
-                       #
-                       # Use empty string or "undefined" for default logo, a full URL to an image file, or a partial URL path to a local image resource
-                       #       Ex #1:
-                       #               export CSPACE_PRIMARY_UIPLUGIN_LOGO=""
-                       #       Ex #2
-                       #               export CSPACE_PRIMARY_UIPLUGIN_LOGO="http://mydomain.com/myimage.png"
-                       #       Ex #3
-                       #               export CSPACE_PRIMARY_UIPLUGIN_LOGO="/images/myimage.png"
-                       #
-               -->
-               <condition property="primary.profile.plugin.logo.final" value="undefined">
-                       <matches pattern="^undefined$" string="${primary.profile.plugin.logo}"/>
-               </condition>
-               <condition property="primary.profile.plugin.logo.final" value="undefined">
-                       <matches pattern="^$" string="${primary.profile.plugin.logo}"/>
-               </condition>
-               <condition property="primary.profile.plugin.logo.final" value="'${primary.profile.plugin.logo}'">
-                       <matches pattern="^(?!\s*$).+" string="primary.profile.plugin.logo"/>
-               </condition>
-
-               <!--
-
-               -->
-               <condition property="primary.profile.plugin.message.about.final" value="undefined">
-                       <matches pattern="^undefined$" string="${primary.profile.plugin.message.about}"/>
-               </condition>
-               <condition property="primary.profile.plugin.message.about.final" value="undefined">
-                       <matches pattern="^$" string="${primary.profile.plugin.message.about}"/>
-               </condition>
-               <condition property="primary.profile.plugin.message.about.final" value="`${primary.profile.plugin.message.about}`">
-                       <matches pattern="^(?!\s*$).+" string="${primary.profile.plugin.message.about}"/>
-               </condition>
-
-               <!-- Test to see if "core" tenant is being asked for, since we'll need to do something special for it. -->
-               <condition property="is.primary.core" value="true">
-                       <matches pattern="^cspaceUI$" string="${primary.profile.plugin.name}"/>
-               </condition>
-       </target>
+       <property name="cspace.ui.filename" value="${cspace.ui.library.name}@${cspace.ui.version}.min.js" />
 
-       <!--
-               Since "core" is a special tenant, we need to do a special check
-       -->
-       <target name="deploy_core_as_generic" if="${is.primary.core}">
-               <property name="webapp.template.dir" value="cspace#core#template" />
-               <antcall target="deploy_primary" />
-       </target>
-
-       <!--
-               Since "core" is a special tenant, we need to do a special check
-       -->
-       <target name="deploy_other_as_generic" unless="${is.primary.core}">
-               <property name="webapp.template.dir" value="cspace#template" />
-               <antcall target="deploy_primary" />
-       </target>
-
-       <target name="deploy_generic" depends="set_primary">
-               <antcall target="deploy_core_as_generic" />
-               <antcall target="deploy_other_as_generic" />
-       </target>
-
-       <!--
-               Primary tenant - Use the props to decide what tenant plugin to deploy
-       -->
-       <target name="download_primary" if="${primary.profile.plugin.enabled}">
-               <!-- Default primary tenant -->
-               <echo>-o ${primary.profile.plugin.js} --fail --insecure --remote-name --location https://unpkg.com/${primary.profile.plugin.package}@${primary.profile.plugin.version}/dist/${primary.profile.plugin.name}.min.js</echo>
-               <exec executable="curl"  failonerror="true">
-                       <arg line="-o ${primary.profile.plugin.js} --fail --insecure --remote-name --location https://unpkg.com/${primary.profile.plugin.package}@${primary.profile.plugin.version}/dist/${primary.profile.plugin.name}.min.js"/>
+       <target name="deploy_cspace_ui_js">
+               <exec executable="curl" failonerror="true">
+                       <arg line="-o ${cspace.ui.filename} --fail --insecure --remote-name --location https://unpkg.com/cspace-ui@${cspace.ui.version}/dist/${cspace.ui.library.name}.min.js"/>
                </exec>
-       </target>
-
-       <target name="deploy_primary" depends="download_primary" if="${primary.profile.plugin.enabled}" description="deploy cspace ui to ${jee.server.cspace}">
-               <filter token="UI_VERSION" value="${cspace.ui.version}" />
-               <filter token="PLUGIN_VERSION" value="${primary.profile.plugin.version}" />
-               <filter token="PLUGIN_NAME" value="${primary.profile.plugin.name}" />
-               <filter token="PLUGIN_BASENAME" value="${primary.profile.plugin.basename}" />
-               <filter token="TENANT_ID" value="${primary.profile.plugin.tenantid}" />
-               <filter token="MESSAGE_TITLE" value="${primary.profile.plugin.message.title}" />
-               <filter token="LOGO" value="${primary.profile.plugin.logo.final}" />
-               <filter token="ABOUT" value="${primary.profile.plugin.message.about.final}" />
 
-               <copy todir="${jee.deploy.cspace}/${primary.profile.plugin.dir}" filtering="true" overwrite="true">
-                       <fileset dir="${webapp.template.dir}"/>
-               </copy>
-               <move file="${primary.profile.plugin.js}" todir="${jee.deploy.cspace.ui.shared}"></move>
+               <move file="${cspace.ui.filename}" todir="${jee.deploy.cspace.ui.shared}"></move>
        </target>
 
-       <target name="undeploy_primary" if="${primary.profile.plugin.enabled}" depends="set_primary" description="undeploy collectionspace ui components from ${jee.server.cspace}">
-               <delete dir="${jee.deploy.cspace}/${primary.profile.plugin.dir}" />
-               <delete file="${jee.deploy.cspace.ui.shared}/${primary.profile.plugin.js}" />
+       <target name="undeploy_cspace_ui_js" description="undeploy collectionspace ui common components from ${jee.server.cspace}">
+               <delete file="${jee.deploy.cspace.ui.shared}/${cspace.ui.filename}" />
        </target>
 
-       <!--
-               Common UI components
-       -->
-       <target name="download_common">
-               <!-- Core UI -->
-               <exec executable="curl"  failonerror="true">
-                       <arg line="-o ${cspace.ui.js} --fail --insecure --remote-name --location https://unpkg.com/cspace-ui@${cspace.ui.version}/dist/${cspace.ui.webapp.name}.min.js"/>
-               </exec>
+       <target name="deploy_tenants" depends="deploy_cspace_ui_js">
+               <subant target="deploy_tenant" genericantfile="${ant.file}" inheritall="true">
+                       <dirset dir="." includes="*" />
+               </subant>
        </target>
 
-       <target name="deploy_common" depends="download_common">
-               <move file="${cspace.ui.js}" todir="${jee.deploy.cspace.ui.shared}"></move>
-       </target>
+       <target name="deploy_tenant">
+               <basename property="tenant.shortname" file="${basedir}" />
+               <uppercase property="tenant.shortname.upper" string="${tenant.shortname}" />
+               <propertycopy name="tenant.create.disabled" from="env.CSPACE_${tenant.shortname.upper}_CREATE_DISABLED_OPT" />
 
-       <target name="undeploy_common" description="undeploy collectionspace ui components from ${jee.server.cspace}">
-               <!-- Core webapp -->
-                       <delete file="${jee.deploy.cspace.ui.shared}/${cspace.ui.js}" />
-       </target>
+               <property file="${basedir}/build.properties" />
+               <property name="tenant.ui.profile.plugin.filename" value="${tenant.ui.profile.plugin.library.name}@${tenant.ui.profile.plugin.version}.min.js" />
 
-       <!--
-               Core UI components
-       -->
-       <target name="download_core">
-               <!-- Core UI -->
-               <echo>Downloading from https://unpkg.com/cspace-ui@${cspace.ui.version}/dist/${cspace.ui.webapp.name}.min.js</echo>
+               <!-- Default values, in case these weren't set in the tenant's build.properties. -->
+               <property name="tenant.ui.webapp.dir" value="cspace#${tenant.shortname}" />
+               <property name="tenant.ui.basename" value="/cspace/${tenant.shortname}" />
 
-               <exec executable="curl"  failonerror="true">
-                       <arg line="-o ${cspace.ui.js} --fail --insecure --remote-name --location https://unpkg.com/cspace-ui@${cspace.ui.version}/dist/${cspace.ui.webapp.name}.min.js"/>
-               </exec>
-               <move file="${cspace.ui.js}" todir="${jee.deploy.cspace.ui.shared}"></move>
-       </target>
-
-       <target name="deploy_core" depends="download_core" unless="${env.CSPACE_CORE_CREATE_DISABLED_OPT}">
-               <property name="cspace.profile.core.default.id" value="${cspace.ui.tenantid}" />
-               <condition property="cspace.profile.core.default.id" value="1234">
-                  <not>
-                         <isset property="cspace.profile.core.default.id"/>
-                  </not>
-               </condition>
+               <!-- Get the configured tenant ID from tenant bindings. This will be in the property tenant:tenantBinding.id. -->
+               <xmlproperty keepRoot="false" collapseAttributes="true" file="../../services/common/src/main/cspace/config/services/tenants/${tenant.shortname}/${tenant.shortname}-tenant-bindings.delta.xml" />
 
-               <!-- Core UI Webapp-->
-               <filter token="UI_VERSION" value="${cspace.ui.version}" />
-               <filter token="PLUGIN_BASENAME" value="${cspace.ui.basename}" />
-               <filter token="TENANT_ID" value="${cspace.profile.core.default.id}" />
-               <filter token="MESSAGE_TITLE" value="${cspace.ui.message.title}" />
-               <filter token="LOGO" value="${cspace.ui.logo}" />
+               <!-- A tenant ID must either exist tenant bindings, or be specified in the tenant.id property. -->
+               <fail message="Tenant ID not found for ${tenant.shortname}. Configure the tenantBinding id in ${tenant.shortname}-tenant-bindings.delta.xml, or set the tenant.id property in ${basedir}/build.properties.">
+                       <condition>
+                               <and>
+                                       <not>
+                                               <isset property="tenant.id"/>
+                                       </not>
+                                       <not>
+                                               <isset property="tenant:tenantBinding.id"/>
+                                       </not>
+                               </and>
+                       </condition>
+               </fail>
 
-               <copy todir="${jee.deploy.cspace}/${cspace.ui.webapp}" filtering="true" overwrite="true">
-                       <fileset dir="${cspace.ui.webapp}"/>
-               </copy>
-       </target>
-
-       <target name="undeploy_core" description="undeploy collectionspace ui components from ${jee.server.cspace}">
-               <!-- Core webapp -->
-               <delete dir="${jee.deploy.cspace}/${cspace.ui.webapp}" />
-               <delete file="${jee.deploy.cspace.ui.shared}/${cspace.ui.js}" />
-       </target>
-
-       <!--
-               Public Art Tenant
-       -->
-       <property name="publicart.profile.plugin.tenantid" value="${cspace.profile.publicart.default.id}" />
-       <property name="publicart.profile.plugin.message.title" value="Default Public Art Profile Tenant" />
-       <property name="publicart.profile.plugin.version" value="^1.0.0" />
-       <property name="publicart.profile.plugin.name" value="cspaceUIPluginProfilePublicArt" />
-       <property name="publicart.profile.plugin.dir" value="cspace#publicart" />
-       <property name="publicart.profile.plugin.js" value="${publicart.profile.plugin.name}@${publicart.profile.plugin.version}.min.js" />
-       <property name="publicart.profile.plugin.basename" value="/cspace/publicart" />
-       <!-- Use a value of "undefined" to use the default logo -->
-       <property name="publicart.profile.plugin.logo" value="undefined" />
-
-       <target name="download_publicart" unless="${env.CSPACE_PUBLICART_CREATE_DISABLED_OPT}">
-               <!-- Public Art Profile -->
-               <exec executable="curl"  failonerror="true">
-                       <arg line="-o ${publicart.profile.plugin.js} --fail --insecure --remote-name --location https://unpkg.com/cspace-ui-plugin-profile-publicart@${publicart.profile.plugin.version}/dist/${publicart.profile.plugin.name}.min.js"/>
-               </exec>
-       </target>
-
-       <target name="deploy_publicart" depends="download_publicart" unless="${env.CSPACE_PUBLICART_CREATE_DISABLED_OPT}">
-               <!-- Public Art Profile -->
-               <filter token="UI_VERSION" value="${cspace.ui.version}" />
-               <filter token="PLUGIN_VERSION" value="${publicart.profile.plugin.version}" />
-               <filter token="PLUGIN_BASENAME" value="${publicart.profile.plugin.basename}" />
-               <filter token="TENANT_ID" value="${publicart.profile.plugin.tenantid}" />
-               <filter token="MESSAGE_TITLE" value="${publicart.profile.plugin.message.title}" />
-               <filter token="LOGO" value="${publicart.profile.plugin.logo}" />
-
-               <copy todir="${jee.deploy.cspace}/${publicart.profile.plugin.dir}" filtering="true" overwrite="true">
-                       <fileset dir="${publicart.profile.plugin.dir}"/>
-               </copy>
-               <move file="${publicart.profile.plugin.name}@${publicart.profile.plugin.version}.min.js" todir="${jee.deploy.cspace.ui.shared}"></move>
-       </target>
-
-       <target name="undeploy_publicart" description="undeploy collectionspace ui components from ${jee.server.cspace}">
-               <!-- Public Art Profile -->
-               <delete dir="${jee.deploy.cspace}/${publicart.profile.plugin.dir}" />
-               <delete file="${jee.deploy.cspace.ui.shared}/${publicart.profile.plugin.js}" />
-       </target>
-
-       <!--
-               Anthropology Tenant
-       -->
-       <property name="anthro.profile.plugin.tenantid" value="${cspace.profile.anthro.default.id}" />
-       <property name="anthro.profile.plugin.message.title" value="Default Anthropology Profile" />
-       <property name="anthro.profile.plugin.logo" value="undefined" />
-       <property name="anthro.profile.plugin.version" value="^2.0.0" />
-       <property name="anthro.profile.plugin.name" value="cspaceUIPluginProfileAnthro" />
-       <property name="anthro.profile.plugin.dir" value="cspace#anthro" />
-       <property name="anthro.profile.plugin.js" value="${anthro.profile.plugin.name}@${anthro.profile.plugin.version}.min.js" />
-       <property name="anthro.profile.plugin.basename" value="/cspace/anthro" />
-
-       <target name="download_anthro" unless="${env.CSPACE_ANTHRO_CREATE_DISABLED_OPT}">
-               <!-- Anthropology Profile -->
-               <exec executable="curl"  failonerror="true">
-                       <arg line="-o ${anthro.profile.plugin.js} --fail --insecure --remote-name --location https://unpkg.com/cspace-ui-plugin-profile-anthro@${anthro.profile.plugin.version}/dist/${anthro.profile.plugin.name}.min.js"/>
-               </exec>
-       </target>
-
-       <target name="deploy_anthro" unless="${env.CSPACE_ANTHRO_CREATE_DISABLED_OPT}" depends="download_anthro">
-               <!-- Anthropology Profile -->
-               <filter token="UI_VERSION" value="${cspace.ui.version}" />
-               <filter token="PLUGIN_VERSION" value="${anthro.profile.plugin.version}" />
-               <filter token="PLUGIN_BASENAME" value="${anthro.profile.plugin.basename}" />
-               <filter token="TENANT_ID" value="${anthro.profile.plugin.tenantid}" />
-               <filter token="MESSAGE_TITLE" value="${anthro.profile.plugin.message.title}" />
-               <filter token="LOGO" value="${anthro.profile.plugin.logo}" />
-
-               <copy todir="${jee.deploy.cspace}/${anthro.profile.plugin.dir}" filtering="true" overwrite="true">
-                       <fileset dir="${anthro.profile.plugin.dir}"/>
-               </copy>
-               <move file="${anthro.profile.plugin.js}" todir="${jee.deploy.cspace.ui.shared}"></move>
-       </target>
-
-       <target name="undeploy_anthro" description="undeploy collectionspace ui components from ${jee.server.cspace}">
-               <!-- Anthropology Profile -->
-               <delete dir="${jee.deploy.cspace}/${anthro.profile.plugin.dir}" />
-               <delete file="${jee.deploy.cspace.ui.shared}/${anthro.profile.plugin.js}" />
-       </target>
-
-       <!--
-               Bonsai Tenant
-       -->
-       <property name="bonsai.profile.plugin.tenantid" value="${cspace.profile.bonsai.default.id}" />
-       <property name="bonsai.profile.plugin.message.title" value="Default Bonsai Profile" />
-       <property name="bonsai.profile.plugin.logo" value="undefined" />
-       <property name="bonsai.profile.plugin.version" value="^1.0.0" />
-       <property name="bonsai.profile.plugin.name" value="cspaceUIPluginProfileBonsai" />
-       <property name="bonsai.profile.plugin.dir" value="cspace#bonsai" />
-       <property name="bonsai.profile.plugin.js" value="${bonsai.profile.plugin.name}@${bonsai.profile.plugin.version}.min.js" />
-       <property name="bonsai.profile.plugin.basename" value="/cspace/bonsai" />
-
-       <target name="download_bonsai" unless="${env.CSPACE_BONSAI_CREATE_DISABLED_OPT}">
-               <!-- Bonsai Profile -->
-               <exec executable="curl"  failonerror="true">
-                       <arg line="-o ${bonsai.profile.plugin.js} --fail --insecure --remote-name --location https://unpkg.com/cspace-ui-plugin-profile-bonsai@${bonsai.profile.plugin.version}/dist/${bonsai.profile.plugin.name}.min.js"/>
-               </exec>
-       </target>
-
-       <target name="deploy_bonsai" unless="${env.CSPACE_BONSAI_CREATE_DISABLED_OPT}" depends="download_bonsai">
-               <!-- Bonsai Profile -->
-               <filter token="UI_VERSION" value="${cspace.ui.version}" />
-               <filter token="PLUGIN_VERSION" value="${bonsai.profile.plugin.version}" />
-               <filter token="PLUGIN_BASENAME" value="${bonsai.profile.plugin.basename}" />
-               <filter token="TENANT_ID" value="${bonsai.profile.plugin.tenantid}" />
-               <filter token="MESSAGE_TITLE" value="${bonsai.profile.plugin.message.title}" />
-               <filter token="LOGO" value="${bonsai.profile.plugin.logo}" />
-
-               <copy todir="${jee.deploy.cspace}/${bonsai.profile.plugin.dir}" filtering="true" overwrite="true">
-                       <fileset dir="${bonsai.profile.plugin.dir}"/>
-               </copy>
-               <move file="${bonsai.profile.plugin.js}" todir="${jee.deploy.cspace.ui.shared}"></move>
-       </target>
+               <condition property="resolved.tenant.id" value="${tenant:tenantBinding.id}" else="${tenant.id}">
+                       <isset property="tenant:tenantBinding.id"/>
+               </condition>
 
-       <target name="undeploy_bonsai" description="undeploy collectionspace ui components from ${jee.server.cspace}">
-               <!-- Bonsai Profile -->
-               <delete dir="${jee.deploy.cspace}/${bonsai.profile.plugin.dir}" />
-               <delete file="${jee.deploy.cspace.ui.shared}/${bonsai.profile.plugin.js}" />
+               <antcall target="deploy_tenant_js" />
+               <antcall target="deploy_tenant_webapp" />
        </target>
 
-       <!--
-               Fine and Contemporary Art Tenant
-       -->
-       <property name="fcart.profile.plugin.tenantid" value="${cspace.profile.fcart.default.id}" />
-       <property name="fcart.profile.plugin.message.title" value="Default Fine and Contemporary Art" />
-       <property name="fcart.profile.plugin.logo" value="undefined" />
-       <property name="fcart.profile.plugin.version" value="^1.0.0" />
-       <property name="fcart.profile.plugin.name" value="cspaceUIPluginProfileFCart" />
-       <property name="fcart.profile.plugin.dir" value="cspace#fcart" />
-       <property name="fcart.profile.plugin.js" value="${fcart.profile.plugin.name}@${fcart.profile.plugin.version}.min.js" />
-       <property name="fcart.profile.plugin.basename" value="/cspace/fcart" />
-
-       <target name="download_fcart" unless="${env.CSPACE_FCART_CREATE_DISABLED_OPT}">
-               <!-- FCart Profile -->
-               <exec executable="curl"  failonerror="true">
-                       <arg line="-o ${fcart.profile.plugin.js} --fail --insecure --remote-name --location https://unpkg.com/cspace-ui-plugin-profile-fcart@${fcart.profile.plugin.version}/dist/${fcart.profile.plugin.name}.min.js"/>
+       <target name="deploy_tenant_js" if="tenant.ui.profile.plugin.package.name" unless="${tenant.create.disabled}">
+               <exec executable="curl" failonerror="true">
+                       <arg line="-o ${tenant.ui.profile.plugin.filename} --fail --insecure --remote-name --location https://unpkg.com/${tenant.ui.profile.plugin.package.name}@${tenant.ui.profile.plugin.version}/dist/${tenant.ui.profile.plugin.library.name}.min.js"/>
                </exec>
-       </target>
-
-       <target name="deploy_fcart" unless="${env.CSPACE_FCART_CREATE_DISABLED_OPT}" depends="download_fcart">
-               <!-- FCart Profile -->
-               <filter token="UI_VERSION" value="${cspace.ui.version}" />
-               <filter token="PLUGIN_VERSION" value="${fcart.profile.plugin.version}" />
-               <filter token="PLUGIN_BASENAME" value="${fcart.profile.plugin.basename}" />
-               <filter token="TENANT_ID" value="${fcart.profile.plugin.tenantid}" />
-               <filter token="MESSAGE_TITLE" value="${fcart.profile.plugin.message.title}" />
-               <filter token="LOGO" value="${fcart.profile.plugin.logo}" />
 
-               <copy todir="${jee.deploy.cspace}/${fcart.profile.plugin.dir}" filtering="true" overwrite="true">
-                       <fileset dir="${fcart.profile.plugin.dir}"/>
-               </copy>
-               <move file="${fcart.profile.plugin.js}" todir="${jee.deploy.cspace.ui.shared}"></move>
-       </target>
-
-       <target name="undeploy_fcart" description="undeploy collectionspace ui components from ${jee.server.cspace}">
-               <!-- FCart Profile -->
-               <delete dir="${jee.deploy.cspace}/${fcart.profile.plugin.dir}" />
-               <delete file="${jee.deploy.cspace.ui.shared}/${fcart.profile.plugin.js}" />
+               <move file="${tenant.ui.profile.plugin.filename}" todir="${jee.deploy.cspace.ui.shared}"></move>
        </target>
 
-       <!--
-               Local History and Material Culture Tenant
-       -->
-       <property name="lhmc.profile.plugin.tenantid" value="${cspace.profile.lhmc.default.id}" />
-       <property name="lhmc.profile.plugin.message.title" value="Default Local History and Material Culture Profile" />
-       <property name="lhmc.profile.plugin.logo" value="undefined" />
-       <property name="lhmc.profile.plugin.version" value="^1.0.0" />
-       <property name="lhmc.profile.plugin.name" value="cspaceUIPluginProfileLHMC" />
-       <property name="lhmc.profile.plugin.dir" value="cspace#lhmc" />
-       <property name="lhmc.profile.plugin.js" value="${lhmc.profile.plugin.name}@${lhmc.profile.plugin.version}.min.js" />
-       <property name="lhmc.profile.plugin.basename" value="/cspace/lhmc" />
-
-       <target name="download_lhmc" unless="${env.CSPACE_LHMC_CREATE_DISABLED_OPT}">
-               <!-- LHMC Profile -->
-               <exec executable="curl"  failonerror="true">
-                       <arg line="-o ${lhmc.profile.plugin.js} --fail --insecure --remote-name --location https://unpkg.com/cspace-ui-plugin-profile-lhmc@${lhmc.profile.plugin.version}/dist/${lhmc.profile.plugin.name}.min.js"/>
-               </exec>
-       </target>
+       <target name="deploy_tenant_webapp" unless="${tenant.create.disabled}">
+               <filter token="UI_FILENAME" value="${cspace.ui.filename}" />
+               <filter token="UI_PROFILE_PLUGIN_FILENAME" value="${tenant.ui.profile.plugin.filename}" />
+               <filter token="UI_PROFILE_PLUGIN_LIBRARY_NAME" value="${tenant.ui.profile.plugin.library.name}" />
+               <filter token="BASENAME" value="${tenant.ui.basename}" />
+               <filter token="TENANT_ID" value="${resolved.tenant.id}" />
 
-       <target name="deploy_lhmc" unless="${env.CSPACE_LHMC_CREATE_DISABLED_OPT}" depends="download_lhmc">
-               <!-- LHMC Profile -->
-               <filter token="UI_VERSION" value="${cspace.ui.version}" />
-               <filter token="PLUGIN_VERSION" value="${lhmc.profile.plugin.version}" />
-               <filter token="PLUGIN_BASENAME" value="${lhmc.profile.plugin.basename}" />
-               <filter token="TENANT_ID" value="${lhmc.profile.plugin.tenantid}" />
-               <filter token="MESSAGE_TITLE" value="${lhmc.profile.plugin.message.title}" />
-               <filter token="LOGO" value="${lhmc.profile.plugin.logo}" />
-
-               <copy todir="${jee.deploy.cspace}/${lhmc.profile.plugin.dir}" filtering="true" overwrite="true">
-                       <fileset dir="${lhmc.profile.plugin.dir}"/>
+               <copy todir="${jee.deploy.cspace}/${tenant.ui.webapp.dir}" failonerror="false" filtering="true" overwrite="true">
+                       <fileset dir="${basedir}" excludes="build.properties" />
                </copy>
-               <move file="${lhmc.profile.plugin.js}" todir="${jee.deploy.cspace.ui.shared}"></move>
        </target>
 
-       <target name="undeploy_lhmc" description="undeploy collectionspace ui components from ${jee.server.cspace}">
-               <!-- LHMC Profile -->
-               <delete dir="${jee.deploy.cspace}/${lhmc.profile.plugin.dir}" />
-               <delete file="${jee.deploy.cspace.ui.shared}/${lhmc.profile.plugin.js}" />
+       <target name="undeploy_tenants">
+               <subant target="undeploy_tenant" genericantfile="${ant.file}" inheritall="true">
+                       <dirset dir="." includes="*" />
+               </subant>
        </target>
 
-       <!--
-               Materials Authority Tenant
-       -->
-       <property name="materials.profile.plugin.tenantid" value="${cspace.profile.materials.default.id}" />
-       <property name="materials.profile.plugin.message.title" value="Default Materials Authority" />
-       <property name="materials.profile.plugin.logo" value="undefined" />
-       <property name="materials.profile.plugin.version" value="^1.0.0" />
-       <property name="materials.profile.plugin.name" value="cspaceUIPluginProfileMaterials" />
-       <property name="materials.profile.plugin.dir" value="cspace#materials" />
-       <property name="materials.profile.plugin.js" value="${materials.profile.plugin.name}@${materials.profile.plugin.version}.min.js" />
-       <property name="materials.profile.plugin.basename" value="/cspace/materials" />
-
-       <target name="download_materials" unless="${env.CSPACE_MATERIALS_CREATE_DISABLED_OPT}">
-               <!-- Materials Authority Profile -->
-               <exec executable="curl"  failonerror="true">
-                       <arg line="-o ${materials.profile.plugin.js} --fail --insecure --remote-name --location https://unpkg.com/cspace-ui-plugin-profile-materials@${materials.profile.plugin.version}/dist/${materials.profile.plugin.name}.min.js"/>
-               </exec>
-       </target>
+       <target name="undeploy_tenant">
+               <basename property="tenant.shortname" file="${basedir}" />
 
-       <target name="deploy_materials" unless="${env.CSPACE_MATERIALS_CREATE_DISABLED_OPT}" depends="download_materials">
-               <!-- Materials Authority Profile -->
-               <filter token="UI_VERSION" value="${cspace.ui.version}" />
-               <filter token="PLUGIN_VERSION" value="${materials.profile.plugin.version}" />
-               <filter token="PLUGIN_BASENAME" value="${materials.profile.plugin.basename}" />
-               <filter token="TENANT_ID" value="${materials.profile.plugin.tenantid}" />
-               <filter token="MESSAGE_TITLE" value="${materials.profile.plugin.message.title}" />
-               <filter token="LOGO" value="${materials.profile.plugin.logo}" />
+               <property file="${basedir}/build.properties" />
 
-               <copy todir="${jee.deploy.cspace}/${materials.profile.plugin.dir}" filtering="true" overwrite="true">
-                       <fileset dir="${materials.profile.plugin.dir}"/>
-               </copy>
-               <move file="${materials.profile.plugin.js}" todir="${jee.deploy.cspace.ui.shared}"></move>
+               <antcall target="undeploy_tenant_webapp" />
        </target>
 
-       <target name="undeploy_materials" description="undeploy collectionspace ui components from ${jee.server.cspace}">
-               <!-- Materials Authority Profile -->
-               <delete dir="${jee.deploy.cspace}/${materials.profile.plugin.dir}" />
-               <delete file="${jee.deploy.cspace.ui.shared}/${materials.profile.plugin.js}" />
+       <target name="undeploy_tenant_webapp">
+               <delete dir="${jee.deploy.cspace}/${tenant.ui.webapp.dir}" />
        </target>
 
-       <!--
-               General deploy target
-       -->
-       <target name="deploy_others" unless="${primary.profile.plugin.enabled}">
-               <antcall target="deploy_common" />
-               <antcall target="deploy_core" />
-               <antcall target="deploy_publicart" />
-               <antcall target="deploy_anthro" />
-               <antcall target="deploy_bonsai" />
-               <antcall target="deploy_fcart" />
-               <antcall target="deploy_lhmc" />
-               <antcall target="deploy_materials" />
+       <target name="undeploy_js">
+               <delete>
+                       <fileset dir="${jee.deploy.cspace.ui.shared}" includes="*" />
+               </delete>
        </target>
 
-       <target name="deploy" depends="deploy_common, deploy_generic, deploy_others" description="deploy cspace ui to ${jee.server.cspace}">
-               <ant antfile="incubator/build.xml" target="deploy" inheritAll="false" />
-       </target>
-
-       <!-- General undeploy target -->
-
-       <target name="undeploy_others">
-               <antcall target="undeploy_materials" />
-               <antcall target="undeploy_lhmc" />
-               <antcall target="undeploy_fcart" />
-               <antcall target="undeploy_bonsai" />
-               <antcall target="undeploy_anthro" />
-               <antcall target="undeploy_publicart" />
-               <antcall target="undeploy_core" />
-               <antcall target="undeploy_common" />
-               <ant antfile="incubator/build.xml" target="undeploy" inheritAll="false" />
-       </target>
-
-       <target name="undeploy" depends="undeploy_common, undeploy_primary, undeploy_others" description="undeploy collectionspace ui components from ${jee.server.cspace}">
-       </target>
+       <target name="deploy" depends="deploy_tenants" description="deploy cspace ui to ${jee.server.cspace}" />
 
+       <target name="undeploy" depends="undeploy_tenants, undeploy_js" description="undeploy collectionspace ui components from ${jee.server.cspace}" />
 </project>
diff --git a/cspace-ui/core/build.properties b/cspace-ui/core/build.properties
new file mode 100644 (file)
index 0000000..edcfe5f
--- /dev/null
@@ -0,0 +1,2 @@
+tenant.ui.webapp.dir=cspace#${tenant.shortname}
+tenant.ui.basename=/cspace/${tenant.shortname}
diff --git a/cspace-ui/core/index.html b/cspace-ui/core/index.html
new file mode 100644 (file)
index 0000000..3fad096
--- /dev/null
@@ -0,0 +1,16 @@
+<html>
+       <head>
+               <meta charset="UTF-8" />
+       </head>
+       <body>
+               <div id="cspace"></div>
+               <script src="/cspace-ui/@UI_FILENAME@"></script>
+               <script>
+                       cspaceUI({
+                               basename: '@BASENAME@',
+                               prettyUrls: true,
+                               tenantId: '@TENANT_ID@',
+                       });
+               </script>
+       </body>
+</html>
diff --git a/cspace-ui/cspace#anthro/index.html b/cspace-ui/cspace#anthro/index.html
deleted file mode 100644 (file)
index 9569663..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<html>
-       <head>
-               <meta charset="UTF-8" />
-       </head>
-       <body>
-               <div id="cspace"></div>
-               <script src="/cspace-ui/cspaceUI@@UI_VERSION@.min.js"></script>
-               <script src="/cspace-ui/cspaceUIPluginProfileAnthro@@PLUGIN_VERSION@.min.js"></script>
-               <script>
-                       cspaceUI({
-                               tenantId: '@TENANT_ID@',
-                               // Logo value should include quotes, or use "undefined" (no quotes) for default logo
-                               logo: @LOGO@,
-                               messages: {
-                                       // Override the login page title
-                                       'about.title': '@MESSAGE_TITLE@',
-                               },
-                               basename: '@PLUGIN_BASENAME@',
-                               prettyUrls: true,
-                               plugins: [
-                                       cspaceUIPluginProfileAnthro(),
-                               ],
-                       });
-               </script>
-       </body>
-</html>
diff --git a/cspace-ui/cspace#bonsai/index.html b/cspace-ui/cspace#bonsai/index.html
deleted file mode 100644 (file)
index a97f78c..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<html>
-       <head>
-               <meta charset="UTF-8" />
-       </head>
-       <body>
-               <!-- The template -->
-               <div id="cspace"></div>
-               <script src="/cspace-ui/cspaceUI@@UI_VERSION@.min.js"></script>
-               <script src="/cspace-ui/cspaceUIPluginProfileBonsai@@PLUGIN_VERSION@.min.js"></script>
-               <script>
-                       cspaceUI({
-                               tenantId: '@TENANT_ID@',
-                               // Logo value should include quotes, or use "undefined" (no quotes) for default logo
-                               logo: @LOGO@,
-                               messages: {
-                                       // Override the login page title
-                                       'about.title': '@MESSAGE_TITLE@',
-                               },
-                               basename: '@PLUGIN_BASENAME@',
-                               prettyUrls: true,
-                               plugins: [
-                                       cspaceUIPluginProfileBonsai(),
-                               ],
-                       });
-               </script>
-       </body>
-</html>
diff --git a/cspace-ui/cspace#core#template/index.html b/cspace-ui/cspace#core#template/index.html
deleted file mode 100644 (file)
index 7f4ac24..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<html>
-       <head>
-               <meta charset="UTF-8" />
-       </head>
-       <body>
-               <div id="cspace"></div>
-               <script src="/cspace-ui/cspaceUI@@UI_VERSION@.min.js"></script>
-               <script>
-                       cspaceUI({
-                               tenantId: '@TENANT_ID@',
-                               // Logo value should include quotes, or use "undefined" (no quotes) for default logo
-                               logo: @LOGO@,
-                               messages: {
-                                       // Override the login page title
-                                       'about.title': '@MESSAGE_TITLE@',
-                                       'about.contentHTML': @ABOUT@,
-                               },
-                               basename: '@PLUGIN_BASENAME@',
-                               prettyUrls: true,
-                       });
-               </script>
-       </body>
-</html>
diff --git a/cspace-ui/cspace#core/index.html b/cspace-ui/cspace#core/index.html
deleted file mode 100644 (file)
index 33a0515..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<html>
-       <head>
-               <meta charset="UTF-8" />
-       </head>
-       <body>
-               <div id="cspace"></div>
-               <script src="/cspace-ui/cspaceUI@@UI_VERSION@.min.js"></script>
-               <script>
-                       cspaceUI({
-                               tenantId: '@TENANT_ID@',
-                               // Logo value should include quotes, or use "undefined" (no quotes) for default logo
-                               logo: @LOGO@,
-                               messages: {
-                                       // Override the login page title
-                                       'about.title': '@MESSAGE_TITLE@',
-                               },
-                               basename: '@PLUGIN_BASENAME@',
-                               prettyUrls: true,
-                       });
-               </script>
-       </body>
-</html>
diff --git a/cspace-ui/cspace#fcart/index.html b/cspace-ui/cspace#fcart/index.html
deleted file mode 100644 (file)
index b3a6367..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<html>
-       <head>
-               <meta charset="UTF-8" />
-       </head>
-       <body>
-               <div id="cspace"></div>
-               <script src="/cspace-ui/cspaceUI@@UI_VERSION@.min.js"></script>
-               <script src="/cspace-ui/cspaceUIPluginProfileFCart@@PLUGIN_VERSION@.min.js"></script>
-               <script>
-                       cspaceUI({
-                               tenantId: '@TENANT_ID@',
-                               // Logo value should include quotes, or use "undefined" (no quotes) for default logo
-                               logo: @LOGO@,
-                               messages: {
-                                       // Override the login page title
-                                       'about.title': '@MESSAGE_TITLE@',
-                               },
-                               basename: '@PLUGIN_BASENAME@',
-                               prettyUrls: true,
-                               plugins: [
-                                       cspaceUIPluginProfileFCart(),
-                               ],
-                       });
-               </script>
-       </body>
-</html>
diff --git a/cspace-ui/cspace#lhmc/index.html b/cspace-ui/cspace#lhmc/index.html
deleted file mode 100644 (file)
index b439bcb..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<html>
-       <head>
-               <meta charset="UTF-8" />
-       </head>
-       <body>
-               <!-- The template -->
-               <div id="cspace"></div>
-               <script src="/cspace-ui/cspaceUI@@UI_VERSION@.min.js"></script>
-               <script src="/cspace-ui/cspaceUIPluginProfileLHMC@@PLUGIN_VERSION@.min.js"></script>
-               <script>
-                       cspaceUI({
-                               tenantId: '@TENANT_ID@',
-                               // Logo value should include quotes, or use "undefined" (no quotes) for default logo
-                               logo: @LOGO@,
-                               messages: {
-                                       // Override the login page title
-                                       'about.title': '@MESSAGE_TITLE@',
-                               },
-                               basename: '@PLUGIN_BASENAME@',
-                               prettyUrls: true,
-                               plugins: [
-                                       cspaceUIPluginProfileLHMC(),
-                               ],
-                       });
-               </script>
-       </body>
-</html>
diff --git a/cspace-ui/cspace#materials/index.html b/cspace-ui/cspace#materials/index.html
deleted file mode 100644 (file)
index f9e8b8e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<html>
-       <head>
-               <meta charset="UTF-8" />
-       </head>
-       <body>
-               <div id="cspace"></div>
-               <script src="/cspace-ui/cspaceUI@@UI_VERSION@.min.js"></script>
-               <script src="/cspace-ui/cspaceUIPluginProfileMaterials@@PLUGIN_VERSION@.min.js"></script>
-               <script>
-                       cspaceUI({
-                               tenantId: '@TENANT_ID@',
-                               // Logo value should include quotes, or use "undefined" (no quotes) for default logo
-                               logo: @LOGO@,
-                               messages: {
-                                       // Override the login page title
-                                       'about.title': '@MESSAGE_TITLE@',
-                               },
-                               basename: '@PLUGIN_BASENAME@',
-                               prettyUrls: true,
-                               plugins: [
-                                       cspaceUIPluginProfileMaterials(),
-                               ],
-                       });
-               </script>
-       </body>
-</html>
diff --git a/cspace-ui/cspace#publicart/index.html b/cspace-ui/cspace#publicart/index.html
deleted file mode 100644 (file)
index 0dac81b..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<html>
-       <head>
-               <meta charset="UTF-8" />
-       </head>
-       <body>
-               <div id="cspace"></div>
-               <script src="/cspace-ui/cspaceUI@@UI_VERSION@.min.js"></script>
-               <script src="/cspace-ui/cspaceUIPluginProfilePublicArt@@PLUGIN_VERSION@.min.js"></script>
-               <script>
-                       cspaceUI({
-                               tenantId: '@TENANT_ID@',
-                               // Logo value should include quotes, or use "undefined" (no quotes) for default logo
-                               logo: @LOGO@,
-                               messages: {
-                                       // Override the login page title
-                                       'about.title': '@MESSAGE_TITLE@',
-                               },
-                               basename: '@PLUGIN_BASENAME@',
-                               prettyUrls: true,
-                               plugins: [
-                                       cspaceUIPluginProfilePublicArt(),
-                               ],
-                       });
-               </script>
-       </body>
-</html>
diff --git a/cspace-ui/cspace#template/WEB-INF/web.xml b/cspace-ui/cspace#template/WEB-INF/web.xml
deleted file mode 100644 (file)
index b476587..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="3.0" metadata-complete="true">
-        <filter>
-                <filter-name>FallbackResourceFilter</filter-name>
-                <filter-class>org.collectionspace.services.common.filter.FallbackResourceFilter</filter-class>
-        </filter>
-        <filter-mapping>
-                <filter-name>FallbackResourceFilter</filter-name>
-                <url-pattern>/*</url-pattern>
-        </filter-mapping>
-        <filter>
-                <filter-name>ExpiresFilter</filter-name>
-                <filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>
-                <init-param>
-                        <param-name>ExpiresDefault</param-name>
-                        <param-value>access plus 12 hours</param-value>
-                </init-param>
-        </filter>
-        <filter-mapping>
-                <filter-name>ExpiresFilter</filter-name>
-                <url-pattern>/*</url-pattern>
-        </filter-mapping>
-</web-app>
\ No newline at end of file
diff --git a/cspace-ui/cspace#template/index.html b/cspace-ui/cspace#template/index.html
deleted file mode 100644 (file)
index dbe20f0..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<html>
-       <head>
-               <meta charset="UTF-8" />
-       </head>
-       <body>
-               <!-- The template -->
-               <div id="cspace"></div>
-               <script src="/cspace-ui/cspaceUI@@UI_VERSION@.min.js"></script>
-               <script src="/cspace-ui/@PLUGIN_NAME@@@PLUGIN_VERSION@.min.js"></script>
-               <script>
-                       cspaceUI({
-                               tenantId: '@TENANT_ID@',
-                               // Logo value should include quotes, or use "undefined" (no quotes) for default logo
-                               logo: @LOGO@,
-                               messages: {
-                                       // Override the login page title
-                                       'about.title': '@MESSAGE_TITLE@',
-                                       'about.contentHTML': @ABOUT@,
-                               },
-                               basename: '@PLUGIN_BASENAME@',
-                               prettyUrls: true,
-                               plugins: [
-                                       @PLUGIN_NAME@(),
-                               ],
-                       });
-               </script>
-       </body>
-</html>
diff --git a/cspace-ui/dvp/build.properties b/cspace-ui/dvp/build.properties
new file mode 100644 (file)
index 0000000..5e94535
--- /dev/null
@@ -0,0 +1,6 @@
+tenant.ui.webapp.dir=cspace#${tenant.shortname}
+tenant.ui.basename=/cspace/${tenant.shortname}
+
+tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-dvp
+tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileDartmouthVietnamProject
+tenant.ui.profile.plugin.version=latest
diff --git a/cspace-ui/dvp/index.html b/cspace-ui/dvp/index.html
new file mode 100644 (file)
index 0000000..1a3b160
--- /dev/null
@@ -0,0 +1,20 @@
+<html>
+       <head>
+               <meta charset="UTF-8" />
+       </head>
+       <body>
+               <div id="cspace"></div>
+               <script src="/cspace-ui/@UI_FILENAME@"></script>
+               <script src="/cspace-ui/@UI_PROFILE_PLUGIN_FILENAME@"></script>
+               <script>
+                       cspaceUI({
+                               basename: '@BASENAME@',
+                               plugins: [
+                                       @UI_PROFILE_PLUGIN_LIBRARY_NAME@(),
+                               ],
+                               prettyUrls: true,
+                               tenantId: '@TENANT_ID@',
+                       });
+               </script>
+       </body>
+</html>
diff --git a/cspace-ui/fcart/build.properties b/cspace-ui/fcart/build.properties
new file mode 100644 (file)
index 0000000..d40e30e
--- /dev/null
@@ -0,0 +1,6 @@
+tenant.ui.webapp.dir=cspace#${tenant.shortname}
+tenant.ui.basename=/cspace/${tenant.shortname}
+
+tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-fcart
+tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileFCart
+tenant.ui.profile.plugin.version=^1.0.0
diff --git a/cspace-ui/fcart/index.html b/cspace-ui/fcart/index.html
new file mode 100644 (file)
index 0000000..1a3b160
--- /dev/null
@@ -0,0 +1,20 @@
+<html>
+       <head>
+               <meta charset="UTF-8" />
+       </head>
+       <body>
+               <div id="cspace"></div>
+               <script src="/cspace-ui/@UI_FILENAME@"></script>
+               <script src="/cspace-ui/@UI_PROFILE_PLUGIN_FILENAME@"></script>
+               <script>
+                       cspaceUI({
+                               basename: '@BASENAME@',
+                               plugins: [
+                                       @UI_PROFILE_PLUGIN_LIBRARY_NAME@(),
+                               ],
+                               prettyUrls: true,
+                               tenantId: '@TENANT_ID@',
+                       });
+               </script>
+       </body>
+</html>
diff --git a/cspace-ui/incubator/build.xml b/cspace-ui/incubator/build.xml
deleted file mode 100644 (file)
index 0451518..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<project name="react.ui" default="package" basedir="." xmlns:if="ant:if" xmlns:unless="ant:unless">
-       <description>
-               CollectionSpace UI Component build
-       </description>
-       
-       <!-- set global properties for this build -->
-       <property name="services.trunk" value="../.."/>
-       
-       <!-- Enviornment should be declared before reading build.properties -->
-       <property environment="env" />
-       <property file="${services.trunk}/build.properties" />
-               
-       <condition property="osfamily-unix">
-               <os family="unix" />
-       </condition>
-       <condition property="osfamily-windows">
-               <os family="windows" />
-       </condition>
-       
-       <target name="package" depends="deploy">
-       </target>
-       
-       <!--
-               Dartmouth Vietnam Project - DVP
-       -->
-       <property name="dvp.profile.plugin.tenantid" value="1975" />
-       <property name="dvp.profile.plugin.message.title" value="Dartmouth Vietnam Project" />
-       <property name="dvp.profile.plugin.version" value="latest" />
-       <property name="dvp.profile.plugin.name" value="cspaceUIPluginProfileDartmouthVietnamProject" />
-       <property name="dvp.profile.plugin.dir" value="cspace#dvp" />
-       <property name="dvp.profile.plugin.js" value="${dvp.profile.plugin.name}@${dvp.profile.plugin.version}.min.js" />
-       <property name="dvp.profile.plugin.basename" value="/cspace/dvp" />
-       <!-- Use a value of "undefined" to use the default logo -->
-       <property name="dvp.profile.plugin.logo" value="undefined" />
-
-       <target name="download_dvp" unless="${env.CSPACE_DVP_CREATE_DISABLED_OPT}">
-               <!-- Dartmouth Vietnam Project -->
-               <exec executable="curl"  failonerror="true">
-                       <arg line="-o ${dvp.profile.plugin.js} --fail --insecure --remote-name --location https://unpkg.com/cspace-ui-plugin-profile-dvp@${dvp.profile.plugin.version}/dist/${dvp.profile.plugin.name}.min.js"/>
-               </exec>
-       </target>
-               
-       <target name="deploy_dvp" depends="download_dvp" unless="${env.CSPACE_DVP_CREATE_DISABLED_OPT}">
-               <!-- Dartmouth Vietnam Project -->
-               <filter token="UI_VERSION" value="${cspace.ui.version}" />
-               <filter token="PLUGIN_VERSION" value="${dvp.profile.plugin.version}" />
-               <filter token="PLUGIN_BASENAME" value="${dvp.profile.plugin.basename}" />
-               <filter token="TENANT_ID" value="${dvp.profile.plugin.tenantid}" />
-               <filter token="MESSAGE_TITLE" value="${dvp.profile.plugin.message.title}" />
-               <filter token="LOGO" value="${dvp.profile.plugin.logo}" />
-               
-               <copy todir="${jee.deploy.cspace}/${dvp.profile.plugin.dir}" filtering="true" overwrite="true">
-                       <fileset dir="${dvp.profile.plugin.dir}"/>
-               </copy>
-               <move file="${dvp.profile.plugin.name}@${dvp.profile.plugin.version}.min.js" todir="${jee.deploy.cspace.ui.shared}"></move>
-       </target>
-
-       <target name="undeploy_dvp" description="undeploy collectionspace ui components from ${jee.server.cspace}">
-               <!-- Dartmouth Vietnam Project -->
-               <delete dir="${jee.deploy.cspace}/${dvp.profile.plugin.dir}" />
-               <delete file="${jee.deploy.cspace.ui.shared}/${dvp.profile.plugin.js}" />
-       </target>
-
-       <!-- General deploy target -->
-                       
-       <target name="deploy" depends="deploy_dvp" description="deploy cspace ui to ${jee.server.cspace}">                              
-       </target>
-               
-       <!-- General undeploy target -->
-
-       <target name="undeploy" depends="undeploy_dvp" description="undeploy collectionspace ui components from ${jee.server.cspace}">
-       </target>
-
-</project>
diff --git a/cspace-ui/incubator/cspace#dvp/WEB-INF/web.xml b/cspace-ui/incubator/cspace#dvp/WEB-INF/web.xml
deleted file mode 100644 (file)
index b476587..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="3.0" metadata-complete="true">
-        <filter>
-                <filter-name>FallbackResourceFilter</filter-name>
-                <filter-class>org.collectionspace.services.common.filter.FallbackResourceFilter</filter-class>
-        </filter>
-        <filter-mapping>
-                <filter-name>FallbackResourceFilter</filter-name>
-                <url-pattern>/*</url-pattern>
-        </filter-mapping>
-        <filter>
-                <filter-name>ExpiresFilter</filter-name>
-                <filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>
-                <init-param>
-                        <param-name>ExpiresDefault</param-name>
-                        <param-value>access plus 12 hours</param-value>
-                </init-param>
-        </filter>
-        <filter-mapping>
-                <filter-name>ExpiresFilter</filter-name>
-                <url-pattern>/*</url-pattern>
-        </filter-mapping>
-</web-app>
\ No newline at end of file
diff --git a/cspace-ui/incubator/cspace#dvp/index.html b/cspace-ui/incubator/cspace#dvp/index.html
deleted file mode 100644 (file)
index 2d4e36e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<html>
-       <head>
-               <meta charset="UTF-8" />
-       </head>
-       <body>
-               <div id="cspace"></div>
-               <script src="/cspace-ui/cspaceUI@@UI_VERSION@.min.js"></script>
-               <script src="/cspace-ui/cspaceUIPluginProfileDartmouthVietnamProject@@PLUGIN_VERSION@.min.js"></script>
-               <script>
-                       cspaceUI({
-                               tenantId: '@TENANT_ID@',
-                               // Logo value should include quotes, or use "undefined" (no quotes) for default logo
-                               logo: @LOGO@,
-                               messages: {
-                                       // Override the login page title
-                                       'about.title': '@MESSAGE_TITLE@',
-                               },
-                               basename: '@PLUGIN_BASENAME@',
-                               prettyUrls: true,
-                               plugins: [
-                                       cspaceUIPluginProfileDartmouthVietnamProject(),
-                               ],
-                       });
-               </script>
-       </body>
-</html>
diff --git a/cspace-ui/lhmc/build.properties b/cspace-ui/lhmc/build.properties
new file mode 100644 (file)
index 0000000..4c5b819
--- /dev/null
@@ -0,0 +1,6 @@
+tenant.ui.webapp.dir=cspace#${tenant.shortname}
+tenant.ui.basename=/cspace/${tenant.shortname}
+
+tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-lhmc
+tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileLHMC
+tenant.ui.profile.plugin.version=^1.0.0
diff --git a/cspace-ui/lhmc/index.html b/cspace-ui/lhmc/index.html
new file mode 100644 (file)
index 0000000..1a3b160
--- /dev/null
@@ -0,0 +1,20 @@
+<html>
+       <head>
+               <meta charset="UTF-8" />
+       </head>
+       <body>
+               <div id="cspace"></div>
+               <script src="/cspace-ui/@UI_FILENAME@"></script>
+               <script src="/cspace-ui/@UI_PROFILE_PLUGIN_FILENAME@"></script>
+               <script>
+                       cspaceUI({
+                               basename: '@BASENAME@',
+                               plugins: [
+                                       @UI_PROFILE_PLUGIN_LIBRARY_NAME@(),
+                               ],
+                               prettyUrls: true,
+                               tenantId: '@TENANT_ID@',
+                       });
+               </script>
+       </body>
+</html>
similarity index 92%
rename from cspace-ui/cspace#lhmc/WEB-INF/web.xml
rename to cspace-ui/materials/WEB-INF/web.xml
index b476587bd855edbfb7cbb07c147f1de2fffb92d2..3c1a184fb07d10f319776387e79c10af3c7ca75e 100644 (file)
                 <filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>
                 <init-param>
                         <param-name>ExpiresDefault</param-name>
-                        <param-value>access plus 12 hours</param-value>
+                        <param-value>access plus 2 hours</param-value>
                 </init-param>
         </filter>
         <filter-mapping>
                 <filter-name>ExpiresFilter</filter-name>
                 <url-pattern>/*</url-pattern>
         </filter-mapping>
-</web-app>
\ No newline at end of file
+</web-app>
diff --git a/cspace-ui/materials/build.properties b/cspace-ui/materials/build.properties
new file mode 100644 (file)
index 0000000..18a0794
--- /dev/null
@@ -0,0 +1,6 @@
+tenant.ui.webapp.dir=cspace#${tenant.shortname}
+tenant.ui.basename=/cspace/${tenant.shortname}
+
+tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-materials
+tenant.ui.profile.plugin.library.name=cspaceUIPluginProfileMaterials
+tenant.ui.profile.plugin.version=^1.0.0
diff --git a/cspace-ui/materials/index.html b/cspace-ui/materials/index.html
new file mode 100644 (file)
index 0000000..1a3b160
--- /dev/null
@@ -0,0 +1,20 @@
+<html>
+       <head>
+               <meta charset="UTF-8" />
+       </head>
+       <body>
+               <div id="cspace"></div>
+               <script src="/cspace-ui/@UI_FILENAME@"></script>
+               <script src="/cspace-ui/@UI_PROFILE_PLUGIN_FILENAME@"></script>
+               <script>
+                       cspaceUI({
+                               basename: '@BASENAME@',
+                               plugins: [
+                                       @UI_PROFILE_PLUGIN_LIBRARY_NAME@(),
+                               ],
+                               prettyUrls: true,
+                               tenantId: '@TENANT_ID@',
+                       });
+               </script>
+       </body>
+</html>
similarity index 92%
rename from cspace-ui/cspace#bonsai/WEB-INF/web.xml
rename to cspace-ui/publicart/WEB-INF/web.xml
index b476587bd855edbfb7cbb07c147f1de2fffb92d2..3c1a184fb07d10f319776387e79c10af3c7ca75e 100644 (file)
                 <filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>
                 <init-param>
                         <param-name>ExpiresDefault</param-name>
-                        <param-value>access plus 12 hours</param-value>
+                        <param-value>access plus 2 hours</param-value>
                 </init-param>
         </filter>
         <filter-mapping>
                 <filter-name>ExpiresFilter</filter-name>
                 <url-pattern>/*</url-pattern>
         </filter-mapping>
-</web-app>
\ No newline at end of file
+</web-app>
diff --git a/cspace-ui/publicart/build.properties b/cspace-ui/publicart/build.properties
new file mode 100644 (file)
index 0000000..dc98834
--- /dev/null
@@ -0,0 +1,6 @@
+tenant.ui.webapp.dir=cspace#${tenant.shortname}
+tenant.ui.basename=/cspace/${tenant.shortname}
+
+tenant.ui.profile.plugin.package.name=cspace-ui-plugin-profile-publicart
+tenant.ui.profile.plugin.library.name=cspaceUIPluginProfilePublicArt
+tenant.ui.profile.plugin.version=^1.0.0
diff --git a/cspace-ui/publicart/index.html b/cspace-ui/publicart/index.html
new file mode 100644 (file)
index 0000000..1a3b160
--- /dev/null
@@ -0,0 +1,20 @@
+<html>
+       <head>
+               <meta charset="UTF-8" />
+       </head>
+       <body>
+               <div id="cspace"></div>
+               <script src="/cspace-ui/@UI_FILENAME@"></script>
+               <script src="/cspace-ui/@UI_PROFILE_PLUGIN_FILENAME@"></script>
+               <script>
+                       cspaceUI({
+                               basename: '@BASENAME@',
+                               plugins: [
+                                       @UI_PROFILE_PLUGIN_LIBRARY_NAME@(),
+                               ],
+                               prettyUrls: true,
+                               tenantId: '@TENANT_ID@',
+                       });
+               </script>
+       </body>
+</html>