portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r492423 [3/5] - in /portals/jetspeed-2/trunk: components/ components/portal/ components/portal/src/test/org/apache/jetspeed/aggregator/ components/registry/ components/security/src/java/org/apache/jetspeed/security/impl/ components/serializ...
Date Thu, 04 Jan 2007 06:31:49 GMT
Modified: portals/jetspeed-2/trunk/etc/build.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/etc/build.xml?view=diff&rev=492423&r1=492422&r2=492423
==============================================================================
--- portals/jetspeed-2/trunk/etc/build.xml (original)
+++ portals/jetspeed-2/trunk/etc/build.xml Wed Jan  3 22:31:48 2007
@@ -31,6 +31,7 @@
     <property name="org.apache.derby.version" value=""/>
     <property name="ant.version" value=""/>
     <property name="hsqldb.version" value=""/>
+    <property name="portlet-api.version" value=""/>
 
     <property name="org.apache.jetspeed.source.sql" value="${basedir}/sql"/>
     <property name="org.apache.jetspeed.database.source.sql" value="${org.apache.jetspeed.source.sql}/${org.apache.jetspeed.database.default.name}"/>
@@ -53,12 +54,13 @@
 
     <target name="help">
         <echo message="Buildfile for the etc maven POM."/>
-        <echo message="Usage: ant [ clean-schema | schema | populate-db | populate-db-userinfo ]"/>
+        <echo message="Usage: ant [ clean-schema | schema | populate-db ]"/>
         <echo message="Where:"/>
         <echo message="    clean-schema - clean schemas for all databases."/>
         <echo message="    schema - build schema for database if not already built."/>
-        <echo message="    populate-db - build and minimally populate database instance."/>
-        <echo message="    populate-db-userinfo - build and populate database instance with default users."/>
+        <echo message="    create-db - drops and recreates databases, no population."/>        
+        <echo message="    create-populate-db - drop, recreate database and populate database instance."/>        
+        <echo message="    populate-db - populate database instance."/>
         <echo message="Configuration:"/>
         <echo message="    org.apache.jetspeed.database.enable=${org.apache.jetspeed.database.enable}"/>
         <echo message="    org.apache.jetspeed.database.skip=${org.apache.jetspeed.database.skip}"/>
@@ -271,9 +273,10 @@
 
     <!-- Populate Database -->
 
-    <target name="populate-db" depends="test-populate-skip" unless="org.apache.jetspeed.skip">
-
-        <!-- execute drop scripts -->
+    <target name="create-db" depends="test-populate-skip" unless="org.apache.jetspeed.skip">
+    	<echo message ="START-CREATE-DB" />        
+        
+      <!-- execute drop scripts -->
         <antcall target="sql-execute" inheritall="on" inheritrefs="on">
             <param name="database.arg.scripts.dir" value="${org.apache.jetspeed.database.target.sql}"/>
             <param name="database.arg.scripts" value="drop.sql"/>
@@ -286,25 +289,22 @@
             <param name="database.arg.scripts" value="*.sql"/>
             <param name="database.arg.onerror" value="abort"/>
         </antcall>
+    	<echo message ="END CREATE-DB" />        
+    </target>
 
-        <!-- execute default population scripts -->
-        <antcall target="sql-execute" inheritall="on" inheritrefs="on">
-            <param name="database.arg.scripts.dir" value="${org.apache.jetspeed.database.target.sql}"/>
-            <param name="database.arg.scripts" value="populate-db-default.sql"/>
-            <param name="database.arg.onerror" value="abort"/>
+    <target name="create-populate-db">
+        <antcall target="create-db" inheritall="on" inheritrefs="on"/>
+        <antcall target="populate-db" inheritall="on" inheritrefs="on"/>
+    </target>        
+    
+    <target name="populate-db" depends="test-populate-skip" unless="org.apache.jetspeed.skip">
+       <echo message ="START-POPULATE-DB" />                       
+       <antcall target="populate-seed-data" inheritall="on" inheritrefs="on">
         </antcall>
-
+    	<echo message ="END POPULATE-DB" />
     </target>
 
     <target name="populate-db-userinfo" depends="populate-db" unless="org.apache.jetspeed.skip">
-
-        <!-- execute default userinfo population scripts -->
-        <antcall target="sql-execute" inheritall="on" inheritrefs="on">
-            <param name="database.arg.scripts.dir" value="${org.apache.jetspeed.database.target.sql}"/>
-            <param name="database.arg.scripts" value="populate-userinfo-for-default-psml.sql"/>
-            <param name="database.arg.onerror" value="abort"/>
-        </antcall>
-
     </target>
 
     <!-- SQL Execution -->
@@ -437,4 +437,107 @@
         </condition>
     </target>
 
+    <target name="populate-seed-data">
+    	<echo message = "called seed data with directory ${basedir} " />
+        <!-- prepare a classes directory with resources and libraries to execute import -->
+        <delete dir="${basedir}/target/seed"/>
+        <mkdir dir="${basedir}/target/seed"/>
+        <mkdir dir="${basedir}/target/seed/data"/>
+
+        <!-- copy seed -->
+        <copy todir="${basedir}/target/seed/data" overwrite="on" verbose="on" failonerror="off">
+            <fileset dir="${org.apache.jetspeed.source.sql}">
+                <include name="*seed.xml"/>
+            </fileset>
+        </copy>
+    	
+    	<mkdir dir="${basedir}/target/seed/classes"/>
+        <copy todir="${basedir}/target/seed/classes" flatten="on">
+            <fileset dir="${basedir}" >
+                <include name="log4j/log4j.properties"/>
+                <include name="db-ojb/*"/>
+            </fileset>
+        </copy>
+        <!-- prepare spring assemblies (TODO: why not use a Spring classpath loader?) -->
+        <property name="temp.assembly.dir" value="${basedir}/target/seed/assembly/"/>      
+        <mkdir dir="${temp.assembly.dir}"/>
+ 	    <echo message="Running Jetspeed Seed Importer with -b ${temp.assembly.dir}/boot/ -c ${temp.assembly.dir}/ "/>
+        <copy todir="${temp.assembly.dir}" overwrite="true" failonerror="true">
+          <fileset dir="${basedir}/../src/webapp/WEB-INF/assembly">
+            <include name="security*.xml"/>
+            <include name="capabilities.xml"/>           
+            <include name="prefs.xml"/>           
+            <include name="profiler.xml"/>           
+            <include name="transaction.xml"/>           
+          </fileset>
+         </copy>
+         <mkdir dir="${temp.assembly.dir}/boot/"/>             
+         <copy todir="${temp.assembly.dir}/boot/" overwrite="true" failonerror="true">
+         	<fileset dir="${basedir}/../src/webapp/WEB-INF/assembly/boot">
+            <include name="*.xml"/>
+          </fileset>
+         </copy>
+        
+
+        <!-- construct serializer component classpath -->
+        <dependencies filesetId="serializer-id" useScope="test">
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-api"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-commons"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-components"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-cm"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-rdbms"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+                <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                            artifactId="jetspeed-capability"
+                            version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-security"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-serializer"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-profiler"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="portlet-api"
+                 		artifactId="portlet-api"
+                 		version="${portlet-api.version}"/>
+
+            <dependency groupId="tyrex"
+                        artifactId="tyrex"
+                        version="1.0.1"/>
+        </dependencies>
+
+        <!-- create sysproperty set to configure import utility -->
+        <propertyset id="import.syspropertyset.id">
+            <propertyref name="org.apache.jetspeed.database.driver"/>
+            <propertyref name="org.apache.jetspeed.database.url"/>
+            <propertyref name="org.apache.jetspeed.database.user"/>
+            <propertyref name="org.apache.jetspeed.database.password"/>
+        </propertyset>
+    	<echo message="calling serializer with data in ${basedir}/target/seed/data , assembly and b oot:${temp.assembly.dir}/ database:-dc ${org.apache.jetspeed.database.driver} -ds ${org.apache.jetspeed.database.url} -du ${org.apache.jetspeed.database.user} -dp ${org.apache.jetspeed.database.password}" />              
+
+        <!-- execute import utility within the page manager component -->
+        <java classname="org.apache.jetspeed.serializer.JetspeedSerializerApplication"  fork="on" append="on" dir="${basedir}">
+            <classpath>
+<!--                <fileset refid="maven.dependency.classpath"/> 
+-->
+                <fileset refid="serializer-id"/> 
+                <pathelement path="${org.apache.jetspeed.database.jdbc.drivers.path}"/>
+                <pathelement path="${basedir}/target/seed/classes"/>
+            </classpath>
+          <arg line="-l DEBUG -I ${basedir}/target/seed/data/ -b ${temp.assembly.dir}/boot/ -c ${temp.assembly.dir}/ -dc ${org.apache.jetspeed.database.driver} -ds ${org.apache.jetspeed.database.url} -du ${org.apache.jetspeed.database.user} -dp ${org.apache.jetspeed.database.password}"/>                           
+        </java>
+     
+   </target>
+    
 </project>

