portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r513786 - in /portals/jetspeed-2/trunk/installer/etc: ant-installer/ ant-installer/lib/ ant-installer/resources/ database/
Date Fri, 02 Mar 2007 14:45:27 GMT
Author: ate
Date: Fri Mar  2 06:45:26 2007
New Revision: 513786

URL: http://svn.apache.org/viewvc?view=rev&rev=513786
Log:
- lots of fixes, especially to get the installer working properly on Windows.
- added ant-installer provided button icons and removed no longer used images.
- remove xerces from the list of libraries to be embedded in the installer as it isn't needed
anymore (reducing the installer size with almost 1Mb ;)

Added:
    portals/jetspeed-2/trunk/installer/etc/ant-installer/lib/ai-icons-eclipse.jar   (with
props)
Removed:
    portals/jetspeed-2/trunk/installer/etc/ant-installer/resources/apache-feather.gif
    portals/jetspeed-2/trunk/installer/etc/ant-installer/resources/apache-portals.gif
    portals/jetspeed-2/trunk/installer/etc/ant-installer/resources/feather.png
Modified:
    portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config-demo.xml
    portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config.xml
    portals/jetspeed-2/trunk/installer/etc/ant-installer/build.xml
    portals/jetspeed-2/trunk/installer/etc/database/build.xml

Modified: portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config-demo.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config-demo.xml?view=diff&rev=513786&r1=513785&r2=513786
==============================================================================
--- portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config-demo.xml (original)
+++ portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config-demo.xml Fri Mar
 2 06:45:26 2007
@@ -19,21 +19,23 @@
 <!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 Installer"
+<installer ui="swing,text" verbose="false" lookAndFeel="jgoodies" name="Jetspeed Enterprise
Portal 2.1 Demo Installer"
   windowIcon="/resources/feather-small.png" defaultImageResource="/resources/Jetspeed_blue_med.png"
minJavaVersion="1.4"
-  wide="650:250" antialiased="true">
+  wide="700:250" antialiased="true">
 
   <page type="input" name="intro" displayText="Welcome to the Jetspeed Enterprise Portal
2.1">
     <comment displayText="" />
-    <comment displayText="This installer program will guide you through setting up the
demo Jetspeed Portal." />
+    <comment displayText="This installer will guide you through setting up the Jetspeed
Portal Demo." />
   </page>
 
   <page type="license" name="license" displayText="License conditions" resource="/LICENSE.TXT"></page>
 
   <page type="input" name="properties" displayText="Installation location">
     <directory property="installDir" defaultValue="${java.user.home}/Jetspeed-2.1"
-      defaultValueWin="C:\Program Files\Jetspeed-2.1" displayText="Select an installation
directory" create="true"
+      defaultValueWin="C:\Apache\Jetspeed-2.1" displayText="Select an installation directory"
create="true"
       checkExists="true" />
+    <comment displayText=""/>
+    <comment displayText="Warning: on Windows, the location must not contain spaces."
bold="true"/>
   </page>
 
   <page type="input" name="requiredComponents" displayText="Components selection">
@@ -52,18 +54,14 @@
     <hidden property="checkdb" value="false" />
     <hidden property="dbvalid" value="false" />
     <hidden property="db.type" value="derby" />
-    <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="dbSetupAntTarget" value="doSetupDB" />
+    <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">
-      <option text="DB2" value="dbtwo" />
+      <option text="DB2" value="db2" />
       <option text="Derby" value="derby" />
-      <option text="Microsoft SQL Server" value="mssql" />
+      <option text="MSSQL" value="mssql" />
       <option text="MySql" value="mysql" />
       <option text="PostgreSQL" value="postgres" />
       <option text="Oracle (9i or higher)" value="oracle" />
@@ -72,29 +70,10 @@
     </select>
   </page>
 
