taylor      2005/05/23 19:36:23

  Modified:    maven-plugin plugin.jelly maven.xml
  Log:
  just found this one on Fusion:
  maven plugin needs to run the drop.sql or we get db fk constraint errors on 
second run of db creation
  
  Revision  Changes    Path
  1.34      +12 -0     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.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- plugin.jelly      24 May 2005 01:28:09 -0000      1.33
  +++ plugin.jelly      24 May 2005 02:36:23 -0000      1.34
  @@ -87,6 +87,18 @@
        <echo>*************************************</echo>
       <echo>*   Executing standard SQL scripts   *</echo>
       <echo>*************************************</echo>
  +
  +    <!-- Run standard DB-specific Drops -->    
  +    <util:file 
name="${org.apache.jetspeed.plugin.root}/plugin-resources/${org.apache.jetspeed.production.database.default.name}/drop"
 var="sqlSrcDir"/>
  +    <j:if test="${sqlSrcDir.exists()}">
  +      <j:forEach items="${sqlSrcDir.listFiles()}" var="sqlFile">
  +        <j:if test="${sqlFile.name.endsWith('.sql')}">
  +          <j:set var="database.arg.script" value="${sqlFile.absolutePath}" />
  +          <attainGoal name="jetspeed2:db.execute" />
  +        </j:if>
  +      </j:forEach>
  +    </j:if>
  +    
       <!-- Run standard DB-specific SQL scripts -->
       <util:file 
name="${org.apache.jetspeed.plugin.root}/plugin-resources/${org.apache.jetspeed.production.database.default.name}"
 var="sqlSrcDir"/>
       <j:if test="${sqlSrcDir.exists()}">
  
  
  
  1.15      +21 -3     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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- maven.xml 31 Mar 2005 14:07:14 -0000      1.14
  +++ maven.xml 24 May 2005 02:36:23 -0000      1.15
  @@ -67,7 +67,7 @@
            prereq
       -->    
       <maven:installPlugin file="${maven.build.dir}/${maven.final.name}.jar" 
cache="true" />
  -    <artifact:install artifact="${maven.build.dir}/${maven.final.name}.jar" 
type="plugin" project="${pom}"/>
  +      <artifact:install 
artifact="${maven.build.dir}/${maven.final.name}.jar" type="plugin" 
project="${pom}"/>
       <unjar src="${maven.build.dir}/${maven.final.name}.jar" 
dest="${maven.home.local}/plugins/${maven.final.name}" overwrite="true" />
   
     </goal>
  @@ -88,11 +88,29 @@
        
        <copy todir="target/classes/plugin-resources/" overwrite="true" 
failonerror="true">
            <fileset dir="../target/src/sql" />   
  -         <fileset dir="../src/sql" >
  +         <fileset dir="../src/sql/" >
                 <include name="*.sql" />
            </fileset>                                 
        </copy>
   
  +     <copy todir="target/classes/plugin-resources/hsql/drop/" 
overwrite="true" failonerror="true">
  +         <fileset dir="../src/sql/hsql/" >
  +              <include name="drop.sql" />
  +         </fileset>                                 
  +    </copy>         
  +
  +     <copy todir="target/classes/plugin-resources/mysql/drop/" 
overwrite="true" failonerror="true">                 
  +         <fileset dir="../src/sql/mysql/" >
  +              <include name="drop.sql" />
  +         </fileset>                       
  +    </copy>
  +    
  +     <copy todir="target/classes/plugin-resources/oracle/drop/" 
overwrite="true" failonerror="true">                                
  +         <fileset dir="../src/sql/oracle/" >
  +              <include name="drop.sql" />
  +         </fileset>                                          
  +    </copy>
  +
       <util:file name="${basedir}/../src/sql" var="sqlSrcDir"/>
       <j:forEach items="${sqlSrcDir.listFiles()}" var="sqlSrcDirFile">
         <util:file 
name="${basedir}/../src/sql/${sqlSrcDirFile.name}/populate-userinfo-for-default-psml.sql"
 var="dbSpecificPopulateScript"/>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to