Added: portals/jetspeed-2/trunk/etc/pom-with-DDLUTILS.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/etc/pom-with-DDLUTILS.xml?view=auto&rev=492423
==============================================================================
--- portals/jetspeed-2/trunk/etc/pom-with-DDLUTILS.xml (added)
+++ portals/jetspeed-2/trunk/etc/pom-with-DDLUTILS.xml Wed Jan  3 22:31:48 2007
@@ -0,0 +1,759 @@
+<!--
+THIS IS A COPY OF DDL UTILS PATCH APPLIED, and the actual PATCH included below
+(unfortunately the patch is all or nothing)    
+This code is not ready for production usage and requires more thorough testing
+I would like to keep the patch around for when I have more time to investigate the issues
+PLEASE CONTACT taylor@apache.org for more information
+-->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright 2006 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+  $Id:$
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <prerequisites>
+        <maven>2.0.4</maven>
+    </prerequisites>
+
+    <!-- POM Identification -->
+
+    <artifactId>etc</artifactId>
+    <parent>
+        <groupId>org.apache.portals.jetspeed-2</groupId>
+        <artifactId>jetspeed-2</artifactId>
+        <version>2.1-dev</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <packaging>pom</packaging>
+    <name>Jetspeed-2 Portal Database</name>
+    <description>
+        Project used to create DDL and DML database scripts and
+        execute them to popuate test and production instances.
+    </description>
+
+    <!-- Profiles -->
+
+    <profiles>
+
+        <!-- derby database profile -->
+        <profile>
+            <id>jetspeed-db-embedded-derby</id>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.derby</groupId>
+                    <artifactId>derby</artifactId>
+                </dependency>
+            </dependencies>
+        </profile>
+
+        <!-- hsql database profile -->
+        <profile>
+            <id>jetspeed-db-embedded-hsql</id>
+            <dependencies>
+                <dependency>
+                    <groupId>hsqldb</groupId>
+                    <artifactId>hsqldb</artifactId>
+                </dependency>
+            </dependencies>
+        </profile>
+
+    </profiles>
+
+    <!-- Build Configuration -->
+
+    <build>
+
+        <!-- Plugin Executions -->
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+
+                    <!-- generate database schema -->
+                    <execution>
+                        <id>etc-schema</id>
+                        <phase>compile</phase>
+<!--                        <configuration>
+                            <tasks>
+                                <ant target="clean-schema" antfile="build.xml" dir="${basedir}" inheritall="off"/>
+                                <ant target="schema" antfile="build.xml" dir="${basedir}" inheritall="off">
+                                    <property name="org.apache.jetspeed.database.default.name"
+                                              value="${org.apache.jetspeed.test.database.default.name}"/>
+                                </ant>
+                                <ant target="schema" antfile="build.xml" dir="${basedir}" inheritall="off">
+                                    <property name="org.apache.jetspeed.database.default.name"
+                                              value="${org.apache.jetspeed.production.database.default.name}"/>
+                                </ant>
+                            </tasks>
+                        </configuration>
+ -->
+ 
+                        <configuration>
+                            <tasks>
+                                <ant target="generate-schema" antfile="build.xml" dir="${basedir}" inheritRefs="on">
+                                    <property name="org.apache.jetspeed.database.skip"
+                                              value="${org.apache.jetspeed.env.skip.test}"/>
+                                    <property name="org.apache.jetspeed.database.default.name"
+                                              value="${org.apache.jetspeed.test.database.default.name}"/>
+                                    <property name="org.apache.jetspeed.database.url"
+                                              value="${org.apache.jetspeed.test.database.url}"/>
+                                    <property name="org.apache.jetspeed.database.jdbc.drivers.path"
+                                              value="${org.apache.jetspeed.test.jdbc.drivers.path}"/>
+                                    <property name="org.apache.jetspeed.database.driver"
+                                              value="${org.apache.jetspeed.test.database.driver}"/>
+                                    <property name="org.apache.jetspeed.database.user"
+                                              value="${org.apache.jetspeed.test.database.user}"/>
+                                    <property name="org.apache.jetspeed.database.password"
+                                              value="${org.apache.jetspeed.test.database.password}"/>
+                                    <property name="org.apache.derby.version"
+                                              value="${org.apache.derby.version}"/>
+                                    <property name="ant.version"
+                                              value="${ant.version}"/>
+                                    <property name="hsqldb.version"
+                                              value="${hsqldb.version}"/>
+                                    <property name="project.root"
+                                              value="${org.apache.jetspeed.project.home}"/>
+                                   <property name="org.apache.jetspeed.deploy.groupid"
+                                              value="${pom.groupId}"/>
+                                    <property name="org.apache.jetspeed.deploy.artifactid"
+                                              value="${pom.artifactId}"/>
+                                    <property name="org.apache.jetspeed.deploy.version"
+                                              value="${pom.version}"/>
+                                </ant>
+                                <ant target="generate-schema" antfile="build.xml" dir="${basedir}" inheritRefs="on">
+                                    <property name="org.apache.jetspeed.database.skip"
+                                              value="${org.apache.jetspeed.env.skip.production}"/>
+                                    <property name="org.apache.jetspeed.database.default.name"
+                                              value="${org.apache.jetspeed.production.database.default.name}"/>
+                                    <property name="org.apache.jetspeed.database.url"
+                                              value="${org.apache.jetspeed.production.database.url}"/>
+                                    <property name="org.apache.jetspeed.database.jdbc.drivers.path"
+                                              value="${org.apache.jetspeed.production.jdbc.drivers.path}"/>
+                                    <property name="org.apache.jetspeed.database.driver"
+                                              value="${org.apache.jetspeed.production.database.driver}"/>
+                                    <property name="org.apache.jetspeed.database.user"
+                                              value="${org.apache.jetspeed.production.database.user}"/>
+                                    <property name="org.apache.jetspeed.database.password"
+                                              value="${org.apache.jetspeed.production.database.password}"/>
+                                    <property name="org.apache.derby.version"
+                                              value="${org.apache.derby.version}"/>
+                                    <property name="ant.version"
+                                              value="${ant.version}"/>
+                                    <property name="hsqldb.version"
+                                              value="${hsqldb.version}"/>
+                                    <property name="project.root"
+                                              value="${org.apache.jetspeed.project.home}"/>
+                                   <property name="org.apache.jetspeed.deploy.groupid"
+                                              value="${pom.groupId}"/>
+                                    <property name="org.apache.jetspeed.deploy.artifactid"
+                                              value="${pom.artifactId}"/>
+                                    <property name="org.apache.jetspeed.deploy.version"
+                                              value="${pom.version}"/>
+                                </ant>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+
+                    <!-- populate test database instance -->
+                    <execution>
+                        <id>etc-populate-test</id>
+                        <phase>generate-test-resources</phase>
+                        <configuration>
+                            <tasks>
+                                <ant target="populate-db" antfile="build.xml" dir="${basedir}" inheritRefs="on">
+                                    <property name="org.apache.jetspeed.database.skip"
+                                              value="${org.apache.jetspeed.env.skip.test}"/>
+                                    <property name="org.apache.jetspeed.database.default.name"
+                                              value="${org.apache.jetspeed.test.database.default.name}"/>
+                                    <property name="org.apache.jetspeed.database.url"
+                                              value="${org.apache.jetspeed.test.database.url}"/>
+                                    <property name="org.apache.jetspeed.database.jdbc.drivers.path"
+                                              value="${org.apache.jetspeed.test.jdbc.drivers.path}"/>
+                                    <property name="org.apache.jetspeed.database.driver"
+                                              value="${org.apache.jetspeed.test.database.driver}"/>
+                                    <property name="org.apache.jetspeed.database.user"
+                                              value="${org.apache.jetspeed.test.database.user}"/>
+                                    <property name="org.apache.jetspeed.database.password"
+                                              value="${org.apache.jetspeed.test.database.password}"/>
+                                    <property name="org.apache.derby.version"
+                                              value="${org.apache.derby.version}"/>
+                                    <property name="ant.version"
+                                              value="${ant.version}"/>
+                                    <property name="hsqldb.version"
+                                              value="${hsqldb.version}"/>
+                                    <property name="project.root"
+                                              value="${org.apache.jetspeed.project.home}"/>
+                                   <property name="org.apache.jetspeed.deploy.groupid"
+                                              value="${pom.groupId}"/>
+                                    <property name="org.apache.jetspeed.deploy.artifactid"
+                                              value="${pom.artifactId}"/>
+                                    <property name="org.apache.jetspeed.deploy.version"
+                                              value="${pom.version}"/>
+                                    <property name="portlet-api.version"
+                                              value="${portlet-api.version}"/>
+                                              
+                                </ant>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+
+                    <!-- populate production database instance -->
+                    <execution>
+                        <id>etc-populate-production</id>
+                        <phase>install</phase>
+                        <configuration>
+                            <tasks>
+                                <ant target="populate-db" antfile="build.xml" dir="${basedir}" inheritRefs="on">
+                                    <property name="org.apache.jetspeed.database.enable"
+                                              value="${org.apache.jetspeed.env.deploy.db}"/>
+                                    <property name="org.apache.jetspeed.database.skip"
+                                              value="${org.apache.jetspeed.env.skip.production}"/>
+                                    <property name="org.apache.jetspeed.database.default.name"
+                                              value="${org.apache.jetspeed.production.database.default.name}"/>
+                                    <property name="org.apache.jetspeed.database.url"
+                                              value="${org.apache.jetspeed.production.database.url}"/>
+                                    <property name="org.apache.jetspeed.database.jdbc.drivers.path"
+                                              value="${org.apache.jetspeed.production.jdbc.drivers.path}"/>
+                                    <property name="org.apache.jetspeed.database.driver"
+                                              value="${org.apache.jetspeed.production.database.driver}"/>
+                                    <property name="org.apache.jetspeed.database.user"
+                                              value="${org.apache.jetspeed.production.database.user}"/>
+                                    <property name="org.apache.jetspeed.database.password"
+                                              value="${org.apache.jetspeed.production.database.password}"/>
+                                    <property name="org.apache.derby.version"
+                                              value="${org.apache.derby.version}"/>
+                                    <property name="ant.version"
+                                              value="${ant.version}"/>
+                                    <property name="hsqldb.version"
+                                              value="${hsqldb.version}"/>
+                                    <property name="project.root"
+                                              value="${org.apache.jetspeed.project.home}"/>
+                                   <property name="org.apache.jetspeed.deploy.groupid"
+                                              value="${pom.groupId}"/>
+                                    <property name="org.apache.jetspeed.deploy.artifactid"
+                                              value="${pom.artifactId}"/>
+                                    <property name="org.apache.jetspeed.deploy.version"
+                                              value="${pom.version}"/>
+                                    <property name="portlet-api.version"
+                                              value="${portlet-api.version}"/>
+                                 </ant>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <!-- Project Information -->
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/portals/jetspeed-2/trunk/etc</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/portals/jetspeed-2/trunk/etc</developerConnection>
+        <url>http://svn.apache.org/viewcvs.cgi/portals/jetspeed-2/trunk/components/etc/</url>
+    </scm>
+
+</project>
+
+<!-- patch -->
+Index: etc/pom.xml
+===================================================================
+--- etc/pom.xml	(revision 485018)
++++ etc/pom.xml	(working copy)
+@@ -1,190 +1,277 @@
+-<?xml version="1.0" encoding="UTF-8"?>
+-<!--
+-Copyright 2006 The Apache Software Foundation
+-
+-Licensed under the Apache License, Version 2.0 (the "License");
+-you may not use this file except in compliance with the License.
+-You may obtain a copy of the License at
+-
+-    http://www.apache.org/licenses/LICENSE-2.0
+-
+-Unless required by applicable law or agreed to in writing, software
+-distributed under the License is distributed on an "AS IS" BASIS,
+-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-See the License for the specific language governing permissions and
+-limitations under the License.
+-
+-  $Id:$
+--->
+-<project xmlns="http://maven.apache.org/POM/4.0.0"
+-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+-
+-    <modelVersion>4.0.0</modelVersion>
+-    <prerequisites>
+-        <maven>2.0.4</maven>
+-    </prerequisites>
+-
+-    <!-- POM Identification -->
+-
+-    <artifactId>etc</artifactId>
+-    <parent>
+-        <groupId>org.apache.portals.jetspeed-2</groupId>
+-        <artifactId>jetspeed-2</artifactId>
+-        <version>2.1-dev</version>
+-        <relativePath>../pom.xml</relativePath>
+-    </parent>
+-    <packaging>pom</packaging>
+-    <name>Jetspeed-2 Portal Database</name>
+-    <description>
+-        Project used to create DDL and DML database scripts and
+-        execute them to popuate test and production instances.
+-    </description>
+-
+-    <!-- Profiles -->
+-
+-    <profiles>
+-
+-        <!-- derby database profile -->
+-        <profile>
+-            <id>jetspeed-db-embedded-derby</id>
+-            <dependencies>
+-                <dependency>
+-                    <groupId>org.apache.derby</groupId>
+-                    <artifactId>derby</artifactId>
+-                </dependency>
+-            </dependencies>
+-        </profile>
+-
+-        <!-- hsql database profile -->
+-        <profile>
+-            <id>jetspeed-db-embedded-hsql</id>
+-            <dependencies>
+-                <dependency>
+-                    <groupId>hsqldb</groupId>
+-                    <artifactId>hsqldb</artifactId>
+-                </dependency>
+-            </dependencies>
+-        </profile>
+-
+-    </profiles>
+-
+-    <!-- Build Configuration -->
+-
+-    <build>
+-
+-        <!-- Plugin Executions -->
+-        <plugins>
+-            <plugin>
+-                <groupId>org.apache.maven.plugins</groupId>
+-                <artifactId>maven-antrun-plugin</artifactId>
+-                <executions>
+-
+-                    <!-- generate database schema -->
+-                    <execution>
+-                        <id>etc-schema</id>
+-                        <phase>compile</phase>
+-                        <configuration>
+-                            <tasks>
+-                                <ant target="clean-schema" antfile="build.xml" dir="${basedir}" inheritall="off"/>
+-                                <ant target="schema" antfile="build.xml" dir="${basedir}" inheritall="off">
+-                                    <property name="org.apache.jetspeed.database.default.name"
+-                                              value="${org.apache.jetspeed.test.database.default.name}"/>
+-                                </ant>
+-                                <ant target="schema" antfile="build.xml" dir="${basedir}" inheritall="off">
+-                                    <property name="org.apache.jetspeed.database.default.name"
+-                                              value="${org.apache.jetspeed.production.database.default.name}"/>
+-                                </ant>
+-                            </tasks>
+-                        </configuration>
+-                        <goals>
+-                            <goal>run</goal>
+-                        </goals>
+-                    </execution>
+-
+-                    <!-- populate test database instance -->
+-                    <execution>
+-                        <id>etc-populate-test</id>
+-                        <phase>generate-test-resources</phase>
+-                        <configuration>
+-                            <tasks>
+-                                <ant target="populate-db" antfile="build.xml" dir="${basedir}" inheritRefs="on">
+-                                    <property name="org.apache.jetspeed.database.skip"
+-                                              value="${org.apache.jetspeed.env.skip.test}"/>
+-                                    <property name="org.apache.jetspeed.database.default.name"
+-                                              value="${org.apache.jetspeed.test.database.default.name}"/>
+-                                    <property name="org.apache.jetspeed.database.url"
+-                                              value="${org.apache.jetspeed.test.database.url}"/>
+-                                    <property name="org.apache.jetspeed.database.jdbc.drivers.path"
+-                                              value="${org.apache.jetspeed.test.jdbc.drivers.path}"/>
+-                                    <property name="org.apache.jetspeed.database.driver"
+-                                              value="${org.apache.jetspeed.test.database.driver}"/>
+-                                    <property name="org.apache.jetspeed.database.user"
+-                                              value="${org.apache.jetspeed.test.database.user}"/>
+-                                    <property name="org.apache.jetspeed.database.password"
+-                                              value="${org.apache.jetspeed.test.database.password}"/>
+-                                    <property name="org.apache.derby.version"
+-                                              value="${org.apache.derby.version}"/>
+-                                    <property name="ant.version"
+-                                              value="${ant.version}"/>
+-                                    <property name="hsqldb.version"
+-                                              value="${hsqldb.version}"/>
+-                                </ant>
+-                            </tasks>
+-                        </configuration>
+-                        <goals>
+-                            <goal>run</goal>
+-                        </goals>
+-                    </execution>
+-
+-                    <!-- populate production database instance -->
+-                    <execution>
+-                        <id>etc-populate-production</id>
+-                        <phase>install</phase>
+-                        <configuration>
+-                            <tasks>
+-                                <ant target="populate-db-userinfo" antfile="build.xml" dir="${basedir}" inheritRefs="on">
+-                                    <property name="org.apache.jetspeed.database.enable"
+-                                              value="${org.apache.jetspeed.env.deploy.db}"/>
+-                                    <property name="org.apache.jetspeed.database.skip"
+-                                              value="${org.apache.jetspeed.env.skip.production}"/>
+-                                    <property name="org.apache.jetspeed.database.default.name"
+-                                              value="${org.apache.jetspeed.production.database.default.name}"/>
+-                                    <property name="org.apache.jetspeed.database.url"
+-                                              value="${org.apache.jetspeed.production.database.url}"/>
+-                                    <property name="org.apache.jetspeed.database.jdbc.drivers.path"
+-                                              value="${org.apache.jetspeed.production.jdbc.drivers.path}"/>
+-                                    <property name="org.apache.jetspeed.database.driver"
+-                                              value="${org.apache.jetspeed.production.database.driver}"/>
+-                                    <property name="org.apache.jetspeed.database.user"
+-                                              value="${org.apache.jetspeed.production.database.user}"/>
+-                                    <property name="org.apache.jetspeed.database.password"
+-                                              value="${org.apache.jetspeed.production.database.password}"/>
+-                                    <property name="org.apache.derby.version"
+-                                              value="${org.apache.derby.version}"/>
+-                                    <property name="ant.version"
+-                                              value="${ant.version}"/>
+-                                    <property name="hsqldb.version"
+-                                              value="${hsqldb.version}"/>
+-                                </ant>
+-                            </tasks>
+-                        </configuration>
+-                        <goals>
+-                            <goal>run</goal>
+-                        </goals>
+-                    </execution>
+-
+-                </executions>
+-            </plugin>
+-        </plugins>
+-    </build>
+-
+-    <!-- Project Information -->
+-
+-    <scm>
+-        <connection>scm:svn:http://svn.apache.org/repos/asf/portals/jetspeed-2/trunk/etc</connection>
+-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/portals/jetspeed-2/trunk/etc</developerConnection>
+-        <url>http://svn.apache.org/viewcvs.cgi/portals/jetspeed-2/trunk/components/etc/</url>
+-    </scm>
+-
+-</project>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++Copyright 2006 The Apache Software Foundation
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++    http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++See the License for the specific language governing permissions and
++limitations under the License.
++
++  $Id:$
++-->
++<project xmlns="http://maven.apache.org/POM/4.0.0"
++         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
++         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
++
++    <modelVersion>4.0.0</modelVersion>
++    <prerequisites>
++        <maven>2.0.4</maven>
++    </prerequisites>
++
++    <!-- POM Identification -->
++
++    <artifactId>etc</artifactId>
++    <parent>
++        <groupId>org.apache.portals.jetspeed-2</groupId>
++        <artifactId>jetspeed-2</artifactId>
++        <version>2.1-dev</version>
++        <relativePath>../pom.xml</relativePath>
++    </parent>
++    <packaging>pom</packaging>
++    <name>Jetspeed-2 Portal Database</name>
++    <description>
++        Project used to create DDL and DML database scripts and
++        execute them to popuate test and production instances.
++    </description>
++
++    <!-- Profiles -->
++
++    <profiles>
++
++        <!-- derby database profile -->
++        <profile>
++            <id>jetspeed-db-embedded-derby</id>
++            <dependencies>
++                <dependency>
++                    <groupId>org.apache.derby</groupId>
++                    <artifactId>derby</artifactId>
++                </dependency>
++            </dependencies>
++        </profile>
++
++        <!-- hsql database profile -->
++        <profile>
++            <id>jetspeed-db-embedded-hsql</id>
++            <dependencies>
++                <dependency>
++                    <groupId>hsqldb</groupId>
++                    <artifactId>hsqldb</artifactId>
++                </dependency>
++            </dependencies>
++        </profile>
++
++    </profiles>
++
++    <!-- Build Configuration -->
++
++    <build>
++
++        <!-- Plugin Executions -->
++        <plugins>
++            <plugin>
++                <groupId>org.apache.maven.plugins</groupId>
++                <artifactId>maven-antrun-plugin</artifactId>
++                <executions>
++
++                    <!-- generate database schema -->
++                    <execution>
++                        <id>etc-schema</id>
++                        <phase>compile</phase>
++<!--                        <configuration>
++                            <tasks>
++                                <ant target="clean-schema" antfile="build.xml" dir="${basedir}" inheritall="off"/>
++                                <ant target="schema" antfile="build.xml" dir="${basedir}" inheritall="off">
++                                    <property name="org.apache.jetspeed.database.default.name"
++                                              value="${org.apache.jetspeed.test.database.default.name}"/>
++                                </ant>
++                                <ant target="schema" antfile="build.xml" dir="${basedir}" inheritall="off">
++                                    <property name="org.apache.jetspeed.database.default.name"
++                                              value="${org.apache.jetspeed.production.database.default.name}"/>
++                                </ant>
++                            </tasks>
++                        </configuration>
++ -->
++ 
++                        <configuration>
++                            <tasks>
++                                <ant target="generate-schema" antfile="build.xml" dir="${basedir}" inheritRefs="on">
++                                    <property name="org.apache.jetspeed.database.skip"
++                                              value="${org.apache.jetspeed.env.skip.test}"/>
++                                    <property name="org.apache.jetspeed.database.default.name"
++                                              value="${org.apache.jetspeed.test.database.default.name}"/>
++                                    <property name="org.apache.jetspeed.database.url"
++                                              value="${org.apache.jetspeed.test.database.url}"/>
++                                    <property name="org.apache.jetspeed.database.jdbc.drivers.path"
++                                              value="${org.apache.jetspeed.test.jdbc.drivers.path}"/>
++                                    <property name="org.apache.jetspeed.database.driver"
++                                              value="${org.apache.jetspeed.test.database.driver}"/>
++                                    <property name="org.apache.jetspeed.database.user"
++                                              value="${org.apache.jetspeed.test.database.user}"/>
++                                    <property name="org.apache.jetspeed.database.password"
++                                              value="${org.apache.jetspeed.test.database.password}"/>
++                                    <property name="org.apache.derby.version"
++                                              value="${org.apache.derby.version}"/>
++                                    <property name="ant.version"
++                                              value="${ant.version}"/>
++                                    <property name="hsqldb.version"
++                                              value="${hsqldb.version}"/>
++                                    <property name="project.root"
++                                              value="${org.apache.jetspeed.project.home}"/>
++                                   <property name="org.apache.jetspeed.deploy.groupid"
++                                              value="${pom.groupId}"/>
++                                    <property name="org.apache.jetspeed.deploy.artifactid"
++                                              value="${pom.artifactId}"/>
++                                    <property name="org.apache.jetspeed.deploy.version"
++                                              value="${pom.version}"/>
++                                </ant>
++                                <ant target="generate-schema" antfile="build.xml" dir="${basedir}" inheritRefs="on">
++                                    <property name="org.apache.jetspeed.database.skip"
++                                              value="${org.apache.jetspeed.env.skip.production}"/>
++                                    <property name="org.apache.jetspeed.database.default.name"
++                                              value="${org.apache.jetspeed.production.database.default.name}"/>
++                                    <property name="org.apache.jetspeed.database.url"
++                                              value="${org.apache.jetspeed.production.database.url}"/>
++                                    <property name="org.apache.jetspeed.database.jdbc.drivers.path"
++                                              value="${org.apache.jetspeed.production.jdbc.drivers.path}"/>
++                                    <property name="org.apache.jetspeed.database.driver"
++                                              value="${org.apache.jetspeed.production.database.driver}"/>
++                                    <property name="org.apache.jetspeed.database.user"
++                                              value="${org.apache.jetspeed.production.database.user}"/>
++                                    <property name="org.apache.jetspeed.database.password"
++                                              value="${org.apache.jetspeed.production.database.password}"/>
++                                    <property name="org.apache.derby.version"
++                                              value="${org.apache.derby.version}"/>
++                                    <property name="ant.version"
++                                              value="${ant.version}"/>
++                                    <property name="hsqldb.version"
++                                              value="${hsqldb.version}"/>
++                                    <property name="project.root"
++                                              value="${org.apache.jetspeed.project.home}"/>
++                                   <property name="org.apache.jetspeed.deploy.groupid"
++                                              value="${pom.groupId}"/>
++                                    <property name="org.apache.jetspeed.deploy.artifactid"
++                                              value="${pom.artifactId}"/>
++                                    <property name="org.apache.jetspeed.deploy.version"
++                                              value="${pom.version}"/>
++                                </ant>
++                            </tasks>
++                        </configuration>
++                        <goals>
++                            <goal>run</goal>
++                        </goals>
++                    </execution>
++
++                    <!-- populate test database instance -->
++                    <execution>
++                        <id>etc-populate-test</id>
++                        <phase>generate-test-resources</phase>
++                        <configuration>
++                            <tasks>
++                                <ant target="populate-db" antfile="build.xml" dir="${basedir}" inheritRefs="on">
++                                    <property name="org.apache.jetspeed.database.skip"
++                                              value="${org.apache.jetspeed.env.skip.test}"/>
++                                    <property name="org.apache.jetspeed.database.default.name"
++                                              value="${org.apache.jetspeed.test.database.default.name}"/>
++                                    <property name="org.apache.jetspeed.database.url"
++                                              value="${org.apache.jetspeed.test.database.url}"/>
++                                    <property name="org.apache.jetspeed.database.jdbc.drivers.path"
++                                              value="${org.apache.jetspeed.test.jdbc.drivers.path}"/>
++                                    <property name="org.apache.jetspeed.database.driver"
++                                              value="${org.apache.jetspeed.test.database.driver}"/>
++                                    <property name="org.apache.jetspeed.database.user"
++                                              value="${org.apache.jetspeed.test.database.user}"/>
++                                    <property name="org.apache.jetspeed.database.password"
++                                              value="${org.apache.jetspeed.test.database.password}"/>
++                                    <property name="org.apache.derby.version"
++                                              value="${org.apache.derby.version}"/>
++                                    <property name="ant.version"
++                                              value="${ant.version}"/>
++                                    <property name="hsqldb.version"
++                                              value="${hsqldb.version}"/>
++                                    <property name="project.root"
++                                              value="${org.apache.jetspeed.project.home}"/>
++                                   <property name="org.apache.jetspeed.deploy.groupid"
++                                              value="${pom.groupId}"/>
++                                    <property name="org.apache.jetspeed.deploy.artifactid"
++                                              value="${pom.artifactId}"/>
++                                    <property name="org.apache.jetspeed.deploy.version"
++                                              value="${pom.version}"/>
++                                    <property name="portlet-api.version"
++                                              value="${portlet-api.version}"/>
++                                              
++                                </ant>
++                            </tasks>
++                        </configuration>
++                        <goals>
++                            <goal>run</goal>
++                        </goals>
++                    </execution>
++
++                    <!-- populate production database instance -->
++                    <execution>
++                        <id>etc-populate-production</id>
++                        <phase>install</phase>
++                        <configuration>
++                            <tasks>
++                                <ant target="populate-db" antfile="build.xml" dir="${basedir}" inheritRefs="on">
++                                    <property name="org.apache.jetspeed.database.enable"
++                                              value="${org.apache.jetspeed.env.deploy.db}"/>
++                                    <property name="org.apache.jetspeed.database.skip"
++                                              value="${org.apache.jetspeed.env.skip.production}"/>
++                                    <property name="org.apache.jetspeed.database.default.name"
++                                              value="${org.apache.jetspeed.production.database.default.name}"/>
++                                    <property name="org.apache.jetspeed.database.url"
++                                              value="${org.apache.jetspeed.production.database.url}"/>
++                                    <property name="org.apache.jetspeed.database.jdbc.drivers.path"
++                                              value="${org.apache.jetspeed.production.jdbc.drivers.path}"/>
++                                    <property name="org.apache.jetspeed.database.driver"
++                                              value="${org.apache.jetspeed.production.database.driver}"/>
++                                    <property name="org.apache.jetspeed.database.user"
++                                              value="${org.apache.jetspeed.production.database.user}"/>
++                                    <property name="org.apache.jetspeed.database.password"
++                                              value="${org.apache.jetspeed.production.database.password}"/>
++                                    <property name="org.apache.derby.version"
++                                              value="${org.apache.derby.version}"/>
++                                    <property name="ant.version"
++                                              value="${ant.version}"/>
++                                    <property name="hsqldb.version"
++                                              value="${hsqldb.version}"/>
++                                    <property name="project.root"
++                                              value="${org.apache.jetspeed.project.home}"/>
++                                   <property name="org.apache.jetspeed.deploy.groupid"
++                                              value="${pom.groupId}"/>
++                                    <property name="org.apache.jetspeed.deploy.artifactid"
++                                              value="${pom.artifactId}"/>
++                                    <property name="org.apache.jetspeed.deploy.version"
++                                              value="${pom.version}"/>
++                                    <property name="portlet-api.version"
++                                              value="${portlet-api.version}"/>
++                                 </ant>
++                            </tasks>
++                        </configuration>
++                        <goals>
++                            <goal>run</goal>
++                        </goals>
++                    </execution>
++
++                </executions>
++            </plugin>
++        </plugins>
++    </build>
++
++    <!-- Project Information -->
++
++    <scm>
++        <connection>scm:svn:http://svn.apache.org/repos/asf/portals/jetspeed-2/trunk/etc</connection>
++        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/portals/jetspeed-2/trunk/etc</developerConnection>
++        <url>http://svn.apache.org/viewcvs.cgi/portals/jetspeed-2/trunk/components/etc/</url>
++    </scm>
++
++</project>

