portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r385998 - in /portals/jetspeed-2/trunk: ./ app-servers/ applications/jetspeed/ components/ components/deploy-tool/ components/page-manager/ components/portal-site/ etc/
Date Wed, 15 Mar 2006 07:55:05 GMT
Author: rwatler
Date: Tue Mar 14 23:55:00 2006
New Revision: 385998

URL: http://svn.apache.org/viewcvs?rev=385998&view=rev
Log:
revised M2 build: derby/hsqldb supported, see settings.xml.sample for updates

Modified:
    portals/jetspeed-2/trunk/app-servers/build.xml
    portals/jetspeed-2/trunk/app-servers/pom.xml
    portals/jetspeed-2/trunk/applications/jetspeed/pom.xml
    portals/jetspeed-2/trunk/components/deploy-tool/pom.xml
    portals/jetspeed-2/trunk/components/page-manager/pom.xml
    portals/jetspeed-2/trunk/components/pom.xml
    portals/jetspeed-2/trunk/components/portal-site/pom.xml
    portals/jetspeed-2/trunk/etc/build.xml
    portals/jetspeed-2/trunk/etc/pom.xml
    portals/jetspeed-2/trunk/pom.xml
    portals/jetspeed-2/trunk/settings.xml.sample

Modified: portals/jetspeed-2/trunk/app-servers/build.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/app-servers/build.xml?rev=385998&r1=385997&r2=385998&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/app-servers/build.xml (original)
+++ portals/jetspeed-2/trunk/app-servers/build.xml Tue Mar 14 23:55:00 2006
@@ -23,18 +23,19 @@
     <property name="org.apache.jetspeed.deploy.skip" value="false"/>
     <property name="org.apache.jetspeed.server.home" value=""/>
     <property name="org.apache.jetspeed.catalina.version.major" value=""/>
+    <property name="org.apache.jetspeed.production.database.default.name" value=""/>
     <property name="org.apache.jetspeed.production.database.url" value=""/>
+    <property name="org.apache.jetspeed.production.database.jdbc.drivers.path" value=""/>
     <property name="org.apache.jetspeed.production.database.driver" value=""/>
     <property name="org.apache.jetspeed.production.database.user" value=""/>
     <property name="org.apache.jetspeed.production.database.password" value=""/>
     <property name="org.apache.jetspeed.groupid" value=""/>
     <property name="org.apache.jetspeed.version" value=""/>
-    <property name="org.apache.portals.bridges.groupid" value=""/>
     <property name="org.apache.portals.bridges.version" value=""/>
-    <property name="org.apache.pluto.groupid" value=""/>
     <property name="org.apache.pluto.version" value=""/>
-    <property name="portlet-api.groupid" value=""/>
     <property name="portlet-api.version" value=""/>
+    <property name="org.apache.derby.version" value=""/>
+    <property name="hsqldb.version" value=""/>
 
     <!-- Usage -->
 
@@ -47,24 +48,27 @@
         <echo message="    org.apache.jetspeed.deploy.skip=${org.apache.jetspeed.deploy.skip}"/>
         <echo message="    org.apache.jetspeed.server.home=${org.apache.jetspeed.server.home}"/>
         <echo message="    org.apache.jetspeed.catalina.version.major=${org.apache.jetspeed.catalina.version.major}"/>
+        <echo message="    org.apache.jetspeed.production.database.default.name=${org.apache.jetspeed.production.database.default.name}"/>
         <echo message="    org.apache.jetspeed.production.database.url=${org.apache.jetspeed.production.database.url}"/>
+        <echo message="    org.apache.jetspeed.production.database.jdbc.drivers.path=${org.apache.jetspeed.production.database.jdbc.drivers.path}"/>
         <echo message="    org.apache.jetspeed.production.database.driver=${org.apache.jetspeed.production.database.driver}"/>
         <echo message="    org.apache.jetspeed.production.database.user=${org.apache.jetspeed.production.database.user}"/>
         <echo message="    org.apache.jetspeed.production.database.password=${org.apache.jetspeed.production.database.password}"/>
         <echo message="    org.apache.jetspeed.groupid=${org.apache.jetspeed.groupid}"/>
         <echo message="    org.apache.jetspeed.version=${org.apache.jetspeed.version}"/>
-        <echo message="    org.apache.portals.bridges.groupid=${org.apache.portals.bridges.groupid}"/>
         <echo message="    org.apache.portals.bridges.version=${org.apache.portals.bridges.version}"/>
-        <echo message="    org.apache.pluto.groupid=${org.apache.pluto.groupid}"/>
         <echo message="    org.apache.pluto.version=${org.apache.pluto.version}"/>
-        <echo message="    portlet-api.groupid=${portlet-api.groupid}"/>
         <echo message="    portlet-api.version=${portlet-api.version}"/>
+        <echo message="    org.apache.derby.version=${org.apache.derby.version}"/>
+        <echo message="    hsqldb.version=${hsqldb.version}"/>
     </target>
 
-    <!-- Tomcat Deployment -->
+    <!-- Additional Task Definitions -->
 
     <taskdef resource="org/apache/maven/artifact/ant/antlib.xml"/>
 
