ate 2005/03/25 06:01:38
Modified: maven-plugin maven.xml plugin.jelly
Log:
Implemented execution of db specific populate-userinfo-for-default-psml.sql
script instead of default one.
Revision Changes Path
1.12 +13 -2 jakarta-jetspeed-2/maven-plugin/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/maven-plugin/maven.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- maven.xml 20 Dec 2004 15:13:44 -0000 1.11
+++ maven.xml 25 Mar 2005 14:01:38 -0000 1.12
@@ -17,7 +17,8 @@
xmlns:j="jelly:core"
xmlns:maven="jelly:maven"
xmlns:artifact="artifact"
- xmlns:ant="jelly:ant">
+ xmlns:ant="jelly:ant"
+ xmlns:util="jelly:util">
<preGoal name="java:jar-resources">
<copy todir="target/classes/plugin-resources/etc/project-dependencies"
overwrite="true" failonerror="true">
@@ -60,7 +61,7 @@
<goal name="undeploy-plugin">
<attainGoal name="plugin:uninstall-now" />
- <delete dir="${maven.home.local}/plugins/${maven.final.name}"
verbose="true" />
+ <delete dir="${maven.home.local}/plugins/${maven.final.name}"
verbose="false" />
</goal>
<goal name="copyDb">
@@ -78,6 +79,16 @@
<include name="*.sql" />
</fileset>
</copy>
+
+ <util:file name="../src/sql" var="sqlSrcDir"/>
+ <j:forEach items="${sqlSrcDir.listFiles()}" var="sqlSrcDirFile">
+ <available
file="../src/sql/${sqlSrcDirFile.name}/populate-userinfo-for-default-psml.sql"
property="populate.script.available"/>
+ <j:if test="${populate.script.available}">
+ <copy
file="../src/sql/${sqlSrcDirFile.name}/populate-userinfo-for-default-psml.sql"
toDir="target/classes/plugin-resources/${sqlSrcDirFile.name}/populate"/>
+ </j:if>
+ <j:remove var="populate.script.available"/>
+ </j:forEach>
+
<!--
<move file="${basedir}/target/classes/plugin-resources/Empty.script"
tofile="${basedir}/target/classes/plugin-resources/Production.script"
overwrite="true"/>
<echo>Initializing HSQL Production.script with basic portal
info.......</echo>
1.31 +10 -1 jakarta-jetspeed-2/maven-plugin/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/maven-plugin/plugin.jelly,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- plugin.jelly 23 Mar 2005 22:39:35 -0000 1.30
+++ plugin.jelly 25 Mar 2005 14:01:38 -0000 1.31
@@ -101,9 +101,18 @@
<!-- Run standard non-DB-specific SQL scripts -->
<util:file name="${org.apache.jetspeed.plugin.root}/plugin-resources"
var="sqlSrcDir"/>
<j:if test="${sqlSrcDir.exists()}">
+ <j:set var="db.src.dir"
value="${org.apache.jetspeed.plugin.root}/plugin-resources/${org.apache.jetspeed.production.database.default.name}"/>
+ <util:file
name="${db.src.dir}/populate/populate-userinfo-for-default-psml.sql"
var="dbSpecificPopulateScript"/>
<j:forEach items="${sqlSrcDir.listFiles()}" var="sqlFile">
<j:if test="${sqlFile.name.endsWith('.sql')}">
- <j:set var="database.arg.script" value="${sqlFile.absolutePath}" />
+ <j:choose>
+ <j:when
test="${sqlFile.name.equals('populate-userinfo-for-default-psml.sql') and
dbSpecificPopulateScript.exists()}">
+ <j:set var="database.arg.script"
value="${dbSpecificPopulateScript.absolutePath}"/>
+ </j:when>
+ <j:otherwise>
+ <j:set var="database.arg.script"
value="${sqlFile.absolutePath}" />
+ </j:otherwise>
+ </j:choose>
<attainGoal name="jetspeed2:db.execute" />
</j:if>
</j:forEach>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]