Modified: portals/jetspeed-2/trunk/etc/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/etc/pom.xml?view=diff&rev=492423&r1=492422&r2=492423
==============================================================================
--- portals/jetspeed-2/trunk/etc/pom.xml (original)
+++ portals/jetspeed-2/trunk/etc/pom.xml Wed Jan  3 22:31:48 2007
@@ -108,7 +108,7 @@
                         <phase>generate-test-resources</phase>
                         <configuration>
                             <tasks>
-                                <ant target="populate-db" antfile="build.xml" dir="${basedir}" inheritRefs="on">
+                                <ant target="create-populate-db" antfile="build.xml" dir="${basedir}" inheritRefs="on">
                                     <property name="org.apache.jetspeed.database.skip"
                                               value="${org.apache.jetspeed.env.skip.test}"/>
                                     <property name="org.apache.jetspeed.database.default.name"
@@ -129,6 +129,14 @@
                                               value="${ant.version}"/>
                                     <property name="hsqldb.version"
                                               value="${hsqldb.version}"/>
+                                    <property name="org.apache.jetspeed.deploy.groupid"
+                                              value="${pom.groupId}"/>
+                                    <property name="org.apache.jetspeed.deploy.artifactid"
+                                              value="${pom.artifactId}"/>
+                                    <property name="org.apache.jetspeed.deploy.version"
+                                              value="${pom.version}"/>
+                                    <property name="portlet-api.version"
+                                              value="${portlet-api.version}"/>                                                                        
                                 </ant>
                             </tasks>
                         </configuration>