+    <!-- Tomcat Deployment -->
+
     <target name="tomcat" depends="deploy-skip, tomcat-5-5" unless="org.apache.jetspeed.skip">
 
         <!-- Deploy provided libraries in shared/lib -->
@@ -78,10 +82,10 @@
             </fileset>
         </delete>
         <dependencies filesetId="shared.lib.dependencies.id" useScope="runtime">
-            <dependency groupId="${org.apache.pluto.groupid}"
+            <dependency groupId="org.apache.pluto"
                         artifactId="pluto"
                         version="${org.apache.pluto.version}"/>
-            <dependency groupId="${org.apache.portals.bridges.groupid}"
+            <dependency groupId="org.apache.portals.bridges"
                         artifactId="portals-bridges-common"
                         version="${org.apache.portals.bridges.version}"/>
             <dependency groupId="${org.apache.jetspeed.groupid}"
@@ -90,7 +94,7 @@
             <dependency groupId="${org.apache.jetspeed.groupid}"
                         artifactId="jetspeed-api"
                         version="${org.apache.jetspeed.version}"/>
-            <dependency groupId="${portlet-api.groupid}"
+            <dependency groupId="portlet-api"
                         artifactId="portlet-api"
                         version="${portlet-api.version}"/>
         </dependencies>
@@ -98,6 +102,9 @@
             <fileset refid="shared.lib.dependencies.id"/>
         </copy>
 
+        <!-- Deploy embedded database in shared/lib -->
+        <antcall target="tomcat-embedded-database"/>
+
         <!-- Deploy jetspeed applications -->
         <delete dir="${org.apache.jetspeed.server.home}/webapps/jetspeed"/>
         <delete>
@@ -155,19 +162,19 @@
                         artifactId="jetspeed-layouts"
                         version="${org.apache.jetspeed.version}"
                         type="war"/>
-            <dependency groupId="${org.apache.portals.bridges.groupid}"
+            <dependency groupId="org.apache.portals.bridges"
                         artifactId="jpetstore"
                         version="${org.apache.portals.bridges.version}"
                         type="war"/>
-            <dependency groupId="${org.apache.portals.bridges.groupid}"
+            <dependency groupId="org.apache.portals.bridges"
                         artifactId="jsf-demo"
                         version="${org.apache.portals.bridges.version}"
                         type="war"/>
-            <dependency groupId="${org.apache.portals.bridges.groupid}"
+            <dependency groupId="org.apache.portals.bridges"
                         artifactId="perl"
                         version="${org.apache.portals.bridges.version}"
                         type="war"/>
-            <dependency groupId="${org.apache.portals.bridges.groupid}"
+            <dependency groupId="org.apache.portals.bridges"
                         artifactId="php"
                         version="${org.apache.portals.bridges.version}"
                         type="war"/>
@@ -198,6 +205,57 @@
             <mapper type="merge" to="jetspeed.xml"/>
         </copy>
 
+    </target>
+
+    <target name="tomcat-embedded-database" depends="test-embedded-database, tomcat-embedded-database-derby, tomcat-embedded-database-hsql"/>
+
+    <target name="test-embedded-database">
+        <condition property="org.apache.jetspeed.production.database.is.derby.embedded">
+            <and>
+                <equals arg1="${org.apache.jetspeed.production.database.default.name}" arg2="derby"/>
+                <equals arg1="${org.apache.jetspeed.production.database.jdbc.drivers.path}" arg2=""/>
+            </and>
+        </condition>
+        <condition property="org.apache.jetspeed.production.database.is.hsql.embedded">
+            <and>
+                <equals arg1="${org.apache.jetspeed.production.database.default.name}" arg2="hsql"/>
+                <equals arg1="${org.apache.jetspeed.production.database.jdbc.drivers.path}" arg2=""/>
+            </and>
+        </condition>
+    </target>
+
+    <target name="tomcat-embedded-database-derby" if="org.apache.jetspeed.production.database.is.derby.embedded">
+        <!-- Deploy embedded derby database in shared/lib -->
+        <delete>
+            <fileset dir="${org.apache.jetspeed.server.home}/shared/lib">
+                <include name="derby-*.jar"/>
+            </fileset>
+        </delete>
+        <dependencies filesetId="derby.embedded.db.dependencies.id" useScope="runtime">
+            <dependency groupId="org.apache.derby"
+                        artifactId="derby"
+                        version="${org.apache.derby.version}"/>
+        </dependencies>
+        <copy todir="${org.apache.jetspeed.server.home}/shared/lib" flatten="on">
+            <fileset refid="derby.embedded.db.dependencies.id"/>
+        </copy>
+    </target>
+
+    <target name="tomcat-embedded-database-hsql" if="org.apache.jetspeed.production.database.is.hsql.embedded">
+        <!-- Deploy embedded hsql database in shared/lib -->
+        <delete>
+            <fileset dir="${org.apache.jetspeed.server.home}/shared/lib">
+                <include name="hsqldb-*.jar"/>
+            </fileset>
+        </delete>
+        <dependencies filesetId="hsql.embedded.db.dependencies.id" useScope="runtime">
+            <dependency groupId="hsqldb"
+                        artifactId="hsqldb"
+                        version="${hsqldb.version}"/>
+        </dependencies>
+        <copy todir="${org.apache.jetspeed.server.home}/shared/lib" flatten="on">
+            <fileset refid="hsql.embedded.db.dependencies.id"/>
+        </copy>
     </target>
 
     <!-- Utility Targets -->

