portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r784912 - in /portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc: ant-installer/antinstall-config-demo.xml ant-installer/antinstall-config.xml ant-installer/build.xml database/build.xml
Date Mon, 15 Jun 2009 18:51:58 GMT
Author: rwatler
Date: Mon Jun 15 18:51:58 2009
New Revision: 784912

URL: http://svn.apache.org/viewvc?rev=784912&view=rev
Log:
JS2-1034: Add DB Export, Init, and Import to installers, (initial commit)

Modified:
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/antinstall-config-demo.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/antinstall-config.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/build.xml
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/database/build.xml

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/antinstall-config-demo.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/antinstall-config-demo.xml?rev=784912&r1=784911&r2=784912&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/antinstall-config-demo.xml
(original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/antinstall-config-demo.xml
Mon Jun 15 18:51:58 2009
@@ -18,21 +18,47 @@
   $Id$
 -->
 <!-- JS2-657: Installer fails with firewall
-<!DOCTYPE installer PUBLIC "-//tp23 //DTD Ant Installer Config//EN"
-    "http://antinstaller.sourceforge.net/dtd/antinstall-config-0.8.dtd">
+  
+  <!DOCTYPE installer PUBLIC "-//tp23 //DTD Ant Installer Config//EN"
+  "http://antinstaller.sourceforge.net/dtd/antinstall-config-0.8.dtd">
 -->
-<installer ui="swing,text" verbose="false" lookAndFeel="jgoodies" name="Jetspeed Enterprise
Portal 2.1 Demo Installer"
+
+<installer ui="swing,text" verbose="false" lookAndFeel="jgoodies" name="Jetspeed Enterprise
Portal 2.1.3 Installer"
   windowIcon="/resources/feather-small.png" defaultImageResource="/resources/Jetspeed_blue_med.png"
minJavaVersion="1.4"
   wide="700:250" antialiased="true">
 
   <page type="input" name="intro" displayText="Welcome to the Jetspeed Enterprise Portal
2.1.3">
     <comment displayText="" />
-    <comment displayText="This installer will guide you through setting up the Jetspeed
Portal Demo." />
+    <comment displayText="This installer will guide you through setting up the Jetspeed
Portal or" />
+    <comment displayText="performing portal database maintenance tasks." />
   </page>
 
   <page type="license" name="license" displayText="License conditions" resource="/LICENSE.TXT"></page>
 
-  <page type="input" name="properties" displayText="Installation location">
+  <page type="input" name="chooseOperation" displayText="Choose installation operation
to perform">
+    <comment displayText="Please select the operation the installer is to perform." />
+    <comment displayText="" />
+    <select property="operation" displayText="Operation" defaultValue="">
+      <option text="Install Jetspeed Portal" value="install" />
+      <option text="Export Jetspeed Portal database" value="exportdb" />
+      <option text="Initialize Jetspeed Portal database" value="initdb" />
+      <option text="Import Jetspeed Portal database" value="importdb" />
+    </select>
+  </page>
+
+  <page type="input" name="exportProperties" displayText="Export data files location"
ifProperty="${operation}=exportdb">
+    <directory property="exportDataDir" defaultValue="${java.user.home}/Jetspeed-Data-Files"
+      defaultValueWin="C:\Apache\Jetspeed-Data-Files" displayText="Select export files directory"
create="true"
+      checkExists="true" />
+  </page>
+
+  <page type="input" name="importProperties" displayText="Import data files location"
ifProperty="${operation}=importdb">
+    <directory property="importDataDir" defaultValue="${java.user.home}/Jetspeed-Data-Files"
+      defaultValueWin="C:\Apache\Jetspeed-Data-Files" displayText="Select import files directory"
+      checkExists="true" />
+  </page>
+
+  <page type="input" name="properties" displayText="Installation location" ifProperty="${operation}=install">
     <directory property="installDir" defaultValue="${java.user.home}/Jetspeed-2.1.3"
       defaultValueWin="C:\Apache\Jetspeed-2.1.3" displayText="Select an installation directory"
create="true"
       checkExists="true" />
@@ -40,7 +66,15 @@
     <comment displayText="Warning: on Windows, the location must not contain spaces."
bold="true"/>
   </page>
 
-  <page type="input" name="requiredComponents" displayText="Components selection">
+  <page type="input" name="properties" displayText="Temporary installation location" ifProperty="${operation}!=install">
+    <comment displayText="Select temporary directory requried by installer if necessary."
/>
+    <comment displayText="" />
+    <directory property="installDir" defaultValue="${java.java.io.tmpdir}/Jetspeed-2.2.1-SNAPSHOT"
+      displayText="Enter temporary directory"/>
+  </page>
+
+  <page type="input" name="requiredComponents" displayText="Components selection" ifProperty="${operation}=install">
+    <hidden property="setupDBAntTarget" value="setupNoDB" />
     <comment displayText="Jetspeed Enterprise Portal version 2.1.3" bold="true" />
     <target displayText="Tomcat 5.5.23 Webserver" target="install" defaultValue="true"
force="true" />
     <checkbox displayText="Jetspeed Portal" property="dummy" defaultValue="true" force="true"
/>
@@ -53,12 +87,11 @@
     <checkbox displayText="Store PSML in the database?" property="dbImportPsml" defaultValue="false"
/>
   </page>
 
-  <page type="input" name="databaseSelection" displayText="Database selection">
+  <page type="input" name="databaseSelection" displayText="Database selection" ifProperty="${operation}=install">
     <hidden property="checkdb" value="false" />
     <hidden property="dbvalid" value="false" />
     <hidden property="db.type" value="derby" />
     <hidden property="dbDisplayName" value="Derby"/>
-    <hidden property="setupDBAntTarget" value="runSetupDB" />
 
     <comment displayText="Please select the target database type you want to use for the
portal." />
     <select property="dbName" displayText="Database type" defaultValue="derby">
@@ -73,6 +106,23 @@
     </select>
   </page>
 
+  <page type="input" name="databaseSelection" displayText="Database selection" ifProperty="${operation}!=install">
+    <hidden property="checkdb" value="false" />
+    <hidden property="dbvalid" value="false" />
+    <hidden property="db.type" value="derby" />
+    <hidden property="dbDisplayName" value="Derby"/>
+
+    <comment displayText="Please select the target portal database type." />
+    <select property="dbName" displayText="Database type" defaultValue="derby">
+      <option text="DB2" value="db2" />
+      <option text="MSSQL" value="mssql" />
+      <option text="MySql" value="mysql" />
+      <option text="PostgreSQL" value="postgres" />
+      <option text="Oracle (9i or higher)" value="oracle" />
+      <option text="SapDB" value="sapdb" />
+    </select>
+  </page>
+
   <page type="input" name="mysql" displayText="MySQL Database connection parameters" ifProperty="${dbName}=mysql">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
@@ -183,6 +233,14 @@
       displayText="JDBC driver" checkExists="true" />
   </page>
 
+  <page type="input" name="noDBCheck" displayText="Skipping database connection check"
+    ifProperty="(${checkdb}=false) AND (${dbName}!=manual)">
+    <hidden property="dbvalid" value="true" />
+    <hidden property="setupDBAntTarget" value="runSetupDB" />
+    <comment displayText="No database connection check required for selected ${dbDisplayName}"
/>
+    <comment displayText="database type, press Next to continue..." />
+  </page>
+
   <page type="input" name="preDBCheck" displayText="Testing the database connection"
     ifProperty="(${checkdb}=true) AND (${dbvalid}=false)" postDisplayTarget="antinstaller-checkdb">
     <hidden property="db.type" value="${dbName}" />
@@ -192,7 +250,7 @@
     <hidden property="jdbc.driver.class" value="${jdbcDriverClass}" />
     <hidden property="jdbc.driver.jar" value="${jdbcDriverJar}" />
     <hidden property="setupDBAntTarget" value="runSetupDB" />
-    <comment displayText="Press Next to test the database connection ..." />
+    <comment displayText="Press Next to test the database connection..." />
   </page>
 
   <page type="input" name="dbCheckFailed" displayText="Connection to the database failed"
@@ -200,21 +258,21 @@
     <hidden property="checkdb" value="false" />
     <hidden property="setupDBAntTarget" value="setupNoDB" />
 
-    <comment displayText="Please go back and specify the correct database configurtion
parameters." bold="true" />
+    <comment displayText="Please go back and specify the correct database configuration
parameters." bold="true" />
     <comment displayText="" />
     <comment displayText="Continuing now will otherwise require manual setup of the database."/>
   </page>
 
-  <page type="input" name="beforeInstall" displayText="Before your install ..." ifProperty="(${dbName}=manual)
OR (${setupDBAntTarget}=setupNoDB)">
+  <page type="input" name="beforeInstall" displayText="Before your install..."
+    ifProperty="(${operation}=install) AND (${setupDBAntTarget}=setupNoDB)">
     <hidden property="db.username" value="" />
     <hidden property="db.password" value="" />
     <hidden property="jdbc.url" value="" />
     <hidden property="jdbc.driver.class" value="" />
     <hidden property="jdbc.driver.jar" value="" />
-    <hidden property="setupDBAntTarget" value="setupNoDB" />
-    <comment displayText="Jetspeed will be installed without yet an configured database
to:" bold="true"/>
+    <comment displayText="Jetspeed will be installed without a configured database to:"
bold="true"/>
     <comment displayText="  ${installDir}"/>
-    <comment displayText="Warning: All content in this directory will be deleted first."
bold="true"/>
+    <comment displayText="Warning: all content in this directory will be deleted first!"
bold="true"/>
     <comment displayText=""/>
     <comment displayText="After the installation you must manually setup the database."/>
     <comment displayText="An ant script is provided within the installation database directory."
/>
@@ -223,10 +281,11 @@
     <comment displayText="Initialize the database by running ant from the database directory."
/>
   </page>
 
-  <page type="input" name="beforeInstall" displayText="Before you install ..." ifProperty="${setupDBAntTarget}=runSetupDB">
+  <page type="input" name="beforeInstall" displayText="Before you install..."
+    ifProperty="(${operation}=install) AND (${setupDBAntTarget}=runSetupDB)">
     <comment displayText="Jetspeed will be installed using a ${dbDisplayName} database
to:" bold="true"/>
     <comment displayText="  ${installDir}"/>
-    <comment displayText="Warning: All content in this directory will be deleted first!"
bold="true"/>
+    <comment displayText="Warning: all content in this directory will be deleted first!"
bold="true"/>
     <comment displayText=""/>
     <comment displayText="After the installation you can manually reinitialize the database"/>
     <comment displayText="or even switch to another database using an ant script"/>
@@ -236,6 +295,44 @@
     <comment displayText="Reinitialize the database by running ant from the database directory."
/>
   </page>
 
+  <page type="input" name="beforeDBInit" displayText="Before you initialze the database..."
+    ifProperty="(${operation}=initdb) AND (${dbvalid}=true)">
+    <target displayText="Initialze Jetspeed Database" target="initdb" defaultValue="true"
force="true" />
+    <comment displayText=""/>
+    <comment displayText="Jetspeed ${dbDisplayName} database will be reset and initialized."
bold="true"/>
+    <comment displayText=""/>
+    <comment displayText="Note: Jetspeed will be temporarily installed to" />
+    <comment displayText="  ${installDir}"/>
+    <comment displayText="during this operation and removed afterward." />
+    <comment displayText=""/>
+  </page>
+
+  <page type="input" name="beforeDBExport" displayText="Before you export the database..."
+    ifProperty="(${operation}=exportdb) AND (${dbvalid}=true)">
+    <target displayText="Export Jetspeed Database" target="exportdb" defaultValue="true"
force="true" />
+    <comment displayText=""/>
+    <comment displayText="Jetspeed ${dbDisplayName} database data will be exported to:"
bold="true"/>
+    <comment displayText="  ${exportDataDir}"/>
+    <comment displayText=""/>
+    <comment displayText="Note: Jetspeed will be temporarily installed to" />
+    <comment displayText="  ${installDir}"/>
+    <comment displayText="during this operation and removed afterward." />
+    <comment displayText=""/>
+  </page>
+
+  <page type="input" name="beforeDBImport" displayText="Before you import the database..."
+    ifProperty="(${operation}=importdb) AND (${dbvalid}=true)">
+    <target displayText="Import Jetspeed Database" target="importdb" defaultValue="true"
force="true" />
+    <comment displayText=""/>
+    <comment displayText="Jetspeed ${dbDisplayName} database data will be imported from:"
bold="true"/>
+    <comment displayText="  ${importDataDir}"/>
+    <comment displayText=""/>
+    <comment displayText="Note: Jetspeed will be temporarily installed to" />
+    <comment displayText="  ${installDir}"/>
+    <comment displayText="during this operation and removed afterward." />
+    <comment displayText=""/>
+  </page>
+
   <page type="progress" name="progress" displayText="Installation progress" />
 
 </installer>

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/antinstall-config.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/antinstall-config.xml?rev=784912&r1=784911&r2=784912&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/antinstall-config.xml
(original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/antinstall-config.xml
Mon Jun 15 18:51:58 2009
@@ -29,12 +29,36 @@
 
   <page type="input" name="intro" displayText="Welcome to the Jetspeed Enterprise Portal
2.1.3">
     <comment displayText="" />
-    <comment displayText="This installer will guide you through setting up the Jetspeed
Portal." />
+    <comment displayText="This installer will guide you through setting up the Jetspeed
Portal or" />
+    <comment displayText="performing portal database maintenance tasks." />
   </page>
 
   <page type="license" name="license" displayText="License conditions" resource="/LICENSE.TXT"></page>
 
-  <page type="input" name="properties" displayText="Installation location">
+  <page type="input" name="chooseOperation" displayText="Choose installation operation
to perform">
+    <comment displayText="Please select the operation the installer is to perform." />
+    <comment displayText="" />
+    <select property="operation" displayText="Operation" defaultValue="">
+      <option text="Install Jetspeed Portal" value="install" />
+      <option text="Export Jetspeed Portal database" value="exportdb" />
+      <option text="Initialize Jetspeed Portal database" value="initdb" />
+      <option text="Import Jetspeed Portal database" value="importdb" />
+    </select>
+  </page>
+
+  <page type="input" name="exportProperties" displayText="Export data files location"
ifProperty="${operation}=exportdb">
+    <directory property="exportDataDir" defaultValue="${java.user.home}/Jetspeed-Data-Files"
+      defaultValueWin="C:\Apache\Jetspeed-Data-Files" displayText="Select export files directory"
create="true"
+      checkExists="true" />
+  </page>
+
+  <page type="input" name="importProperties" displayText="Import data files location"
ifProperty="${operation}=importdb">
+    <directory property="importDataDir" defaultValue="${java.user.home}/Jetspeed-Data-Files"
+      defaultValueWin="C:\Apache\Jetspeed-Data-Files" displayText="Select import files directory"
+      checkExists="true" />
+  </page>
+
+  <page type="input" name="properties" displayText="Installation location" ifProperty="${operation}=install">
     <directory property="installDir" defaultValue="${java.user.home}/Jetspeed-2.1.3"
       defaultValueWin="C:\Apache\Jetspeed-2.1.3" displayText="Select an installation directory"
create="true"
       checkExists="true" />
@@ -42,7 +66,15 @@
     <comment displayText="Warning: on Windows, the location must not contain spaces."
bold="true"/>
   </page>
 
-  <page type="input" name="requiredComponents" displayText="Components selection">
+  <page type="input" name="properties" displayText="Temporary installation location" ifProperty="${operation}!=install">
+    <comment displayText="Select temporary directory requried by installer if necessary."
/>
+    <comment displayText="" />
+    <directory property="installDir" defaultValue="${java.java.io.tmpdir}/Jetspeed-2.2.1-SNAPSHOT"
+      displayText="Enter temporary directory"/>
+  </page>
+
+  <page type="input" name="requiredComponents" displayText="Components selection" ifProperty="${operation}=install">
+    <hidden property="setupDBAntTarget" value="setupNoDB" />
     <comment displayText="Jetspeed Enterprise Portal version 2.1.3" bold="true" />
     <target displayText="Tomcat 5.5.23 Webserver" target="install" defaultValue="true"
force="true" />
     <checkbox displayText="Jetspeed Portal" property="dummy" defaultValue="true" force="true"
/>
@@ -51,12 +83,11 @@
     <checkbox displayText="Store PSML in the database?" property="dbImportPsml" defaultValue="false"
/>
   </page>
 
-  <page type="input" name="databaseSelection" displayText="Database selection">
+  <page type="input" name="databaseSelection" displayText="Database selection" ifProperty="${operation}=install">
     <hidden property="checkdb" value="false" />
     <hidden property="dbvalid" value="false" />
     <hidden property="db.type" value="derby" />
     <hidden property="dbDisplayName" value="Derby"/>
-    <hidden property="setupDBAntTarget" value="runSetupDB" />
 
     <comment displayText="Please select the target database type you want to use for the
portal." />
     <select property="dbName" displayText="Database type" defaultValue="derby">
@@ -71,6 +102,23 @@
     </select>
   </page>
 
+  <page type="input" name="databaseSelection" displayText="Database selection" ifProperty="${operation}!=install">
+    <hidden property="checkdb" value="false" />
+    <hidden property="dbvalid" value="false" />
+    <hidden property="db.type" value="derby" />
+    <hidden property="dbDisplayName" value="Derby"/>
+
+    <comment displayText="Please select the target portal database type." />
+    <select property="dbName" displayText="Database type" defaultValue="derby">
+      <option text="DB2" value="db2" />
+      <option text="MSSQL" value="mssql" />
+      <option text="MySql" value="mysql" />
+      <option text="PostgreSQL" value="postgres" />
+      <option text="Oracle (9i or higher)" value="oracle" />
+      <option text="SapDB" value="sapdb" />
+    </select>
+  </page>
+
   <page type="input" name="mysql" displayText="MySQL Database connection parameters" ifProperty="${dbName}=mysql">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
@@ -181,6 +229,14 @@
       displayText="JDBC driver" checkExists="true" />
   </page>
 
+  <page type="input" name="noDBCheck" displayText="Skipping database connection check"
+    ifProperty="(${checkdb}=false) AND (${dbName}!=manual)">
+    <hidden property="dbvalid" value="true" />
+    <hidden property="setupDBAntTarget" value="runSetupDB" />
+    <comment displayText="No database connection check required for selected ${dbDisplayName}"
/>
+    <comment displayText="database type, press Next to continue..." />
+  </page>
+
   <page type="input" name="preDBCheck" displayText="Testing the database connection"
     ifProperty="(${checkdb}=true) AND (${dbvalid}=false)" postDisplayTarget="antinstaller-checkdb">
     <hidden property="db.type" value="${dbName}" />
@@ -190,7 +246,7 @@
     <hidden property="jdbc.driver.class" value="${jdbcDriverClass}" />
     <hidden property="jdbc.driver.jar" value="${jdbcDriverJar}" />
     <hidden property="setupDBAntTarget" value="runSetupDB" />
-    <comment displayText="Press Next to test the database connection ..." />
+    <comment displayText="Press Next to test the database connection..." />
   </page>
 
   <page type="input" name="dbCheckFailed" displayText="Connection to the database failed"
@@ -198,21 +254,21 @@
     <hidden property="checkdb" value="false" />
     <hidden property="setupDBAntTarget" value="setupNoDB" />
 
-    <comment displayText="Please go back and specify the correct database configurtion
parameters." bold="true" />
+    <comment displayText="Please go back and specify the correct database configuration
parameters." bold="true" />
     <comment displayText="" />
     <comment displayText="Continuing now will otherwise require manual setup of the database."/>
   </page>
 
-  <page type="input" name="beforeInstall" displayText="Before your install ..." ifProperty="(${dbName}=manual)
OR (${setupDBAntTarget}=setupNoDB)">
+  <page type="input" name="beforeInstall" displayText="Before your install..."
+    ifProperty="(${operation}=install) AND (${setupDBAntTarget}=setupNoDB)">
     <hidden property="db.username" value="" />
     <hidden property="db.password" value="" />
     <hidden property="jdbc.url" value="" />
     <hidden property="jdbc.driver.class" value="" />
     <hidden property="jdbc.driver.jar" value="" />
-    <hidden property="setupDBAntTarget" value="setupNoDB" />
-    <comment displayText="Jetspeed will be installed without yet an configured database
to:" bold="true"/>
+    <comment displayText="Jetspeed will be installed without a configured database to:"
bold="true"/>
     <comment displayText="  ${installDir}"/>
-    <comment displayText="Warning: All content in this directory will be deleted first."
bold="true"/>
+    <comment displayText="Warning: all content in this directory will be deleted first!"
bold="true"/>
     <comment displayText=""/>
     <comment displayText="After the installation you must manually setup the database."/>
     <comment displayText="An ant script is provided within the installation database directory."
/>
@@ -221,10 +277,11 @@
     <comment displayText="Initialize the database by running ant from the database directory."
/>
   </page>
 
-  <page type="input" name="beforeInstall" displayText="Before you install ..." ifProperty="${setupDBAntTarget}=runSetupDB">
+  <page type="input" name="beforeInstall" displayText="Before you install..."
+    ifProperty="(${operation}=install) AND (${setupDBAntTarget}=runSetupDB)">
     <comment displayText="Jetspeed will be installed using a ${dbDisplayName} database
to:" bold="true"/>
     <comment displayText="  ${installDir}"/>
-    <comment displayText="Warning: All content in this directory will be deleted first!"
bold="true"/>
+    <comment displayText="Warning: all content in this directory will be deleted first!"
bold="true"/>
     <comment displayText=""/>
     <comment displayText="After the installation you can manually reinitialize the database"/>
     <comment displayText="or even switch to another database using an ant script"/>
@@ -234,6 +291,44 @@
     <comment displayText="Reinitialize the database by running ant from the database directory."
/>
   </page>
 
+  <page type="input" name="beforeDBInit" displayText="Before you initialze the database..."
+    ifProperty="(${operation}=initdb) AND (${dbvalid}=true)">
+    <target displayText="Initialze Jetspeed Database" target="initdb" defaultValue="true"
force="true" />
+    <comment displayText=""/>
+    <comment displayText="Jetspeed ${dbDisplayName} database will be reset and initialized."
bold="true"/>
+    <comment displayText=""/>
+    <comment displayText="Note: Jetspeed will be temporarily installed to" />
+    <comment displayText="  ${installDir}"/>
+    <comment displayText="during this operation and removed afterward." />
+    <comment displayText=""/>
+  </page>
+
+  <page type="input" name="beforeDBExport" displayText="Before you export the database..."
+    ifProperty="(${operation}=exportdb) AND (${dbvalid}=true)">
+    <target displayText="Export Jetspeed Database" target="exportdb" defaultValue="true"
force="true" />
+    <comment displayText=""/>
+    <comment displayText="Jetspeed ${dbDisplayName} database data will be exported to:"
bold="true"/>
+    <comment displayText="  ${exportDataDir}"/>
+    <comment displayText=""/>
+    <comment displayText="Note: Jetspeed will be temporarily installed to" />
+    <comment displayText="  ${installDir}"/>
+    <comment displayText="during this operation and removed afterward." />
+    <comment displayText=""/>
+  </page>
+
+  <page type="input" name="beforeDBImport" displayText="Before you import the database..."
+    ifProperty="(${operation}=importdb) AND (${dbvalid}=true)">
+    <target displayText="Import Jetspeed Database" target="importdb" defaultValue="true"
force="true" />
+    <comment displayText=""/>
+    <comment displayText="Jetspeed ${dbDisplayName} database data will be imported from:"
bold="true"/>
+    <comment displayText="  ${importDataDir}"/>
+    <comment displayText=""/>
+    <comment displayText="Note: Jetspeed will be temporarily installed to" />
+    <comment displayText="  ${installDir}"/>
+    <comment displayText="during this operation and removed afterward." />
+    <comment displayText=""/>
+  </page>
+
   <page type="progress" name="progress" displayText="Installation progress" />
 
 </installer>

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/build.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/build.xml?rev=784912&r1=784911&r2=784912&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/build.xml
(original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/ant-installer/build.xml
Mon Jun 15 18:51:58 2009
@@ -23,12 +23,13 @@
 
   <property file="ant.install.properties" />
 
-  <target name="install">
-    <echo>Starting the installation</echo>
+  <target name="setupInstallation">
 
+    <echo>Starting the installation</echo>
     <condition property="jdk15Installed">
       <equals arg1="${ant.java.version}" arg2="1.5" />
     </condition>
+    <mkdir dir="${installDir}"/>
 
     <echo>Deleting all content from the installation target directory</echo>
     <delete includeemptydirs="true">
@@ -55,8 +56,6 @@
     <condition property="jdbcjar" value="${installDir}/database/lib/derby-10.1.1.0.jar">
       <equals arg1="${jdbc.driver.jar}" arg2="" />
     </condition>
-<!--    <copy file="${installDir}/webapps/${portalName}/WEB-INF/assembly/page-manager.xml"
tofile="${installDir}/webapps/${portalName}/WEB-INF/assembly/alternate/fs-page-manager.xml"/>
-  -->
     <property name="jdbcjar" value="${jdbc.driver.jar}" />
     <copy failonerror="false" todir="${installDir}/shared/lib" file="${jdbcjar}" />
 
@@ -71,8 +70,14 @@
         <filter token="dbImportPsml" value="${dbImportPsml}" />
       </filterset>
     </move>
+
+  </target>
+
+  <target name="install" depends="setupInstallation">
+
     <echo>Setting up the Jetspeed database (if selected)</echo>
     <ant antfile="${installDir}/database/build.xml" target="${setupDBAntTarget}" dir="${installDir}/database"
/>
+
   </target>
 
   <target name="antinstaller-checkdb" depends="">
@@ -83,6 +88,41 @@
       </classpath>
     </checkConnection>
     <antinstaller-property name="dbvalid" value="true" />
+
+  </target>
+
+  <target name="initdb" depends="setupInstallation">
+
+    <echo>Reset and initialize Jetspeed database</echo>
+    <ant antfile="${installDir}/database/build.xml" target="initDB" dir="${installDir}/database"
inheritAll="true" />
+
+    <echo>Deleting temporary installation target directory</echo>
+    <delete dir="${installDir}"/>
+
+  </target>
+
+  <target name="exportdb" depends="setupInstallation">
+
+    <echo>Export all data from Jetspeed database</echo>
+    <mkdir dir="${exportDataDir}"/>
+    <delete includeemptydirs="true">
+      <fileset dir="${exportDataDir}" includes="**/*"/>
+    </delete>
+    <ant antfile="${installDir}/database/build.xml" target="exportDB" dir="${installDir}/database"
inheritAll="true" />
+
+    <echo>Deleting temporary installation target directory</echo>
+    <delete dir="${installDir}"/>
+
+  </target>
+
+  <target name="importdb" depends="setupInstallation">
+
+    <echo>Import all data into Jetspeed database</echo>
+    <ant antfile="${installDir}/database/build.xml" target="importDB" dir="${installDir}/database"
inheritAll="true" />
+
+    <echo>Deleting temporary installation target directory</echo>
+    <delete dir="${installDir}"/>
+
   </target>
 
 </project>

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/database/build.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/database/build.xml?rev=784912&r1=784911&r2=784912&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/database/build.xml
(original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/installer/etc/database/build.xml
Mon Jun 15 18:51:58 2009
@@ -39,6 +39,59 @@
   </condition>
   <property name="_jdbc.driver.class" value="${jdbc.driver.class}" />
 
+  <path id="assemblyClasspath">
+    <fileset dir="${basedir}/../shared/lib">
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${basedir}/../webapps/${portalName}/WEB-INF/lib">
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${basedir}/lib">
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${basedir}/../common/lib">
+      <include name="**/*.jar" />
+    </fileset>
+    <pathelement location="${basedir}/../shared/classes" />
+    <pathelement location="${basedir}/../webapps/${portalName}/WEB-INF/classes" />
+  </path>
+
+  <property name="import.jdbc.driver.class" value="${_jdbc.driver.class}"/>
+  <property name="import.jdbc.username" value="${_db.username}"/>
+  <property name="import.jdbc.password" value="${_db.password}"/>
+  <property name="import.jdbc.url" value="${_jdbc.url}"/>
+  
+  <property name="jetspeedWebinfDir" value="${basedir}/../webapps/${portalName}/WEB-INF"/>
+  <property name="importDir" value="${basedir}/import"/>
+  <property name="importTargetDir" value="${importDir}/target"/>
+
+  <path id="import-classpath">
+    <fileset dir="${basedir}/../shared/lib">
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${jetspeedWebinfDir}/lib">
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${basedir}/lib">
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${basedir}/../common/lib">
+      <include name="**/*.jar" />
+    </fileset>
+    <pathelement location="${basedir}/../shared/classes" />
+    <pathelement location="${jetspeedWebinfDir}/classes" />
+    <pathelement location="${importTargetDir}/classes" />
+  </path>
+  
+  <propertyset id="import.syspropertyset.id">
+    <propertyref name="org.apache.jetspeed.page.import.configuration"/>
+    <propertyref name="org.apache.jetspeed.page.import.pages"/>
+    <propertyref name="import.jdbc.driver.class"/>
+    <propertyref name="import.jdbc.username"/>
+    <propertyref name="import.jdbc.password"/>
+    <propertyref name="import.jdbc.url"/>
+  </propertyset>
+
   <target name="setupDB">
 
     <echo>Setting up the Jetspeed database for ${db.type}</echo>
@@ -66,19 +119,104 @@
   </target>
 
   <target name="setupNoDB">
-  	<antcall target="setupDBPSML"/>
+  </target>
+
+  <target name="initDB" depends="checkDerby" unless="_derby">
+
+    <echo>Initialize Jetspeed database</echo>
+
+    <antcall target="generateStandardDB" />
+
+    <echo>Initialize Jetspeed database complete!</echo>
+
+  </target>
+
+  <target name="exportDB" depends="checkDerby,setupAssemblyAndPaths,setupImportClasses"
unless="_derby" if="exportDataDir">
+
+    <echo>Export Jetspeed database to ${exportDataDir}/j2-data.xml</echo>
+
+    <mkdir dir="${exportDataDir}"/>
+    <java classname="org.apache.jetspeed.serializer.JetspeedSerializerApplication" fork="yes">
+      <classpath refid="assemblyClasspath"/>
+      <arg line="-E &quot;${exportDataDir}/j2-data.xml&quot; 
+        -a &quot;${basedir}/../webapps/${portalName}&quot;
+        -b &quot;file:${basedir}/assembly/boot/&quot;
+        -c &quot;file:${basedir}/assembly/&quot;
+        -dc &quot;${_jdbc.driver.class}&quot;
+        -ds &quot;${_jdbc.url}&quot;
+        -du &quot;${_db.username}&quot;
+        -dp &quot;${_db.password}&quot;" />
+    </java>
+
+    <echo>Export Jetspeed database pages to ${exportDataDir}/pages</echo>
+
+    <mkdir dir="${exportDataDir}/pages"/>
+    <property name="org.apache.jetspeed.page.import.configuration" value="${basedir}/import/export.properties"/>
+    <property name="org.apache.jetspeed.page.import.pages" value="${exportDataDir}/pages"/>
+    <java classname="org.apache.jetspeed.page.PageImporter" fork="yes" dir="${basedir}">
+      <classpath refid="import-classpath"/>
+      <syspropertyset refid="import.syspropertyset.id"/>
+    </java>
+
+    <condition property="_exportedPages">
+      <or>
+        <available file="${exportDataDir}/pages/folder.metadata" type="file"/>
+        <available file="${exportDataDir}/pages/page.security" type="file"/>
+        <available file="${exportDataDir}/pages/_user" type="dir"/>
+        <available file="${exportDataDir}/pages/__subsite-root" type="dir"/>
+        <available file="${exportDataDir}/pages/system" type="dir"/>
+        <available file="${exportDataDir}/pages/Administrative" type="dir"/>
+      </or>
+    </condition>
+    <antcall target="cleanupExportedPages"/>
+
+    <echo>Export Jetspeed database complete!</echo>
+
+  </target>
+
+  <target name="cleanupExportedPages" unless="_exportedPages">
+    <delete dir="${exportDataDir}/pages"/>
+  </target>
+
+  <target name="importDB" depends="checkDerby,setupAssemblyAndPaths,setupImportClasses"
unless="_derby" if="importDataDir">
+
+    <echo>Import Jetspeed database from ${importDataDir}/j2-data.xml</echo>
+
+    <java classname="org.apache.jetspeed.serializer.JetspeedSerializerApplication" fork="yes">
+      <classpath refid="assemblyClasspath"/>
+      <arg line="-E &quot;${importDataDir}/j2-data.xml&quot; 
+        -a &quot;${basedir}/../webapps/${portalName}&quot;
+        -b &quot;file:${basedir}/assembly/boot/&quot;
+        -c &quot;file:${basedir}/assembly/&quot;
+        -dc &quot;${_jdbc.driver.class}&quot;
+        -ds &quot;${_jdbc.url}&quot;
+        -du &quot;${_db.username}&quot;
+        -dp &quot;${_db.password}&quot;" />
+    </java>
+
+    <echo>Import Jetspeed database pages from ${importDataDir}/pages</echo>
+
+    <available file="${importDataDir}/pages" type="dir" property="_importPages"/>
+    <antcall target="importPages"/>
+
+    <echo>Import Jetspeed database complete!</echo>
+
+  </target>
+
+  <target name="importPages" if="_importPages">
+    <property name="org.apache.jetspeed.page.import.configuration" value="${basedir}/import/import.properties"/>
+    <property name="org.apache.jetspeed.page.import.pages" value="${importDataDir}/pages"/>
+    <java classname="org.apache.jetspeed.page.PageImporter" fork="yes" dir="${basedir}">
+      <classpath refid="import-classpath"/>
+      <syspropertyset refid="import.syspropertyset.id"/>
+    </java>
   </target>
 
   <target name="checkInput" unless="failSetup">
     <antcall target="runSetupDB"/>
   </target>
   
-  <target name='setupDBPSML'>
-    <copy file="${basedir}/../webapps/${portalName}/WEB-INF/assembly/page-manager.xml"
tofile="${basedir}/../webapps/${portalName}/WEB-INF/assembly/alternate/fs-page-manager.xml"/>
-	</target>
-	
-  <target name="runSetupDB" 
-    depends="setupDBPSML,checkDerby,generateStandardDB,generateDerbyDB,seedDB,copyJetspeedContext,do-psml"
/>
+  <target name="runSetupDB" depends="checkDerby,generateStandardDB,generateDerbyDB,seedDB,copyJetspeedContext,do-psml"
/>
 	
   <target name="checkDerby">
     <condition property="_derby">
@@ -173,11 +311,27 @@
 
   </target>
 
-  <target name="seedDB">
+  <target name="seedDB" depends="setupAssemblyAndPaths">
+
+    <echo>Seeding the database</echo>
+    <java classname="org.apache.jetspeed.serializer.JetspeedSerializerApplication" fork="yes">
+      <classpath refid="assemblyClasspath"/>
+      <arg line="-I &quot;${basedir}/j2-seed.xml&quot; 
+        -a &quot;${basedir}/../webapps/${portalName}&quot;
+        -b &quot;file:${basedir}/assembly/boot/&quot;
+        -c &quot;file:${basedir}/assembly/&quot;
+        -dc &quot;${_jdbc.driver.class}&quot;
+        -ds &quot;${_jdbc.url}&quot;
+        -du &quot;${_db.username}&quot;
+        -dp &quot;${_db.password}&quot;" />
+    </java>
+
+  </target>
+
+  <target name="setupAssemblyAndPaths">
 
     <delete dir="${basedir}/assembly" />
     <mkdir dir="${basedir}/assembly" />
-    <echo>Seeding the database</echo>
 
     <copy todir="${basedir}/assembly" overwrite="true" failonerror="true">
       <fileset dir="${basedir}/../webapps/${portalName}/WEB-INF/assembly">
@@ -190,7 +344,6 @@
       </fileset>
     </copy>
 
-
     <copy todir="${basedir}/assembly" overwrite="true" failonerror="true">
       <fileset dir="${basedir}/../webapps/${portalName}/WEB-INF/assembly/alternate/">
         <include name="request-context.xml" />
@@ -208,35 +361,6 @@
       </fileset>
     </copy>
 
-    <java classname="org.apache.jetspeed.serializer.JetspeedSerializerApplication" fork="yes">
-      <classpath>
-        <fileset dir="${basedir}/../shared/lib">
-          <include name="**/*.jar" />
-        </fileset>
-        <fileset dir="${basedir}/../webapps/${portalName}/WEB-INF/lib">
-          <include name="**/*.jar" />
-        </fileset>
-        <fileset dir="${basedir}/lib">
-          <include name="**/*.jar" />
-        </fileset>
-        <fileset dir="${basedir}/../common/lib">
-          <include name="**/*.jar" />
-        </fileset>
-        <pathelement location="${basedir}/../shared/classes" />
-        <pathelement location="${basedir}/../webapps/${portalName}/WEB-INF/classes" />
-      </classpath>
-
-      <arg
-        line="-I &quot;${basedir}/j2-seed.xml&quot; 
-              -a &quot;${basedir}/../webapps/${portalName}&quot;
-              -b &quot;file:${basedir}/assembly/boot/&quot;
-              -c &quot;file:${basedir}/assembly/&quot;
-              -dc &quot;${_jdbc.driver.class}&quot;
-              -ds &quot;${_jdbc.url}&quot;
-              -du &quot;${_db.username}&quot;
-              -dp &quot;${_db.password}&quot;" />
-    </java>
-
   </target>
 
   <target name='sqlDerbyDB'>
@@ -280,59 +404,40 @@
     </copy>
   </target>
 
-<!-- Import of PSML -->
-  <property name="import.jdbc.driver.class" value="${_jdbc.driver.class}"/>
-  <property name="import.jdbc.username" value="${_db.username}"/>
-  <property name="import.jdbc.password" value="${_db.password}"/>
-  <property name="import.jdbc.url" value="${_jdbc.url}"/>
-  
-  <property name="jetspeedWebinfDir" value="${basedir}/../webapps/${portalName}/WEB-INF"/>
-  <property name="pagesLocation" value="${jetspeedWebinfDir}/pages"/>
-  <property name="importDir" value="${basedir}/import"/>
-  <property name="importTargetDir" value="${importDir}/target"/>
-  <property name="org.apache.jetspeed.page.import.configuration" value="${basedir}/import/import.properties"/>
-  <property name="org.apache.jetspeed.page.import.pages" value="${jetspeedWebinfDir}/pages"/>
-  
-  <path id="import-classpath">
-    <fileset dir="${basedir}/../shared/lib">
-      <include name="**/*.jar" />
-    </fileset>
-    <fileset dir="${jetspeedWebinfDir}/lib">
-      <include name="**/*.jar" />
-    </fileset>
-    <fileset dir="${basedir}/lib">
-      <include name="**/*.jar" />
-    </fileset>
-    <fileset dir="${basedir}/../common/lib">
-      <include name="**/*.jar" />
-    </fileset>
-    <pathelement location="${basedir}/../shared/classes" />
-    <pathelement location="${jetspeedWebinfDir}/classes" />
-    <pathelement location="${importTargetDir}/classes" />
-  </path>
-  
- 
-  <!-- Populate Database -->
-  
+  <!-- Import of PSML -->
+
   <target name="test-import-psml">
     <condition property="_doImportPsml">
       <equals arg1="${dbImportPsml}" arg2="true"/>
     </condition>
   </target>
   
-  <target name="do-psml" depends="test-import-psml,db-psml,fs-psml"/>
+  <target name="do-psml" depends="test-import-psml,db-psml,configure-dbpsml"/>
   
-  <target name="fs-psml" unless="_doImportPsml">
-    <copy file="${jetspeedWebinfDir}/assembly/alternate/fs-page-manager.xml" tofile="${jetspeedWebinfDir}/assembly/page-manager.xml"
overwrite="true"/>
-    <delete quiet="true" file="${jetspeedWebinfDir}/assembly/interceptors.xml"/>
-  </target>
-  
-  <target name="db-psml" if="_doImportPsml">
+  <target name="db-psml" depends="setupImportClasses" if="_doImportPsml">
     
+    <!-- execute import utility within the page manager component -->
+    <echo>Importing database pages</echo>
+    <property name="org.apache.jetspeed.page.import.configuration" value="${basedir}/import/import.properties"/>
+    <property name="org.apache.jetspeed.page.import.pages" value="${jetspeedWebinfDir}/pages"/>
+    <java classname="org.apache.jetspeed.page.PageImporter" fork="yes" dir="${basedir}">
+      <classpath refid="import-classpath"/>
+      <syspropertyset refid="import.syspropertyset.id"/>
+    </java>
+
+  </target>
+
+  <target name="configure-dbpsml" if="_doImportPsml">
+    <echo>Configure DBPSML</echo>
+    <copy file="${jetspeedWebinfDir}/assembly/alternate/db-page-manager.xml" tofile="${jetspeedWebinfDir}/assembly/page-manager.xml"
overwrite="true"/>
+    <copy file="${jetspeedWebinfDir}/assembly/alternate/interceptors.xml" todir="${jetspeedWebinfDir}/assembly"
overwrite="true"/>
+  </target>
+
+  <target name="setupImportClasses">
+
     <!-- prepare a classes directory with resources and libraries to execute import -->
     <delete dir="${importTargetDir}/classes"/>
     <mkdir dir="${importTargetDir}/classes"/>
-    <echo>Import dir: ${importDir}</echo>
     <copy todir="${importTargetDir}/classes" flatten="on">
       <fileset dir="${importDir}" >
         <include name="db-ojb/*"/>
@@ -347,32 +452,6 @@
       </fileset>
     </copy>    
   
-    <!-- create sysproperty set to configure import utility -->
-    <propertyset id="import.syspropertyset.id">
-      <propertyref name="org.apache.jetspeed.page.import.configuration"/>
-      <propertyref name="org.apache.jetspeed.page.import.pages"/>
-      <propertyref name="import.jdbc.driver.class"/>
-      <propertyref name="import.jdbc.username"/>
-      <propertyref name="import.jdbc.password"/>
-      <propertyref name="import.jdbc.url"/>
-    </propertyset>
-    
-    <!-- execute import utility within the page manager component -->
-    <antcall target="execute-import" inheritall="on" inheritrefs="on"/>
-    
-    <copy file="${jetspeedWebinfDir}/assembly/alternate/db-page-manager.xml" tofile="${jetspeedWebinfDir}/assembly/page-manager.xml"
overwrite="true"/>
-    <copy file="${jetspeedWebinfDir}/assembly/alternate/interceptors.xml" todir="${jetspeedWebinfDir}/assembly"
overwrite="true"/>
-  </target>
-  
-  <target name="execute-import">
-    
-    <!-- execute import utility with drivers path in classpath -->
-    <java classpathref="import-classpath" classname="org.apache.jetspeed.page.PageImporter"
fork="yes" dir="${basedir}">
-      <syspropertyset>
-        <propertyset refid="import.syspropertyset.id"/>
-      </syspropertyset>
-    </java>
-    
   </target>
 
 </project>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message