@@ -136,14 +144,13 @@
                             <goal>run</goal>
                         </goals>
                     </execution>
-
                     <!-- populate production database instance -->
                     <execution>
                         <id>etc-populate-production</id>
                         <phase>install</phase>
                         <configuration>
                             <tasks>
-                                <ant target="populate-db-userinfo" antfile="build.xml" dir="${basedir}" inheritRefs="on">
+                                <ant target="create-populate-db" antfile="build.xml" dir="${basedir}" inheritRefs="on">
                                     <property name="org.apache.jetspeed.database.enable"
                                               value="${org.apache.jetspeed.env.deploy.db}"/>
                                     <property name="org.apache.jetspeed.database.skip"
@@ -166,6 +173,14 @@
                                               value="${ant.version}"/>
                                     <property name="hsqldb.version"
                                               value="${hsqldb.version}"/>
+                                    <property name="org.apache.jetspeed.deploy.groupid"
+                                              value="${pom.groupId}"/>
+                                    <property name="org.apache.jetspeed.deploy.artifactid"
+                                              value="${pom.artifactId}"/>
+                                    <property name="org.apache.jetspeed.deploy.version"
+                                              value="${pom.version}"/>
+                                    <property name="portlet-api.version"
+                                              value="${portlet-api.version}"/>                                    
                                 </ant>
                             </tasks>
                         </configuration>