Modified: portals/jetspeed-2/trunk/app-servers/pom.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/app-servers/pom.xml?rev=385998&r1=385997&r2=385998&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/app-servers/pom.xml (original)
+++ portals/jetspeed-2/trunk/app-servers/pom.xml Tue Mar 14 23:55:00 2006
@@ -56,15 +56,19 @@
                         <phase>install</phase>
                         <configuration>
                             <tasks>
-                                <ant target="${org.apache.jetspeed.env.deploy.target}" antfile="build.xml" dir="${basedir}" inheritall="off">
+                                <ant target="${org.apache.jetspeed.env.deploy.target}" antfile="build.xml" dir="${basedir}" inheritAll="off">
                                     <property name="org.apache.jetspeed.deploy.skip"
                                               value="${org.apache.jetspeed.env.skip.production}"/>
                                     <property name="org.apache.jetspeed.server.home"
                                               value="${org.apache.jetspeed.server.home}"/>
                                     <property name="org.apache.jetspeed.catalina.version.major"
                                               value="${org.apache.jetspeed.catalina.version.major}"/>
+                                    <property name="org.apache.jetspeed.production.database.default.name"
+                                              value="${org.apache.jetspeed.production.database.default.name}"/>
                                     <property name="org.apache.jetspeed.production.database.url"
                                               value="${org.apache.jetspeed.production.database.url}"/>
+                                    <property name="org.apache.jetspeed.production.database.jdbc.drivers.path"
+                                              value="${org.apache.jetspeed.production.jdbc.drivers.path}"/>
                                     <property name="org.apache.jetspeed.production.database.driver"
                                               value="${org.apache.jetspeed.production.database.driver}"/>
                                     <property name="org.apache.jetspeed.production.database.user"
@@ -75,18 +79,16 @@
                                               value="${pom.groupId}"/>
                                     <property name="org.apache.jetspeed.version"
                                               value="${pom.version}"/>
-                                    <property name="org.apache.portals.bridges.groupid"
-                                              value="org.apache.portals.bridges"/>
                                     <property name="org.apache.portals.bridges.version"
                                               value="${org.apache.portals.bridges.version}"/>
-                                    <property name="org.apache.pluto.groupid"
-                                              value="org.apache.pluto"/>
                                     <property name="org.apache.pluto.version"
                                               value="${org.apache.pluto.version}"/>
-                                    <property name="portlet-api.groupid"
-                                              value="portlet-api"/>
                                     <property name="portlet-api.version"
                                               value="${portlet-api.version}"/>
+                                    <property name="org.apache.derby.version"
+                                              value="${org.apache.derby.version}"/>
+                                    <property name="hsqldb.version"
+                                              value="${hsqldb.version}"/>
                                 </ant>
                             </tasks>
                         </configuration>

Modified: portals/jetspeed-2/trunk/applications/jetspeed/pom.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/applications/jetspeed/pom.xml?rev=385998&r1=385997&r2=385998&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/jetspeed/pom.xml (original)
+++ portals/jetspeed-2/trunk/applications/jetspeed/pom.xml Tue Mar 14 23:55:00 2006
@@ -69,7 +69,7 @@
                         <phase>process-resources</phase>
                         <configuration>
                             <tasks>
-                                <ant target="configure" antfile="build.xml" dir="${basedir}" inheritall="off">
+                                <ant target="configure" antfile="build.xml" dir="${basedir}" inheritAll="off">
                                     <property name="org.apache.jetspeed.catalina.version.major"
                                               value="${org.apache.jetspeed.catalina.version.major}"/>
                                     <property name="org.apache.jetspeed.services.autodeployment.server"

Modified: portals/jetspeed-2/trunk/components/deploy-tool/pom.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/deploy-tool/pom.xml?rev=385998&r1=385997&r2=385998&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/deploy-tool/pom.xml (original)
+++ portals/jetspeed-2/trunk/components/deploy-tool/pom.xml Tue Mar 14 23:55:00 2006
@@ -76,7 +76,7 @@
                         <phase>process-resources</phase>
                         <configuration>
                             <tasks>
-                                <ant target="resources" antfile="build.xml" dir="${basedir}" inheritall="off"/>
+                                <ant target="resources" antfile="build.xml" dir="${basedir}" inheritAll="off"/>
                             </tasks>
                         </configuration>
                         <goals>

Modified: portals/jetspeed-2/trunk/components/page-manager/pom.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/pom.xml?rev=385998&r1=385997&r2=385998&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/pom.xml (original)
+++ portals/jetspeed-2/trunk/components/page-manager/pom.xml Tue Mar 14 23:55:00 2006
@@ -112,7 +112,7 @@
                         <phase>generate-test-resources</phase>
                         <configuration>
                             <tasks>
-                                <ant target="testdata" antfile="build.xml" dir="${basedir}" inheritall="off"/>
+                                <ant target="testdata" antfile="build.xml" dir="${basedir}" inheritAll="off"/>
                             </tasks>
                         </configuration>
                         <goals>