-  <page type="input" name="manual" displayText="Manual Database setup" ifProperty="${dbName}=manual">
-    <hidden property="checkdb" value="false" />
-    <hidden property="dbvalid" value="false" />
-    <hidden property="db.type" value="" />
-    <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="dbSetupAntTarget" value="noDbSetup" />
-    <comment displayText="After the installation you must manually setup the Jetspeed
database." bold="true" />
-    <comment displayText="" />
-    <comment displayText="An ant build.xml script is provided in the installation database
directory." />
-    <comment displayText="" />
-    <comment displayText="The database configuration must be configured in the database.properties"
/>
-    <comment displayText="provided in the same directory." />
-    <comment displayText="" />
-    <comment displayText="Initialize the database by running ant from the database directory."
/>
-  </page>
-
   <page type="input" name="mysql" displayText="MySQL Database connection parameters" ifProperty="${dbName}=mysql">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
+    <hidden property="dbDisplayName" value="MySQL"/>
 
     <comment displayText="Please fill in the fields below for connecting to the MySQL
database." />
 
@@ -113,6 +92,7 @@
     ifProperty="${dbName}=postgres">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
+    <hidden property="dbDisplayName" value="PostgreSQL"/>
 
     <comment displayText="Please fill in the fields below for connecting to the PostgreSQL
database." />
 
@@ -130,6 +110,7 @@
   <page type="input" name="sapdb" displayText="SapDB Database connection parameters" ifProperty="${dbName}=sapdb">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
+    <hidden property="dbDisplayName" value="SapDB"/>
 
     <comment displayText="Please fill in the fields below for connecting to the SapDB
database." />
 
@@ -146,6 +127,7 @@
   <page type="input" name="oracle" displayText="Oracle Database connection parameters"
ifProperty="${dbName}=oracle">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
+    <hidden property="dbDisplayName" value="Oracle"/>
 
     <comment displayText="Please fill in the fields below for connecting to the Oracle
database." />
 
@@ -164,6 +146,7 @@
     ifProperty="${dbName}=mssql">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
+    <hidden property="dbDisplayName" value="MSSQL"/>
 
     <comment displayText="Please fill in the fields below for connecting to the Microsoft
SQL Server." />
 
@@ -179,9 +162,10 @@
       displayText="JDBC driver" checkExists="true" />
   </page>
 
-  <page type="input" name="dbtwo" displayText="DB2 Database connection parameters" ifProperty="${dbName}=mssql">
+  <page type="input" name="db2" displayText="DB2 Database connection parameters" ifProperty="${dbName}=mssql">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
+    <hidden property="dbDisplayName" value="DB2"/>
 
     <comment displayText="Please fill in the fields below for connecting to the DB2 database."
/>
 
@@ -204,27 +188,51 @@
     <hidden property="jdbc.url" value="${jdbcUrl}" />
     <hidden property="jdbc.driver.class" value="${jdbcDriverClass}" />
     <hidden property="jdbc.driver.jar" value="${jdbcDriverJar}" />
-    <hidden property="dbSetupAntTarget" value="doSetupDB" />
+    <hidden property="setupDBAntTarget" value="runSetupDB" />
     <comment displayText="Press Next to test the database connection ..." />
   </page>
 
   <page type="input" name="dbCheckFailed" displayText="Connection to the database failed"
     ifProperty="(${checkdb}=true) AND (${dbvalid}=false)">
     <hidden property="checkdb" value="false" />
-    <hidden property="db.type" value="" />
+    <hidden property="setupDBAntTarget" value="setupNoDB" />
+
+    <comment displayText="Please go back and specify the correct database configurtion
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)">
     <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="dbSetupAntTarget" value="noDbSetup" />
+    <hidden property="setupDBAntTarget" value="setupNoDB" />
+    <comment displayText="Jetspeed will be installed without yet an configured database
to:" bold="true"/>
+    <comment displayText="  ${installDir}"/>
+    <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."
/>
+    <comment displayText="The database configuration must be defined in a database.properties"
/>
+    <comment displayText="file provided in the same directory before running ant." />
+    <comment displayText="Initialize the database by running ant from the database directory."
/>
+  </page>
 