Added: portals/jetspeed-2/trunk/etc/schema/merge.xslt
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/etc/schema/merge.xslt?view=auto&rev=492423
==============================================================================
--- portals/jetspeed-2/trunk/etc/schema/merge.xslt (added)
+++ portals/jetspeed-2/trunk/etc/schema/merge.xslt Wed Jan  3 22:31:48 2007
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!--
+Copyright 2004 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<xslt:transform version="1.0"
+                 xmlns:xslt="http://www.w3.org/1999/XSL/Transform">
+<!-- Simple template to merge two database schemas into one  -->
+<xslt:param name="fileTwo" />
+<xslt:template match="/">
+
+   <xslt:message>
+      <xslt:text />Merging input with '<xslt:value-of select="$fileTwo"/>
+      <xslt:text>'</xslt:text>
+   </xslt:message>
+	<xslt:if test="string($fileTwo)=''">
+      <xslt:message terminate="yes">
+         <xslt:text>No input file specified (parameter 'fileTwo')</xslt:text>
+      </xslt:message>
+   </xslt:if>
+	<database name="generic">
+	<xslt:apply-templates />
+	</database>
+	</xslt:template>
+	<xslt:template match="database">
+      <xslt:apply-templates />
+      <xslt:apply-templates select="document($fileTwo)/database/table"/> 
+	</xslt:template>
+	
+	<xslt:template match="@*|node()">
+	<xslt:copy>
+      <xslt:apply-templates select="@*|node()"/>
+	</xslt:copy>
+	</xslt:template>
+</xslt:transform>