Modified: portals/jetspeed-2/trunk/components/pom.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/pom.xml?rev=385998&r1=385997&r2=385998&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/pom.xml (original)
+++ portals/jetspeed-2/trunk/components/pom.xml Tue Mar 14 23:55:00 2006
@@ -43,23 +43,10 @@
 
     <profiles>
 
-        <!-- Test Profile -->
+        <!-- drivers path test database profile -->
         <profile>
-            <id>test</id>
-            <activation>
-                <property>
-                    <name>env</name>
-                    <value>test</value>
-                </property>
-            </activation>
-            <!--
-                Bug: This system scoped dependency is brought in via a profile
-                since system paths based on a property cannot appear as a main
-                build dependency since it will generate an invalid POM when the
-                pom is referenced as a dependency.
-            -->
+            <id>jetspeed-db-drivers-path</id>
             <dependencies>
-                <!-- Database Driver -->
                 <dependency>
                     <groupId>${pom.groupId}</groupId>
                     <artifactId>org.apache.jetspeed.test.jdbc.drivers.path</artifactId>
@@ -70,6 +57,30 @@
             </dependencies>
         </profile>
 
+        <!-- derby test database profile -->
+        <profile>
+            <id>jetspeed-db-embedded-derby</id>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.derby</groupId>
+                    <artifactId>derby</artifactId>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+        </profile>
+
+        <!-- hsql test database profile -->
+        <profile>
+            <id>jetspeed-db-embedded-hsql</id>
+            <dependencies>
+                <dependency>
+                    <groupId>hsqldb</groupId>
+                    <artifactId>hsqldb</artifactId>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+        </profile>
+
     </profiles>
 
     <!-- Component Modules -->
@@ -185,7 +196,11 @@
                         <!--
                             Note: using forking to prevent module test case connection
                             pools and spring crosstalk via surefire isolation class
-                            loaders when multipe modules are built, (e.g. components/registry). 
+                            loaders when multipe modules are built, (e.g. components/registry).
+                            Specifying a fork option also sets appropriate working
+                            directory for test via default basedir configuration.
+                            This setting also has ramifactions for embedded databases
+                            that lock access to a single JVM instance, (e.g. derby).
                         -->
                         <forkMode>once</forkMode>
                     </configuration>

Modified: portals/jetspeed-2/trunk/components/portal-site/pom.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal-site/pom.xml?rev=385998&r1=385997&r2=385998&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal-site/pom.xml (original)
+++ portals/jetspeed-2/trunk/components/portal-site/pom.xml Tue Mar 14 23:55:00 2006
@@ -91,7 +91,7 @@
                         <phase>generate-test-resources</phase>
                         <configuration>
                             <tasks>
-                                <ant target="testdata" antfile="build.xml" dir="${basedir}" inheritall="off"/>
+                                <ant target="testdata" antfile="build.xml" dir="${basedir}" inheritAll="off"/>
                             </tasks>
                         </configuration>
                         <goals>

Modified: portals/jetspeed-2/trunk/etc/build.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/build.xml?rev=385998&r1=385997&r2=385998&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/etc/build.xml (original)
+++ portals/jetspeed-2/trunk/etc/build.xml Tue Mar 14 23:55:00 2006
@@ -27,6 +27,9 @@
     <property name="org.apache.jetspeed.database.driver" value=""/>
     <property name="org.apache.jetspeed.database.user" value=""/>
     <property name="org.apache.jetspeed.database.password" value=""/>
+    <property name="org.apache.derby.version" value=""/>
+    <property name="ant.version" value=""/>
+    <property name="hsqldb.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}"/>
@@ -61,8 +64,16 @@
         <echo message="    org.apache.jetspeed.database.driver=${org.apache.jetspeed.database.driver}"/>
         <echo message="    org.apache.jetspeed.database.user=${org.apache.jetspeed.database.user}"/>
         <echo message="    org.apache.jetspeed.database.password=${org.apache.jetspeed.database.password}"/>
+        <echo message="    org.apache.derby.version=${org.apache.derby.version}"/>
+        <echo message="    ant.version=${ant.version}"/>
+        <echo message="    hsqldb.version=${hsqldb.version}"/>
     </target>
 
+    <!-- Additional Task Definitions -->
+
+    <taskdef name="torque-sql" classname="org.apache.torque.task.TorqueSQLTask"/>
+    <taskdef resource="org/apache/maven/artifact/ant/antlib.xml"/>
+
     <!-- Schema Generation -->
 
     <target name="schema" depends="test-database-default-name, test-database-filter-drops">
@@ -71,7 +82,7 @@
         <mkdir dir="${org.apache.jetspeed.database.target.sql}"/>
 
         <!-- copy general sql -->
-        <copy todir="${org.apache.jetspeed.database.target.sql}" overwrite="true" verbose="true" failonerror="false">
+        <copy todir="${org.apache.jetspeed.database.target.sql}" overwrite="on" verbose="on" failonerror="off">
             <fileset dir="${org.apache.jetspeed.source.sql}">
                 <include name="*.sql"/>
             </fileset>
@@ -90,7 +101,7 @@
         <antcall target="schema-filter-drops"/>
 
         <!-- copy custom/override generated sql -->