-    <comment displayText="Please go back and specify the correct database configurtion
parameters." bold="true" />
-    <comment displayText="" />
-    <comment displayText="Continuing will require a manual setup of the database after
the installation." bold="true" />
+  <page type="input" name="beforeInstall" displayText="Before you install ..." ifProperty="${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=""/>
+    <comment displayText="After the installation you can manually reinitialize the database"/>
+    <comment displayText="or even switch to another database using an ant script"/>
+    <comment displayText="provided within the installation database directory." />
+    <comment displayText="The database configuration is defined in the database.properties"
/>
+    <comment displayText="file provided in the same directory before running ant." />
+    <comment displayText="Reinitialize the database by running ant from the database directory."
/>
   </page>
 
   <page type="progress" name="progress" displayText="Installation progress" />
 
 </installer>
-

Modified: portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config.xml?view=diff&rev=513786&r1=513785&r2=513786
==============================================================================
--- portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config.xml (original)
+++ portals/jetspeed-2/trunk/installer/etc/ant-installer/antinstall-config.xml Fri Mar  2
06:45:26 2007
@@ -21,19 +21,21 @@
 
 <installer ui="swing,text" verbose="false" lookAndFeel="jgoodies" name="Jetspeed Enterprise
Portal 2.1 Installer"
   windowIcon="/resources/feather-small.png" defaultImageResource="/resources/Jetspeed_blue_med.png"
minJavaVersion="1.4"
-  wide="650:250" antialiased="true">
+  wide="700:250" antialiased="true">
 
   <page type="input" name="intro" displayText="Welcome to the Jetspeed Enterprise Portal
2.1">
     <comment displayText="" />
-    <comment displayText="This installer program will guide you through setting up the
core Jetspeed Portal." />
+    <comment displayText="This installer will guide you through setting up the Jetspeed
Portal." />
   </page>
 
   <page type="license" name="license" displayText="License conditions" resource="/LICENSE.TXT"></page>
 
   <page type="input" name="properties" displayText="Installation location">
     <directory property="installDir" defaultValue="${java.user.home}/Jetspeed-2.1"
-      defaultValueWin="C:\Program Files\Jetspeed-2.1" displayText="Select an installation
directory" create="true"
+      defaultValueWin="C:\Apache\Jetspeed-2.1" displayText="Select an installation directory"
create="true"
       checkExists="true" />
+    <comment displayText=""/>
+    <comment displayText="Warning: on Windows, the location must not contain spaces."
bold="true"/>
   </page>
 
   <page type="input" name="requiredComponents" displayText="Components selection">
@@ -47,19 +49,15 @@
   <page type="input" name="databaseSelection" displayText="Database selection">
     <hidden property="checkdb" value="false" />
     <hidden property="dbvalid" value="false" />
-    <hidden property="db.username" value="" />
-    <hidden property="db.password" value="" />
     <hidden property="db.type" value="derby" />
-    <hidden property="jdbc.url" value="" />
-    <hidden property="jdbc.driver.class" value="" />
-    <hidden property="jdbc.driver.jar" value="" />
-    <hidden property="dbSetupAntTarget" value="doSetupDB" />
+    <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">
       <option text="DB2" value="db2" />
       <option text="Derby" value="derby" />
-      <option text="Microsoft SQL Server" value="mssql" />
+      <option text="MSSQL" value="mssql" />
       <option text="MySql" value="mysql" />
       <option text="PostgreSQL" value="postgres" />
       <option text="Oracle (9i or higher)" value="oracle" />
@@ -68,29 +66,10 @@
     </select>
   </page>
 
-  <page type="input" name="manual" displayText="Manual Database setup" ifProperty="${dbName}=manual">
-    <hidden property="checkdb" value="false" />
-    <hidden property="dbvalid" value="false" />
-    <hidden property="db.type" value="" />
-    <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="dbSetupAntTarget" value="noDbSetup" />
-    <comment displayText="After the installation you must manually setup the Jetspeed
database." bold="true" />
-    <comment displayText="" />
-    <comment displayText="An ant build.xml script is provided in the installation database
directory." />
-    <comment displayText="" />
-    <comment displayText="The database configuration must be configured in the database.properties"
/>
-    <comment displayText="provided in the same directory." />
-    <comment displayText="" />
-    <comment displayText="Initialize the database by running ant from the database directory."
/>
-  </page>
-
   <page type="input" name="mysql" displayText="MySQL Database connection parameters" ifProperty="${dbName}=mysql">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