Modified: portals/jetspeed-2/trunk/etc/schema/security-schema.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/etc/schema/security-schema.xml?view=diff&rev=492423&r1=492422&r2=492423
==============================================================================
--- portals/jetspeed-2/trunk/etc/schema/security-schema.xml (original)
+++ portals/jetspeed-2/trunk/etc/schema/security-schema.xml Wed Jan  3 22:31:48 2007
@@ -59,10 +59,10 @@
     <table name="PRINCIPAL_PERMISSION">
         <column name="PRINCIPAL_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="PERMISSION_ID" primaryKey="true" required="true" type="INTEGER"/>
-        <foreign-key foreignTable="SECURITY_PERMISSION" name="P_PER_FK_P_ID_SEC_PER" onDelete="cascade">
+        <foreign-key foreignTable="SECURITY_PERMISSION" name="FK_PRINCIPAL_PERMISSION_1" onDelete="cascade">
             <reference foreign="PERMISSION_ID" local="PERMISSION_ID"/>
         </foreign-key>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL" name="P_PER_FK_P_ID_SEC_PRI" onDelete="cascade">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" name="FK_PRINCIPAL_PERMISSION_2" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="PRINCIPAL_ID"/>
         </foreign-key>
     </table>
@@ -86,7 +86,7 @@
         <column name="PREV_AUTH_DATE" required="false" type="TIMESTAMP"/>
         <column name="LAST_AUTH_DATE" required="false" type="TIMESTAMP"/>
         <column name="EXPIRATION_DATE" required="false" type="DATE"/>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL" name="SEC_CRE_FK_P_ID_SEC_PR" onDelete="cascade">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" name="FK_SECURITY_CREDENTIAL_1" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="PRINCIPAL_ID"/>
         </foreign-key>
     </table>
@@ -136,10 +136,10 @@
     <table name="SSO_PRINCIPAL_TO_REMOTE">
     	<column name="PRINCIPAL_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="REMOTE_PRINCIPAL_ID" primaryKey="true" required="true" type="INTEGER"/>
-         <foreign-key foreignTable="SECURITY_PRINCIPAL" name="SSO_P_TO_P_FK_P_ID_SEC_P" onDelete="cascade">
+         <foreign-key foreignTable="SECURITY_PRINCIPAL" name="FK_SSO_PRINCIPAL_TO_REMOTE_1" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="PRINCIPAL_ID"/>
         </foreign-key>
-       <foreign-key foreignTable="SECURITY_PRINCIPAL" name="SSO_P_TO_RP_FK_RP_ID_SEC_P" onDelete="cascade">
+       <foreign-key foreignTable="SECURITY_PRINCIPAL" name="FK_SSO_PRINCIPAL_TO_REMOTE_2" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="REMOTE_PRINCIPAL_ID"/>
         </foreign-key>
     </table>
@@ -148,10 +148,10 @@
     	<column name="SITE_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="PRINCIPAL_ID" primaryKey="true" required="true" type="INTEGER"/>
            
-         <foreign-key foreignTable="SSO_SITE"  name="SSO_S_TO_S_FK_P_ID_SEC_P" onDelete="cascade">
+         <foreign-key foreignTable="SSO_SITE"  name="FK_SSO_SITE_TO_REMOTE_1" onDelete="cascade">
             <reference foreign="SITE_ID" local="SITE_ID"/>
         </foreign-key>
-       <foreign-key foreignTable="SECURITY_PRINCIPAL" name="SSO_S_TO_RP_FK_RP_ID_SEC_P" onDelete="cascade">
+       <foreign-key foreignTable="SECURITY_PRINCIPAL" name="FK_SSO_SITE_TO_REMOTE_2" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="PRINCIPAL_ID"/>
         </foreign-key>
     </table>
@@ -160,10 +160,10 @@
     	<column name="COOKIE_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="REMOTE_PRINCIPAL_ID" primaryKey="true" required="true" type="INTEGER"/>
            
-         <foreign-key foreignTable="SSO_COOKIE" name="SSO_C_TO_R_FK_C_ID_SSO_C" onDelete="cascade">
+         <foreign-key foreignTable="SSO_COOKIE" name="FK_SSO_COOKIE_TO_REMOTE_1" onDelete="cascade">
             <reference foreign="COOKIE_ID" local="COOKIE_ID"/>
         </foreign-key>