-        <copy todir="${org.apache.jetspeed.database.target.sql}" overwrite="true" verbose="true" failonerror="false">
+        <copy todir="${org.apache.jetspeed.database.target.sql}" overwrite="on" verbose="on" failonerror="off">
             <fileset dir="${org.apache.jetspeed.database.source.sql}">
                 <include name="**/*.sql"/>
             </fileset>
@@ -186,9 +197,7 @@
 
     </target>
 
-    <!-- Torque tasks taken from build-torque.xml in the Torque Generator distribution -->
-
-    <taskdef name="torque-sql" classname="org.apache.torque.task.TorqueSQLTask"/>
+    <!-- Torque targets taken from build-torque.xml in the Torque Generator distribution -->
 
     <target name="check-use-classpath">
         <condition property="torque.internal.useClasspath">
@@ -248,21 +257,21 @@
     <target name="populate-db" depends="populate-skip" unless="org.apache.jetspeed.skip">
 
         <!-- execute drop scripts -->
-        <antcall target="sql-execute">
+        <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"/>
             <param name="database.arg.onerror" value="continue"/>
         </antcall>
 
         <!-- execute schema scripts -->
-        <antcall target="sql-execute">
+        <antcall target="sql-execute" inheritall="on" inheritrefs="on">
             <param name="database.arg.scripts.dir" value="${org.apache.jetspeed.database.target.sql}/schema"/>
             <param name="database.arg.scripts" value="*.sql"/>
             <param name="database.arg.onerror" value="abort"/>
         </antcall>
 
         <!-- execute default population scripts -->
-        <antcall target="sql-execute">
+        <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"/>
@@ -273,7 +282,7 @@
     <target name="populate-db-userinfo" depends="populate-db" unless="org.apache.jetspeed.skip">
 
         <!-- execute default userinfo population scripts -->
-        <antcall target="sql-execute">
+        <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"/>
@@ -287,11 +296,115 @@
         </condition>
     </target>
 
-    <target name="sql-execute">
+    <target name="sql-execute" depends="sql-test-database-classpath, sql-execute-drivers-path, sql-execute-derby, sql-execute-hsql"/>
+
+    <target name="sql-test-database-classpath">
+        <condition property="org.apache.jetspeed.database.use.drivers.path">
+            <and>
+                <not><equals arg1="${org.apache.jetspeed.database.jdbc.drivers.path}" arg2=""/></not>
+                <not><equals arg1="${org.apache.jetspeed.database.default.name}" arg2="derby"/></not>
+                <not><equals arg1="${org.apache.jetspeed.database.default.name}" arg2="hsql"/></not>
+            </and>
+        </condition>
+        <condition property="org.apache.jetspeed.database.is.derby.embedded">
+            <and>
+                <equals arg1="${org.apache.jetspeed.database.default.name}" arg2="derby"/>
+                <equals arg1="${org.apache.jetspeed.database.jdbc.drivers.path}" arg2=""/>
+            </and>
+        </condition>
+        <condition property="org.apache.jetspeed.database.is.hsql.embedded">
+            <and>
+                <equals arg1="${org.apache.jetspeed.database.default.name}" arg2="hsql"/>
+                <equals arg1="${org.apache.jetspeed.database.jdbc.drivers.path}" arg2=""/>
+            </and>
+        </condition>
+    </target>
+
+    <target name="sql-execute-drivers-path" if="org.apache.jetspeed.database.use.drivers.path">
         <sql url="${org.apache.jetspeed.database.url}"
              classpath="${org.apache.jetspeed.database.jdbc.drivers.path}" driver="${org.apache.jetspeed.database.driver}" 
              userid="${org.apache.jetspeed.database.user}" password="${org.apache.jetspeed.database.password}"
              onerror="${database.arg.onerror}">