+    <hidden property="dbDisplayName" value="MySQL"/>
 
     <comment displayText="Please fill in the fields below for connecting to the MySQL
database." />
 
@@ -109,6 +88,7 @@
     ifProperty="${dbName}=postgres">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
+    <hidden property="dbDisplayName" value="PostgreSQL"/>
 
     <comment displayText="Please fill in the fields below for connecting to the PostgreSQL
database." />
 
@@ -126,6 +106,7 @@
   <page type="input" name="sapdb" displayText="SapDB Database connection parameters" ifProperty="${dbName}=sapdb">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
+    <hidden property="dbDisplayName" value="SapDB"/>
 
     <comment displayText="Please fill in the fields below for connecting to the SapDB
database." />
 
@@ -142,6 +123,7 @@
   <page type="input" name="oracle" displayText="Oracle Database connection parameters"
ifProperty="${dbName}=oracle">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
+    <hidden property="dbDisplayName" value="Oracle"/>
 
     <comment displayText="Please fill in the fields below for connecting to the Oracle
database." />
 
@@ -160,6 +142,7 @@
     ifProperty="${dbName}=mssql">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
+    <hidden property="dbDisplayName" value="MSSQL"/>
 
     <comment displayText="Please fill in the fields below for connecting to the Microsoft
SQL Server." />
 
@@ -178,6 +161,7 @@
   <page type="input" name="db2" displayText="DB2 Database connection parameters" ifProperty="${dbName}=mssql">
     <hidden property="checkdb" value="true" />
     <hidden property="dbvalid" value="false" />
+    <hidden property="dbDisplayName" value="DB2"/>
 
     <comment displayText="Please fill in the fields below for connecting to the DB2 database."
/>
 
@@ -200,24 +184,49 @@
     <hidden property="jdbc.url" value="${jdbcUrl}" />
     <hidden property="jdbc.driver.class" value="${jdbcDriverClass}" />
     <hidden property="jdbc.driver.jar" value="${jdbcDriverJar}" />
-    <hidden property="dbSetupAntTarget" value="doSetupDB" />
+    <hidden property="setupDBAntTarget" value="runSetupDB" />
     <comment displayText="Press Next to test the database connection ..." />
   </page>
 
   <page type="input" name="dbCheckFailed" displayText="Connection to the database failed"
     ifProperty="(${checkdb}=true) AND (${dbvalid}=false)">
     <hidden property="checkdb" value="false" />
-    <hidden property="db.type" value="" />
+    <hidden property="setupDBAntTarget" value="setupNoDB" />
+
+    <comment displayText="Please go back and specify the correct database configurtion
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)">
     <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="dbSetupAntTarget" value="noDbSetup" />
+    <hidden property="setupDBAntTarget" value="setupNoDB" />
+    <comment displayText="Jetspeed will be installed without yet an configured database
to:" bold="true"/>
+    <comment displayText="  ${installDir}"/>
+    <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."
/>
+    <comment displayText="The database configuration must be defined in a database.properties"
/>
+    <comment displayText="file provided in the same directory before running ant." />
+    <comment displayText="Initialize the database by running ant from the database directory."
/>
+  </page>
 
-    <comment displayText="Please go back and specify the correct database configurtion
parameters." bold="true" />
-    <comment displayText="" />
-    <comment displayText="Continuing will require a manual setup of the database after
the installation." bold="true" />
+  <page type="input" name="beforeInstall" displayText="Before you install ..." ifProperty="${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=""/>
+    <comment displayText="After the installation you can manually reinitialize the database"/>
+    <comment displayText="or even switch to another database using an ant script"/>
+    <comment displayText="provided within the installation database directory." />
+    <comment displayText="The database configuration is defined in the database.properties"
/>
+    <comment displayText="file provided in the same directory before running ant." />
+    <comment displayText="Reinitialize the database by running ant from the database directory."
/>
   </page>
 
   <page type="progress" name="progress" displayText="Installation progress" />

