geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r422286 - /geronimo/sandbox/svkmerge/m2migration/applications/uddi-db/pom.xml
Date Sat, 15 Jul 2006 20:06:00 GMT
Author: jdillon
Date: Sat Jul 15 13:05:59 2006
New Revision: 422286

URL: http://svn.apache.org/viewvc?rev=422286&view=rev
Log:
Use the sql-maven-plugin to setup the uddi database instead of antrun + sql task


Modified:
    geronimo/sandbox/svkmerge/m2migration/applications/uddi-db/pom.xml

Modified: geronimo/sandbox/svkmerge/m2migration/applications/uddi-db/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/applications/uddi-db/pom.xml?rev=422286&r1=422285&r2=422286&view=diff
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/applications/uddi-db/pom.xml (original)
+++ geronimo/sandbox/svkmerge/m2migration/applications/uddi-db/pom.xml Sat Jul 15 13:05:59
2006
@@ -45,6 +45,10 @@
         <url>http://svn.apache.org/repos/asf/geronimo/sandbox/svkmerge/m2migration/applications/uddi-db</url>
     </scm>
     
+    <properties>
+        <derby.system.home>${project.build.directory}/classes/META-INF/${pom.artifactId}/var/derby</derby.system.home>
+    </properties>
+    
     <build>
         <plugins>
             <plugin>
@@ -52,48 +56,25 @@
                 <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>setup-db</id>
+                        <id>prepare-db</id>
                         <phase>generate-resources</phase>
                         <goals>
                             <goal>run</goal>
                         </goals>
                         <configuration>
                             <tasks>
-                                <property name="derby.system.home" value="${project.build.directory}/classes/META-INF/${pom.artifactId}/var/derby"/>
-                                <property name="derby.storage.fileSyncTransactionLog"
value="true"/>
-                                
                                 <delete dir="${derby.system.home}"/>
                                 <mkdir dir="${derby.system.home}"/>
-                                
-                                <sql driver="org.apache.derby.jdbc.EmbeddedDriver"
-                                    url="jdbc:derby:${derby.system.home}/UddiDatabase;create=true"
-                                    userid=""
-                                    password=""
-                                    autocommit="true"
-                                    onerror="continue"
-                                    delimiter=";">
-                                    
-                                    <fileset dir="${pom.basedir}/src/sql"/>
-                                    
-                                    <!--
-                                    
-                                    HACK: Due to a rather annonying bug with antrun which
does not
-                                          pick up plugin dependencies properly when run from
the reactor
-                                          we have to go around the broken dependency system
and reference
-                                          the artifact directly.
-                                    
-                                    <classpath refid="maven.plugin.classpath"/>
-                                    -->
-                                    <classpath>
-                                        <fileset dir="${settings.localRepository}/org/apache/derby/derby/${derbyVersion}">
-                                            <include name="derby-${derbyVersion}.jar"
/>
-                                        </fileset>
-                                    </classpath>
-                                </sql>
                             </tasks>
                         </configuration>
                     </execution>
                 </executions>
+            </plugin>
+            
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>sql-maven-plugin</artifactId>
+                <version>1.0-beta-1-SNAPSHOT</version>
                 
                 <dependencies>
                     <dependency>
@@ -103,6 +84,28 @@
                         <version>${derbyVersion}</version>
                     </dependency>
                 </dependencies>
+                
+                <executions>
+                    <execution>
+                        <id>create-db</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
+                            <url>jdbc:derby:${derby.system.home}/UddiDatabase;create=true</url>
+                            <username>system</username>
+                            <password></password>
+                            <autocommit>true</autocommit>
+                            <onError>continue</onError>
+                            <delimiter>;</delimiter>
+                            <srcFiles>
+                                <srcFile>${pom.basedir}/src/sql/juddi.sql</srcFile>
+                            </srcFiles>
+                        </configuration>
+                    </execution>
+                </executions>
             </plugin>
         </plugins>
     </build>



Mime
View raw message