-       <foreign-key foreignTable="SECURITY_PRINCIPAL" name="SSO_C_TO_R_FK_R_PR_R_ID" onDelete="cascade">
+       <foreign-key foreignTable="SECURITY_PRINCIPAL" name="FK_SSO_COOKIE_TO_REMOTE_2" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="REMOTE_PRINCIPAL_ID"/>
         </foreign-key>
     </table>
@@ -174,10 +174,10 @@
     <table name="SECURITY_USER_ROLE">
         <column name="USER_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="ROLE_ID" primaryKey="true" required="true" type="INTEGER"/>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL" name="SEC_U_R_FK_R_ID_SEC_P" onDelete="cascade">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" name="FK_SECURITY_USER_ROLE_1" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="ROLE_ID"/>
         </foreign-key>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL" name="SEC_U_R_FK_U_ID_SEC_P" onDelete="cascade">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" name="FK_SECURITY_USER_ROLE_2" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="USER_ID"/>
         </foreign-key>
     </table>
@@ -188,10 +188,10 @@
     <table name="SECURITY_USER_GROUP">
         <column name="USER_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="GROUP_ID" primaryKey="true" required="true" type="INTEGER"/>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL" name="SEC_U_G_FK_G_ID_SEC_P" onDelete="cascade">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" name="FK_SECURITY_USER_GROUP_1" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="GROUP_ID"/>
         </foreign-key>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL" name="SEC_U_G_FK_U_ID_SEC_P" onDelete="cascade">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" name="FK_SECURITY_USER_GROUP_2" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="USER_ID"/>
         </foreign-key>
     </table>
@@ -202,10 +202,10 @@
     <table name="SECURITY_GROUP_ROLE">
         <column name="GROUP_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="ROLE_ID" primaryKey="true" required="true" type="INTEGER"/>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL"  name="SEC_G_R_FK_G_ID_SEC_P" onDelete="cascade">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL"  name="FK_SECURITY_GROUP_ROLE_1" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="GROUP_ID"/>
         </foreign-key>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL"  name="SEC_G_R_FK_R_ID_SEC_P" onDelete="cascade">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL"  name="FK_SECURITY_GROUP_ROLE_2" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="ROLE_ID"/>
         </foreign-key>
     </table>

Modified: portals/jetspeed-2/trunk/maven-archetypes/portal/src/archetype/archetype-resources/etc/build.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/maven-archetypes/portal/src/archetype/archetype-resources/etc/build.xml?view=diff&rev=492423&r1=492422&r2=492423
==============================================================================
--- portals/jetspeed-2/trunk/maven-archetypes/portal/src/archetype/archetype-resources/etc/build.xml (original)
+++ portals/jetspeed-2/trunk/maven-archetypes/portal/src/archetype/archetype-resources/etc/build.xml Wed Jan  3 22:31:48 2007
@@ -31,17 +31,18 @@
     <property name="org.apache.derby.version" value=""/>
     <property name="ant.version" value=""/>
     <property name="hsqldb.version" value=""/>
+    <property name="portlet-api.version" value=""/>
 
-    <property name="org.apache.jetspeed.source.sql" value="\${basedir}/sql"/>
+    <property name="org.apache.jetspeed.source.sql" value="${basedir}/sql"/>
     <property name="org.apache.jetspeed.database.source.sql" value="${org.apache.jetspeed.source.sql}/${org.apache.jetspeed.database.default.name}"/>
-    <property name="org.apache.jetspeed.database.target.sql.root" value="\${basedir}/target/sql"/>
+    <property name="org.apache.jetspeed.database.target.sql.root" value="${basedir}/target/sql"/>
     <property name="org.apache.jetspeed.database.target.sql" value="${org.apache.jetspeed.database.target.sql.root}/${org.apache.jetspeed.database.default.name}"/>
 
     <property name="torque.contextProperties" value=""/>
     <property name="torque.runOnlyOnSchemaChange" value="true"/>
     <property name="torque.idTableXMLFile" value=""/>
     <property name="torque.project" value="phase1"/>
-    <property name="torque.schema.dir" value="\${basedir}/schema"/>
+    <property name="torque.schema.dir" value="${basedir}/schema"/>
     <property name="torque.schema.sql.excludes" value=""/>
     <property name="torque.schema.sql.includes" value="*-schema.xml"/>
     <property name="torque.template.sql" value="sql/base/Control.vm"/>
@@ -53,12 +54,13 @@
 
     <target name="help">
         <echo message="Buildfile for the etc maven POM."/>
-        <echo message="Usage: ant [ clean-schema | schema | populate-db | populate-db-userinfo ]"/>
+        <echo message="Usage: ant [ clean-schema | schema | populate-db ]"/>
         <echo message="Where:"/>
         <echo message="    clean-schema - clean schemas for all databases."/>
         <echo message="    schema - build schema for database if not already built."/>
-        <echo message="    populate-db - build and minimally populate database instance."/>
-        <echo message="    populate-db-userinfo - build and populate database instance with default users."/>
+        <echo message="    create-db - drops and recreates databases, no population."/>        
+        <echo message="    create-populate-db - drop, recreate database and populate database instance."/>        
+        <echo message="    populate-db - populate database instance."/>
         <echo message="Configuration:"/>
         <echo message="    org.apache.jetspeed.database.enable=${org.apache.jetspeed.database.enable}"/>
         <echo message="    org.apache.jetspeed.database.skip=${org.apache.jetspeed.database.skip}"/>
@@ -271,9 +273,10 @@
 
     <!-- Populate Database -->
 
-    <target name="populate-db" depends="test-populate-skip" unless="org.apache.jetspeed.skip">
-
-        <!-- execute drop scripts -->
+    <target name="create-db" depends="test-populate-skip" unless="org.apache.jetspeed.skip">
+    	<echo message ="START-CREATE-DB" />        
+        
+      <!-- execute drop scripts -->
         <antcall target="sql-execute" inheritall="on" inheritrefs="on">
             <param name="database.arg.scripts.dir" value="${org.apache.jetspeed.database.target.sql}"/>
             <param name="database.arg.scripts" value="drop.sql"/>
@@ -286,25 +289,22 @@
             <param name="database.arg.scripts" value="*.sql"/>
             <param name="database.arg.onerror" value="abort"/>
         </antcall>
+    	<echo message ="END CREATE-DB" />        
+    </target>
 
-        <!-- execute default population scripts -->
-        <antcall target="sql-execute" inheritall="on" inheritrefs="on">
-            <param name="database.arg.scripts.dir" value="${org.apache.jetspeed.database.target.sql}"/>
-            <param name="database.arg.scripts" value="populate-db-default.sql"/>
-            <param name="database.arg.onerror" value="abort"/>
+    <target name="create-populate-db">
+        <antcall target="create-db" inheritall="on" inheritrefs="on"/>
+        <antcall target="populate-db" inheritall="on" inheritrefs="on"/>
+    </target>        
+    
+    <target name="populate-db" depends="test-populate-skip" unless="org.apache.jetspeed.skip">
+       <echo message ="START-POPULATE-DB" />                       
+       <antcall target="populate-seed-data" inheritall="on" inheritrefs="on">
         </antcall>
-
+    	<echo message ="END POPULATE-DB" />
     </target>
 
     <target name="populate-db-userinfo" depends="populate-db" unless="org.apache.jetspeed.skip">
-
-        <!-- execute default userinfo population scripts -->
-        <antcall target="sql-execute" inheritall="on" inheritrefs="on">
-            <param name="database.arg.scripts.dir" value="${org.apache.jetspeed.database.target.sql}"/>
-            <param name="database.arg.scripts" value="populate-userinfo-for-default-psml.sql"/>
-            <param name="database.arg.onerror" value="abort"/>
-        </antcall>
-
     </target>
 
     <!-- SQL Execution -->
@@ -355,7 +355,7 @@
             the subsequent test database access in forked JVMs.
         -->
         <!-- write out temporary ant build file for forked execution -->