Modified: portals/jetspeed-2/trunk/installer/etc/ant-installer/build.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/ant-installer/build.xml?view=diff&rev=513786&r1=513785&r2=513786
==============================================================================
--- portals/jetspeed-2/trunk/installer/etc/ant-installer/build.xml (original)
+++ portals/jetspeed-2/trunk/installer/etc/ant-installer/build.xml Fri Mar  2 06:45:26 2007
@@ -22,12 +22,18 @@
   <property file="ant.install.properties" />
 
   <target name="install">
-    <echo>basic install starting</echo>
+    <echo>Starting the installation</echo>
 
     <condition property="jdk15Installed">
       <equals arg1="${ant.java.version}" arg2="1.5" />
     </condition>
 
+    <echo>Deleting all content from the installation target directory</echo>
+    <delete includeemptydirs="true">
+      <fileset dir="${installDir}" includes="**/*"/>
+    </delete>
+
+    <echo>Installing Jetspeed-2.1 Enterprise Portal</echo>
     <unzip src="${antinstaller.jar}" dest="${installDir}">
       <patternset>
         <include name="portal.zip" />
@@ -36,17 +42,14 @@
       </patternset>
     </unzip>
     <unzip dest="${installDir}">
-      <fileset dir="${installDir}">
-        <include name="*.zip" />
-      </fileset>
+      <fileset dir="${installDir}" includes="*.zip"/>
     </unzip>
     <delete>
-      <fileset dir="${installDir}">
-        <include name="*.zip" />
-      </fileset>
+      <fileset dir="${installDir}" includes="*.zip"/>
     </delete>
     <chmod perm="700" dir="${installDir}/bin" includes="**/*.sh" />
 
+    <echo>Setting up the database configuration</echo>
     <condition property="jdbcjar" value="${installDir}/database/lib/derby-10.1.1.0.jar">
       <equals arg1="${jdbc.driver.jar}" arg2="" />
     </condition>
@@ -63,7 +66,8 @@
         <filter token="jdbc.driver.class" value="${jdbc.driver.class}" />
       </filterset>
     </move>
-    <ant antfile="${installDir}/database/build.xml" target="${dbSetupAntTarget}" dir="${installDir}/database"
/>
+    <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="">

Added: portals/jetspeed-2/trunk/installer/etc/ant-installer/lib/ai-icons-eclipse.jar
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/ant-installer/lib/ai-icons-eclipse.jar?view=auto&rev=513786
==============================================================================
Binary file - no diff available.

Propchange: portals/jetspeed-2/trunk/installer/etc/ant-installer/lib/ai-icons-eclipse.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: portals/jetspeed-2/trunk/installer/etc/database/build.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/installer/etc/database/build.xml?view=diff&rev=513786&r1=513785&r2=513786
==============================================================================
--- portals/jetspeed-2/trunk/installer/etc/database/build.xml (original)
+++ portals/jetspeed-2/trunk/installer/etc/database/build.xml Fri Mar  2 06:45:26 2007
@@ -27,7 +27,7 @@
     <equals arg1="${db.type}" arg2="derby" />
   </condition>
   <property name="_db.password" value="${db.password}" />
-  <condition property="_jdbc.url" value="jdbc:derby:${basedir}/../webapps/jetspeed/WEB-INF/productiondb;create=true">
+  <condition property="_jdbc.url" value="jdbc:derby:${basedir}/derby/productiondb;create=true">
     <equals arg1="${db.type}" arg2="derby" />
   </condition>
   <property name="_jdbc.url" value="${jdbc.url}" />
@@ -43,27 +43,33 @@
     <echo>All exiting Jetspeed data is going to be deleted from the database.</echo>
     <echo></echo>
     <echo>Selected database configuration:</echo>
+    <echo></echo>
     <echo>database type: ${db.type}</echo>