+            <fileset dir="${database.arg.scripts.dir}"> 
+                <include name="${database.arg.scripts}"/>
+            </fileset> 
+        </sql>
+    </target>
+
+    <target name="sql-execute-derby" if="org.apache.jetspeed.database.is.derby.embedded">
+        <!--
+            Because tests may be executed in forked JVM processes
+            following the execution of this task, the Derby database
+            operations must also be executed in a forked ant task.
+            This is done to prevent the main Maven build process, (in
+            which this Ant build is running), from locking the Derby
+            database instance in its JVM context and this preventing
+            the subsequent test database access in forked JVMs.
+        -->
+        <!-- write out temporary ant build file for forked execution -->
+        <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}" 
+                         userid="${org.apache.jetspeed.database.user}" password="${org.apache.jetspeed.database.password}"
+                         onerror="${database.arg.onerror}"&gt;
+                        &lt;fileset dir="${database.arg.scripts.dir}"&gt; 
+                            &lt;include name="${database.arg.scripts}"/&gt;
+                        &lt;/fileset&gt; 
+                    &lt;/sql&gt;
+                &lt;/target&gt;
+            &lt;/project&gt;
+        </echo>
+        <!-- get derby and ant dependencies for fork -->
+        <dependencies filesetId="derby.embedded.db.dependencies.id" useScope="runtime">
+            <dependency groupId="org.apache.derby"
+                        artifactId="derby"
+                        version="${org.apache.derby.version}"/>
+        </dependencies>
+        <dependencies filesetId="ant.dependencies.id" useScope="runtime">
+            <dependency groupId="ant"
+                        artifactId="ant"
+                        version="${ant.version}"/>
+            <dependency groupId="ant"
+                        artifactId="ant-launcher"
+                        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}">
+            <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"/>
+        </java>
+        <!-- cleanup temporary ant build file -->
+        <delete file="${basedir}/derby-sql-build.xml"/>
+    </target>
+
+    <target name="sql-execute-hsql" if="org.apache.jetspeed.database.is.hsql.embedded">
+        <!--
+            Because tests may be executed in forked JVM processes
+            following the execution of this task, the HSQLDB database
+            must be shutdown when access is complete. The 'shutdown=true'
+            option should appear on the connection url to ensure this
+            behavior here and for the tests. This is done to prevent
+            the main Maven build process, (in which this Ant build is
+            running), from locking the HSQLDB database instance in its
+            JVM context and this preventing the subsequent test database
+            access in forked JVMs.
+        -->
+        <!-- execute specified sql scripts -->
+        <dependencies filesetId="hsql.embedded.db.dependencies.id" useScope="runtime">
+            <dependency groupId="hsqldb"
+                        artifactId="hsqldb"
+                        version="${hsqldb.version}"/>
+        </dependencies>
+        <sql url="${org.apache.jetspeed.database.url}" driver="${org.apache.jetspeed.database.driver}" 
+             userid="${org.apache.jetspeed.database.user}" password="${org.apache.jetspeed.database.password}"
+             onerror="${database.arg.onerror}">
+            <classpath>
+                <fileset refid="hsql.embedded.db.dependencies.id"/>
+            </classpath>
             <fileset dir="${database.arg.scripts.dir}"> 
                 <include name="${database.arg.scripts}"/>
             </fileset> 

Modified: portals/jetspeed-2/trunk/etc/pom.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/pom.xml?rev=385998&r1=385997&r2=385998&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/etc/pom.xml (original)
+++ portals/jetspeed-2/trunk/etc/pom.xml Tue Mar 14 23:55:00 2006
@@ -40,6 +40,34 @@
         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>
@@ -57,7 +85,7 @@
                         <phase>compile</phase>
                         <configuration>
                             <tasks>
-                                <ant target="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>
@@ -74,7 +102,7 @@
                         <phase>generate-test-resources</phase>
                         <configuration>
                             <tasks>
-                                <ant target="populate-db" antfile="build.xml" dir="${basedir}" inheritall="off">
+                                <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"
@@ -89,6 +117,12 @@
                                               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>
@@ -103,7 +137,7 @@
                         <phase>install</phase>
                         <configuration>
                             <tasks>
-                                <ant target="populate-db-userinfo" antfile="build.xml" dir="${basedir}" inheritall="off">
+                                <ant target="populate-db-userinfo" 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"
@@ -118,6 +152,12 @@
                                               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>