-        <echo file="\${basedir}/derby-sql-build.xml">
+        <echo file="${basedir}/derby-sql-build.xml">
             &lt;project name="etc-derby-sql-build"&gt;
                 &lt;target name="forked-sql-execute-derby"&gt;
                     &lt;sql url="${org.apache.jetspeed.database.url};create=true" driver="${org.apache.jetspeed.database.driver}" 
@@ -383,15 +383,15 @@
                         version="${ant.version}"/>
         </dependencies>
         <!-- fork and execute temporary ant build file -->
-        <java classname="org.apache.tools.ant.Main" fork="on" append="on" failonerror="on" dir="\${basedir}">
+        <java classname="org.apache.tools.ant.Main" fork="on" append="on" failonerror="on" dir="${basedir}">
             <classpath>
                 <fileset refid="ant.dependencies.id"/>
                 <fileset refid="derby.embedded.db.dependencies.id"/>
             </classpath>
-            <arg line="-f \${basedir}/derby-sql-build.xml forked-sql-execute-derby"/>
+            <arg line="-f ${basedir}/derby-sql-build.xml forked-sql-execute-derby"/>
         </java>
         <!-- cleanup temporary ant build file -->
-        <delete file="\${basedir}/derby-sql-build.xml"/>
+        <delete file="${basedir}/derby-sql-build.xml"/>
     </target>
 
     <target name="sql-execute-hsql" if="org.apache.jetspeed.database.is.hsql.embedded">
@@ -437,4 +437,107 @@
         </condition>
     </target>
 
-</project>
+    <target name="populate-seed-data">
+    	<echo message = "called seed data with directory ${basedir} " />
+        <!-- prepare a classes directory with resources and libraries to execute import -->
+        <delete dir="${basedir}/target/seed"/>
+        <mkdir dir="${basedir}/target/seed"/>
+        <mkdir dir="${basedir}/target/seed/data"/>
+
+        <!-- copy seed -->
+        <copy todir="${basedir}/target/seed/data" overwrite="on" verbose="on" failonerror="off">
+            <fileset dir="${org.apache.jetspeed.source.sql}">
+                <include name="*seed.xml"/>
+            </fileset>
+        </copy>
+    	
+    	<mkdir dir="${basedir}/target/seed/classes"/>
+        <copy todir="${basedir}/target/seed/classes" flatten="on">
+            <fileset dir="${basedir}" >
+                <include name="log4j/log4j.properties"/>
+                <include name="db-ojb/*"/>
+            </fileset>
+        </copy>
+        <!-- prepare spring assemblies (TODO: why not use a Spring classpath loader?) -->
+        <property name="temp.assembly.dir" value="${basedir}/target/seed/assembly/"/>      
+        <mkdir dir="${temp.assembly.dir}"/>
+ 	    <echo message="Running Jetspeed Seed Importer with -b ${temp.assembly.dir}/boot/ -c ${temp.assembly.dir}/ "/>
+        <copy todir="${temp.assembly.dir}" overwrite="true" failonerror="true">
+          <fileset dir="${basedir}/../src/webapp/WEB-INF/assembly">
+            <include name="security*.xml"/>
+            <include name="capabilities.xml"/>           
+            <include name="prefs.xml"/>           
+            <include name="profiler.xml"/>           
+            <include name="transaction.xml"/>           
+          </fileset>
+         </copy>
+         <mkdir dir="${temp.assembly.dir}/boot/"/>             
+         <copy todir="${temp.assembly.dir}/boot/" overwrite="true" failonerror="true">
+         	<fileset dir="${basedir}/../src/webapp/WEB-INF/assembly/boot">
+            <include name="*.xml"/>
+          </fileset>
+         </copy>
+        
+
+        <!-- construct serializer component classpath -->
+        <dependencies filesetId="serializer-id" useScope="test">
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-api"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-commons"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-components"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-cm"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-rdbms"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+                <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                            artifactId="jetspeed-capability"
+                            version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-security"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-serializer"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="${org.apache.jetspeed.deploy.groupid}"
+                        artifactId="jetspeed-profiler"
+                        version="${org.apache.jetspeed.deploy.version}"/>
+            <dependency groupId="portlet-api"
+                 		artifactId="portlet-api"
+                 		version="${portlet-api.version}"/>
+
+            <dependency groupId="tyrex"
+                        artifactId="tyrex"
+                        version="1.0.1"/>
+        </dependencies>
+
+        <!-- create sysproperty set to configure import utility -->
+        <propertyset id="import.syspropertyset.id">
+            <propertyref name="org.apache.jetspeed.database.driver"/>
+            <propertyref name="org.apache.jetspeed.database.url"/>
+            <propertyref name="org.apache.jetspeed.database.user"/>
+            <propertyref name="org.apache.jetspeed.database.password"/>
+        </propertyset>
+    	<echo message="calling serializer with data in ${basedir}/target/seed/data , assembly and b oot:${temp.assembly.dir}/ database:-dc ${org.apache.jetspeed.database.driver} -ds ${org.apache.jetspeed.database.url} -du ${org.apache.jetspeed.database.user} -dp ${org.apache.jetspeed.database.password}" />              
+
+        <!-- execute import utility within the page manager component -->
+        <java classname="org.apache.jetspeed.serializer.JetspeedSerializerApplication"  fork="on" append="on" dir="${basedir}">
+            <classpath>
+<!--                <fileset refid="maven.dependency.classpath"/> 
+-->
+                <fileset refid="serializer-id"/> 
+                <pathelement path="${org.apache.jetspeed.database.jdbc.drivers.path}"/>
+                <pathelement path="${basedir}/target/seed/classes"/>
+            </classpath>
+          <arg line="-I ${basedir}/target/seed/data/ -b ${temp.assembly.dir}/boot/ -c ${temp.assembly.dir}/ -dc ${org.apache.jetspeed.database.driver} -ds ${org.apache.jetspeed.database.url} -du ${org.apache.jetspeed.database.user} -dp ${org.apache.jetspeed.database.password}"/>                           
+        </java>
+     
+   </target>
+    
+</project>
\ No newline at end of file

Modified: portals/jetspeed-2/trunk/maven-archetypes/portal/src/archetype/archetype-resources/etc/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/maven-archetypes/portal/src/archetype/archetype-resources/etc/pom.xml?view=diff&rev=492423&r1=492422&r2=492423
==============================================================================
--- portals/jetspeed-2/trunk/maven-archetypes/portal/src/archetype/archetype-resources/etc/pom.xml (original)
+++ portals/jetspeed-2/trunk/maven-archetypes/portal/src/archetype/archetype-resources/etc/pom.xml Wed Jan  3 22:31:48 2007
@@ -100,7 +100,7 @@
                         <phase>install</phase>
                         <configuration>
                             <tasks>
-                                <ant target="populate-db-userinfo" antfile="build.xml" dir="\${basedir}" inheritRefs="on">
+                                <ant target="create-populate-db" antfile="build.xml" dir="${basedir}" inheritRefs="on">
                                     <property name="org.apache.jetspeed.database.enable"
                                               value="${org.apache.jetspeed.env.deploy.db}"/>
                                     <property name="org.apache.jetspeed.database.skip"
@@ -123,6 +123,14 @@
                                               value="${ant.version}"/>
                                     <property name="hsqldb.version"
                                               value="${hsqldb.version}"/>
+                                    <property name="org.apache.jetspeed.deploy.groupid"
+                                              value="${pom.groupId}"/>
+                                    <property name="org.apache.jetspeed.deploy.artifactid"
+                                              value="${pom.artifactId}"/>
+                                    <property name="org.apache.jetspeed.deploy.version"
+                                              value="${pom.version}"/>
+                                    <property name="portlet-api.version"
+                                              value="${portlet-api.version}"/>                                    
                                 </ant>
                             </tasks>
                         </configuration>
@@ -130,7 +138,6 @@
                             <goal>run</goal>
                         </goals>
                     </execution>
-
                 </executions>
             </plugin>
         </plugins>



---------------------------------------------------------------------
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