-    <echo>username: ${db.user}</echo>
-    <echo>jdbc url: ${jdbc.url}</echo>
+    <echo>username: ${_db.username}</echo>
+    <echo>jdbc url: ${_jdbc.url}</echo>
+    <echo></echo>
+    <echo>Make sure that the appropriate jdbc driver jar for the ${db.type} database
is placed in the Tomcat shared/lib folder.</echo>
+    <echo>For using the Derby database, the correct driver jar is available in the
lib folder.</echo>
     <echo></echo>
-    <echo>Make sure that the appropriate jdbc driver jar is placed in the Tomcat shared/lib
folder.</echo>
-    <echo>For using the Derby database, the correct driver jar is provided in the lib
folder.</echo>
-    <echo>Also make sure Tomcat is stopped before continuing.</echo>
+    <echo>Also make sure Tomcat is not running before continuing.</echo>
     <echo></echo>
     <input validargs="y,n" defaultvalue="n" addproperty="do.continue">Are you sure
to continue?</input>
     <condition property="failSetup">
       <equals arg1="n" arg2="${do.continue}" />
     </condition>
 
-    <antcall target="doSetupDB" />
+    <antcall target="checkInput" />
 
   </target>
 
-  <target name="noDbSetup" />
+  <target name="setupNoDB" />
 
-  <target name="doSetupDB" unless="failSetup"
-    depends="checkDerby,generateStandardDb, generateDerby, setupSeed, seedStandardDb, seedDerbyDb,copyStandardDbContext,copyDerbyDbContext"
/>
+  <target name="checkInput" unless="failSetup">
+    <antcall target="runSetupDB"/>
+  </target>
+  
+  <target name="runSetupDB" 
+    depends="checkDerby,generateStandardDB,generateDerbyDB,seedDB,copyJetspeedContext" />
 
   <target name="checkDerby">
     <condition property="_derby">
@@ -71,56 +77,34 @@
     </condition>
   </target>
 
-  <target name="copyStandardDbContext" unless="_derby">
-    <copy file="jetspeed.xml" tofile="${basedir}/../conf/Catalina/localhost/jetspeed.xml"
overwrite="true">
-      <filterset begintoken="@" endtoken="@">
-        <filter token="USERNAME" value="${db.username}" />
-        <filter token="PASSWORD" value="${db.password}" />
-        <filter token="DRIVER" value="${jdbc.driver.class}" />
-        <filter token="URL" value="${jdbc.url}" />
-      </filterset>
-    </copy>
-  </target>
-
-  <target name="copyDerbyDbContext" if="_derby">
-    <copy file="jetspeed.xml" tofile="${basedir}/../conf/Catalina/localhost/jetspeed.xml"
overwrite="true">
-      <filterset begintoken="@" endtoken="@">
-        <filter token="USERNAME" value="" />
-        <filter token="PASSWORD" value="" />
-        <filter token="DRIVER" value="org.apache.derby.jdbc.EmbeddedDriver" />
-        <filter token="URL" value="jdbc:derby:${basedir}/derby/productiondb" />
-      </filterset>
-    </copy>
-  </target>
-
-  <target name="generateDerby" if="_derby">
+  <target name="generateDerbyDB" if="_derby">
     <delete dir="${basedir}/derby/productiondb" quiet="true" />
-    <antcall target="createDerbyDB">
+    <antcall target="sqlDerbyDB">
       <param name="databaseScript" value="${basedir}/derby/phase1-schema.sql" />
     </antcall>
-    <antcall target="createDerbyDB">
+    <antcall target="sqlDerbyDB">
       <param name="databaseScript" value="${basedir}/derby/phase2-schema.sql" />
     </antcall>
-    <antcall target="createDerbyDB">
+    <antcall target="sqlDerbyDB">
       <param name="databaseScript" value="${basedir}/derby/phase3ojb-schema.sql" />
     </antcall>
-    <antcall target="createDerbyDB">
+    <antcall target="sqlDerbyDB">
       <param name="databaseScript" value="${basedir}/derby/prefs-schema.sql" />
     </antcall>
-    <antcall target="createDerbyDB">
+    <antcall target="sqlDerbyDB">
       <param name="databaseScript" value="${basedir}/derby/registry-schema.sql" />
     </antcall>