@@ -176,6 +216,11 @@
                         <groupId>torque</groupId>
                         <artifactId>torque-gen-templates</artifactId>
                         <version>${torque.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.maven</groupId>
+                        <artifactId>maven-artifact-ant</artifactId>
+                        <version>${org.apache.maven.artifact.ant.version}</version>
                     </dependency>
                 </dependencies>
             </plugin>

Modified: portals/jetspeed-2/trunk/pom.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/pom.xml?rev=385998&r1=385997&r2=385998&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/pom.xml (original)
+++ portals/jetspeed-2/trunk/pom.xml Tue Mar 14 23:55:00 2006
@@ -40,13 +40,13 @@
 
     <profiles>
 
-        <!-- Test Profile -->
+        <!-- Test Profiles -->
         <profile>
             <id>test</id>
             <activation>
                 <property>
-                    <name>env</name>
-                    <value>test</value>
+                    <name>maven.test.skip</name>
+                    <value>false</value>
                 </property>
             </activation>
             <properties>
@@ -58,12 +58,6 @@
         <!-- Tomcat Production Profile -->
         <profile>
             <id>tomcat</id>
-            <activation>
-                <property>
-                    <name>deploy</name>
-                    <value>tomcat</value>
-                </property>
-            </activation>
             <properties>
                 <org.apache.jetspeed.env.skip.production>false</org.apache.jetspeed.env.skip.production>
                 <org.apache.jetspeed.env.deploy.target>tomcat</org.apache.jetspeed.env.deploy.target>
@@ -87,10 +81,10 @@
         <aopalliance.version>1.0</aopalliance.version>
         <castor.version>0.9.4.3</castor.version>
         <cglib.version>2.0.2</cglib.version>
-        <commons-beanutils.version>1.6.1</commons-beanutils.version>
+        <commons-beanutils.version>1.7.0</commons-beanutils.version>
         <commons-codec.version>1.3</commons-codec.version>
         <commons-collections.version>3.0</commons-collections.version>
-        <commons-configuration.version>1.0</commons-configuration.version>
+        <commons-configuration.version>1.1</commons-configuration.version>
         <commons-dbcp.version>1.2.1</commons-dbcp.version>
         <commons-digester.version>1.5</commons-digester.version>
         <commons-fileupload.version>1.0</commons-fileupload.version>
@@ -100,6 +94,7 @@
         <commons-logging.version>1.0.3</commons-logging.version>
         <commons-pool.version>1.2</commons-pool.version>
         <directory.version>0.9.3</directory.version>      
+        <hsqldb.version>1.8.0.2</hsqldb.version>
         <javax.activation.version>1.0.2</javax.activation.version>
         <javax.mail.version>1.3.3</javax.mail.version>
         <javax.servlet.jstl.version>1.0.6</javax.servlet.jstl.version>
@@ -469,52 +464,6 @@
                 <groupId>commons-configuration</groupId>
                 <artifactId>commons-configuration</artifactId>
                 <version>${commons-configuration.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>junit-addons</groupId>
-                        <artifactId>junit-addons</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>junit</groupId>
-                        <artifactId>junit</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>dbunit</groupId>
-                        <artifactId>dbunit</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>hsqldb</groupId>
-                        <artifactId>hsqldb</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>spice</groupId>
-                        <artifactId>spice-jndikit</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>dom4j</groupId>
-                        <artifactId>dom4j</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>commons-pool</groupId>
-                        <artifactId>commons-pool</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>commons-dbcp</groupId>
-                        <artifactId>commons-dbcp</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>xerces</groupId>
-                        <artifactId>xerces</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>xml-apis</groupId>
-                        <artifactId>xml-apis</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>resources</groupId>
-                        <artifactId>resources</artifactId>
-                    </exclusion>
-                </exclusions>
             </dependency>
             <dependency>
                 <groupId>commons-lang</groupId>
@@ -666,6 +615,11 @@
                 <groupId>org.apache.derby</groupId>
                 <artifactId>derby</artifactId>
                 <version>${org.apache.derby.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>hsqldb</groupId>
+                <artifactId>hsqldb</artifactId>
+                <version>${hsqldb.version}</version>
             </dependency>
 
             <!-- LDAP -->

Modified: portals/jetspeed-2/trunk/settings.xml.sample
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/settings.xml.sample?rev=385998&r1=385997&r2=385998&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/settings.xml.sample (original)
+++ portals/jetspeed-2/trunk/settings.xml.sample Tue Mar 14 23:55:00 2006
@@ -23,13 +23,6 @@
     This file is placed in ~/.m2 by convention. User defined
     profiles must be defined or extended with these settings
     to perform a complete J2 build and deployment.
-
-    If you have redefined the location of the Maven repository,
-    (via configuration in $MAVEN_HOME/conf for example), one
-    must still have a copy of the settings.xml file in either
-    ~/.m2 or ~/.ant that defines the location of the actual
-    repository and this file for the Maven Ant tasks used by
-    this build.
 -->
 <settings xmlns="http://maven.apache.org/POM/4.0.0">
 
@@ -43,24 +36,58 @@
             </activation>
             <properties>
     
-                <!-- J2 Test DB Properties -->
-                <org.apache.jetspeed.test.jdbc.drivers.path>/usr/share/tomcat5/shared/lib/mysql-connector-java.jar</org.apache.jetspeed.test.jdbc.drivers.path>
-                <org.apache.jetspeed.test.database.default.name>mysql</org.apache.jetspeed.test.database.default.name>
-                <org.apache.jetspeed.test.database.url>jdbc:mysql://localhost/j2test</org.apache.jetspeed.test.database.url>
-                <org.apache.jetspeed.test.database.driver>com.mysql.jdbc.Driver</org.apache.jetspeed.test.database.driver>
-                <org.apache.jetspeed.test.database.user>tomcat4</org.apache.jetspeed.test.database.user>
+                <!-- MSSQL database properties -->
+
+                <org.apache.jetspeed.test.jdbc.drivers.path>${org.apache.jetspeed.server.home}/shared/lib/jtds-1.2.jar</org.apache.jetspeed.test.jdbc.drivers.path>
+                <org.apache.jetspeed.test.database.default.name>mssql</org.apache.jetspeed.test.database.default.name>
+                <org.apache.jetspeed.test.database.url>jdbc:jtds:sqlserver://localhost:1433/j2test</org.apache.jetspeed.test.database.url>
+                <org.apache.jetspeed.test.database.driver>net.sourceforge.jtds.jdbc.Driver</org.apache.jetspeed.test.database.driver>
+                <org.apache.jetspeed.test.database.user>sa</org.apache.jetspeed.test.database.user>
+                <org.apache.jetspeed.test.database.password>sa</org.apache.jetspeed.test.database.password>
+                <org.apache.jetspeed.production.jdbc.drivers.path>${org.apache.jetspeed.server.home}/shared/lib/jtds-1.2.jar</org.apache.jetspeed.production.jdbc.drivers.path>
+                <org.apache.jetspeed.production.database.default.name>mssql</org.apache.jetspeed.production.database.default.name>
+                <org.apache.jetspeed.production.database.url>jdbc:jtds:sqlserver://localhost:1433/j2</org.apache.jetspeed.production.database.url>
+                <org.apache.jetspeed.production.database.driver>net.sourceforge.jtds.jdbc.Driver</org.apache.jetspeed.production.database.driver>
+                <org.apache.jetspeed.production.database.user>sa</org.apache.jetspeed.production.database.user>
+                <org.apache.jetspeed.production.database.password>sa</org.apache.jetspeed.production.database.password>
+
+                <!-- Derby embedded database properties -->
+
+                <!--
+                <org.apache.jetspeed.test.jdbc.drivers.path></org.apache.jetspeed.test.jdbc.drivers.path>
+                <org.apache.jetspeed.test.database.default.name>derby</org.apache.jetspeed.test.database.default.name>
+                <org.apache.jetspeed.test.database.url>jdbc:derby:/tmp/j2test</org.apache.jetspeed.test.database.url>
+                <org.apache.jetspeed.test.database.driver>org.apache.derby.jdbc.EmbeddedDriver</org.apache.jetspeed.test.database.driver>
+                <org.apache.jetspeed.test.database.user></org.apache.jetspeed.test.database.user>
                 <org.apache.jetspeed.test.database.password></org.apache.jetspeed.test.database.password>
-    
-                <!-- J2 Production DB Properties -->
-                <org.apache.jetspeed.production.jdbc.drivers.path>/usr/share/tomcat5/shared/lib/mysql-connector-java.jar</org.apache.jetspeed.production.jdbc.drivers.path>
-                <org.apache.jetspeed.production.database.default.name>mysql</org.apache.jetspeed.production.database.default.name>
-                <org.apache.jetspeed.production.database.url>jdbc:mysql://localhost/j2</org.apache.jetspeed.production.database.url>
-                <org.apache.jetspeed.production.database.driver>com.mysql.jdbc.Driver</org.apache.jetspeed.production.database.driver>
-                <org.apache.jetspeed.production.database.user>tomcat4</org.apache.jetspeed.production.database.user>
+                <org.apache.jetspeed.production.jdbc.drivers.path></org.apache.jetspeed.production.jdbc.drivers.path>
+                <org.apache.jetspeed.production.database.default.name>derby</org.apache.jetspeed.production.database.default.name>
+                <org.apache.jetspeed.production.database.url>jdbc:derby:/tmp/j2</org.apache.jetspeed.production.database.url>
+                <org.apache.jetspeed.production.database.driver>org.apache.derby.jdbc.EmbeddedDriver</org.apache.jetspeed.production.database.driver>
+                <org.apache.jetspeed.production.database.user></org.apache.jetspeed.production.database.user>
+                <org.apache.jetspeed.production.database.password></org.apache.jetspeed.production.database.password>
+                -->
+
+                <!-- HSQLDB embedded database properties -->
+
+                <!--
+                <org.apache.jetspeed.test.jdbc.drivers.path></org.apache.jetspeed.test.jdbc.drivers.path>
+                <org.apache.jetspeed.test.database.default.name>hsql</org.apache.jetspeed.test.database.default.name>
+                <org.apache.jetspeed.test.database.url>jdbc:hsqldb:file:/tmp/j2test;shutdown=true</org.apache.jetspeed.test.database.url>
+                <org.apache.jetspeed.test.database.driver>org.hsqldb.jdbcDriver</org.apache.jetspeed.test.database.driver>
+                <org.apache.jetspeed.test.database.user>sa</org.apache.jetspeed.test.database.user>
+                <org.apache.jetspeed.test.database.password></org.apache.jetspeed.test.database.password>
+                <org.apache.jetspeed.production.jdbc.drivers.path></org.apache.jetspeed.production.jdbc.drivers.path>
+                <org.apache.jetspeed.production.database.default.name>hsql</org.apache.jetspeed.production.database.default.name>
+                <org.apache.jetspeed.production.database.url>jdbc:hsqldb:file:/tmp/j2;shutdown=true</org.apache.jetspeed.production.database.url>
+                <org.apache.jetspeed.production.database.driver>org.hsqldb.jdbcDriver</org.apache.jetspeed.production.database.driver>
+                <org.apache.jetspeed.production.database.user>sa</org.apache.jetspeed.production.database.user>
                 <org.apache.jetspeed.production.database.password></org.apache.jetspeed.production.database.password>
+                -->
     
-                <!-- J2 Deployment Properties -->
-                <org.apache.jetspeed.server.home>/usr/share/tomcat5</org.apache.jetspeed.server.home>
+                <!-- Jetspeed-2 deployment properties -->
+
+                <org.apache.jetspeed.server.home>c:/Program Files/Apache Software Foundation/Tomcat 5.5</org.apache.jetspeed.server.home>
                 <org.apache.jetspeed.catalina.version.major>5.5</org.apache.jetspeed.catalina.version.major>
                 <org.apache.jetspeed.services.autodeployment.server>localhost</org.apache.jetspeed.services.autodeployment.server>
                 <org.apache.jetspeed.services.autodeployment.port>8080</org.apache.jetspeed.services.autodeployment.port>
@@ -71,5 +98,25 @@
         </profile>
 
     </profiles>
+
+    <activeProfiles>
+
+        <!-- Drivers path configured database profile -->
+
+        <activeProfile>jetspeed-db-drivers-path</activeProfile>
+
+        <!-- Derby embedded database properties -->
+
+        <!--
+        <activeProfile>jetspeed-db-embedded-derby</activeProfile>
+        -->
+
+        <!-- HSQLDB embedded database profile -->
+
+        <!--
+        <activeProfile>jetspeed-db-embedded-hsql</activeProfile>
+        -->
+
+    </activeProfiles>
 
 </settings>



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