-    <antcall target="createDerbyDB">
+    <antcall target="sqlDerbyDB">
       <param name="databaseScript" value="${basedir}/derby/security-schema.sql" />
     </antcall>
 
   </target>
 
-  <target name="generateStandardDb" unless="_derby">
+  <target name="generateStandardDB" unless="_derby">
     <echo>cleaning up possible exiting Db</echo>
 
-    <sql driver="${jdbc.driver.class}" url="${jdbc.url}" userid="${db.username}" password="${db.password}"
-      src="${basedir}/drop.sql" autocommit="true" onerror="continue" print="no" output="database.log">
+    <sql driver="${_jdbc.driver.class}" url="${_jdbc.url}" userid="${_db.username}" password="${_db.password}"
+      src="${basedir}/drop.sql" autocommit="true" onerror="continue" print="no" output="setup.log">
       <classpath>
         <fileset dir="${basedir}/../shared/lib">
           <include name="**/*.jar" />
@@ -128,7 +112,7 @@
       </classpath>
     </sql>
     <echo>starting Db generation</echo>
-    <sql driver="${jdbc.driver.class}" url="${jdbc.url}" userid="${db.username}" password="${db.password}"
+    <sql driver="${_jdbc.driver.class}" url="${_jdbc.url}" userid="${_db.username}" password="${_db.password}"
       src="${basedir}/${db.type}/phase1-schema.sql">
       <classpath>
         <fileset dir="${basedir}/../shared/lib">
@@ -136,40 +120,40 @@
         </fileset>
       </classpath>
     </sql>
-    <sql driver="${jdbc.driver.class}" url="${jdbc.url}" userid="${db.username}" password="${db.password}"
-      src="${basedir}/${db.type}/phase2-schema.sql" print="yes" output="database.log">
+    <sql driver="${_jdbc.driver.class}" url="${_jdbc.url}" userid="${_db.username}" password="${_db.password}"
+      src="${basedir}/${db.type}/phase2-schema.sql" print="yes" output="setup.log">
       <classpath>
         <fileset dir="${basedir}/../shared/lib">
           <include name="**/*.jar" />
         </fileset>
       </classpath>
     </sql>
-    <sql driver="${jdbc.driver.class}" url="${jdbc.url}" userid="${db.username}" password="${db.password}"
-      src="${basedir}/${db.type}/phase3ojb-schema.sql" print="yes" output="database.log">
+    <sql driver="${_jdbc.driver.class}" url="${_jdbc.url}" userid="${_db.username}" password="${_db.password}"
+      src="${basedir}/${db.type}/phase3ojb-schema.sql" print="yes" output="setup.log">
       <classpath>
         <fileset dir="${basedir}/../shared/lib">
           <include name="**/*.jar" />
         </fileset>
       </classpath>
     </sql>
-    <sql driver="${jdbc.driver.class}" url="${jdbc.url}" userid="${db.username}" password="${db.password}"
-      src="${basedir}/${db.type}/prefs-schema.sql" print="yes" output="database.log">
+    <sql driver="${_jdbc.driver.class}" url="${_jdbc.url}" userid="${_db.username}" password="${_db.password}"
+      src="${basedir}/${db.type}/prefs-schema.sql" print="yes" output="setup.log">
       <classpath>
         <fileset dir="${basedir}/../shared/lib">
           <include name="**/*.jar" />
         </fileset>
       </classpath>
     </sql>
-    <sql driver="${jdbc.driver.class}" url="${jdbc.url}" userid="${db.username}" password="${db.password}"
-      src="${basedir}/${db.type}/registry-schema.sql" print="yes" output="database.log">
+    <sql driver="${_jdbc.driver.class}" url="${_jdbc.url}" userid="${_db.username}" password="${_db.password}"
+      src="${basedir}/${db.type}/registry-schema.sql" print="yes" output="setup.log">
       <classpath>
         <fileset dir="${basedir}/../shared/lib">
           <include name="**/*.jar" />
         </fileset>
       </classpath>
     </sql>
-    <sql driver="${jdbc.driver.class}" url="${jdbc.url}" userid="${db.username}" password="${db.password}"
-      src="${basedir}/${db.type}/security-schema.sql" print="yes" output="database.log">
+    <sql driver="${_jdbc.driver.class}" url="${_jdbc.url}" userid="${_db.username}" password="${_db.password}"
+      src="${basedir}/${db.type}/security-schema.sql" print="yes" output="setup.log">
       <classpath>
         <fileset dir="${basedir}/../shared/lib">
           <include name="**/*.jar" />
@@ -180,7 +164,7 @@
 
   </target>
 
-  <target name="setupSeed">
+  <target name="seedDB">
 
     <delete dir="${basedir}/assembly" />
     <mkdir dir="${basedir}/assembly" />
@@ -213,9 +197,6 @@
       </fileset>
     </copy>
 
-  </target>
-
-  <target name="seedStandardDb" unless="_derby">
     <java classname="org.apache.jetspeed.serializer.JetspeedSerializerApplication" fork="yes">
       <classpath>
         <fileset dir="${basedir}/../shared/lib">
@@ -235,38 +216,20 @@
       </classpath>
 
       <arg
-        line="-I &quot;${basedir}/j2-seed.xml&quot; -a ${basedir}/../webapps/jetspeed
-b file:${basedir}/assembly/boot/ -c file:${basedir}/assembly/ -dc ${jdbc.driver.class} -ds
${jdbc.url} -du ${db.username} -dp ${db.password}" />
+        line="-I &quot;${basedir}/j2-seed.xml&quot; 
+              -a &quot;${basedir}/../webapps/jetspeed&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="seedDerbyDb" if="_derby">
-    <java classname="org.apache.jetspeed.serializer.JetspeedSerializerApplication" fork="yes">
-      <classpath>
-        <fileset dir="${basedir}/../shared/lib">
-          <include name="**/*.jar" />
-        </fileset>
-        <fileset dir="${basedir}/../webapps/jetspeed/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/jetspeed/WEB-INF/classes" />
-      </classpath>
-
-      <arg
-        line="-I &quot;${basedir}/j2-seed.xml&quot; -a ${basedir}/../webapps/jetspeed
-b file:${basedir}/assembly/boot/ -c file:${basedir}/assembly/ -dc org.apache.derby.jdbc.EmbeddedDriver
-ds jdbc:derby:${basedir}/derby/productiondb;create=true -du -dp" />
-    </java>
-
-  </target>
-
-  <target name='createDerbyDB'>
-
+  <target name='sqlDerbyDB'>
+    <echo>Excuting file: ${databaseScript}</echo>
     <java classname="org.apache.jetspeed.anttasks.ExecuteJavaSQL" fork="yes">
       <classpath>
         <fileset dir="${basedir}/../shared/lib">
@@ -285,14 +248,25 @@
         <pathelement location="${basedir}/../webapps/jetspeed/WEB-INF/classes" />
       </classpath>
       <arg
-        line="driver=org.apache.derby.jdbc.EmbeddedDriver 
-	          url=jdbc:derby:${basedir}/derby/productiondb;create=true
-	          userid= 
-	          password=
+        line="driver=&quot;${_jdbc.driver.class}&quot; 
+	          url=&quot;${_jdbc.url}&quot;
+	          userid=&quot;${_db.username}&quot; 
+	          password=&quot;{_db.password}&quot;
 	          src=&quot;${databaseScript}&quot; autocommit=true
 	          onerror=abort" />
     </java>
 
+  </target>
+
+  <target name="copyJetspeedContext">
+    <copy file="jetspeed.xml" tofile="${basedir}/../conf/Catalina/localhost/jetspeed.xml"
overwrite="true">
+      <filterset begintoken="@" endtoken="@">
+        <filter token="USERNAME" value="${_db.username}" />
+        <filter token="PASSWORD" value="${_db.password}" />
+        <filter token="DRIVER" value="${_jdbc.driver.class}" />
+        <filter token="URL" value="${_jdbc.url}" />
+      </filterset>
+    </copy>
   </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