[jbpm-commits] JBoss JBPM SVN: r5479 - in jbpm4/tags/jbpm-4.0/modules/db: scripts and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Aug 14 01:01:17 EDT 2009


Author: alex.guizar at jboss.com
Date: 2009-08-14 01:01:17 -0400 (Fri, 14 Aug 2009)
New Revision: 5479

Modified:
   jbpm4/tags/jbpm-4.0/modules/db/pom.xml
   jbpm4/tags/jbpm-4.0/modules/db/scripts/antrun-schema.xml
Log:
[JBPM-1995] pack schema create/drop scripts in jbpm-db.jar

Modified: jbpm4/tags/jbpm-4.0/modules/db/pom.xml
===================================================================
--- jbpm4/tags/jbpm-4.0/modules/db/pom.xml	2009-08-14 01:57:23 UTC (rev 5478)
+++ jbpm4/tags/jbpm-4.0/modules/db/pom.xml	2009-08-14 05:01:17 UTC (rev 5479)
@@ -45,10 +45,6 @@
       <groupId>postgresql</groupId>
       <artifactId>postgresql</artifactId>
     </dependency>
-    <dependency>
-      <groupId>net.sourceforge.jtds</groupId>
-      <artifactId>jtds</artifactId>
-    </dependency>
   </dependencies>
 
   <build>
@@ -57,17 +53,15 @@
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
           <execution>
-            <id>create-db-schemas</id>
-            <phase>process-resources</phase>
+          	<id>create-drop-script</id>
+            <phase>generate-resources</phase>
             <goals>
               <goal>run</goal>
             </goals>
             <configuration>
               <tasks>
-                <property name="maven.runtime.classpath" refid="maven.runtime.classpath"/>
-                <ant antfile="scripts/antrun-schema.xml"
-                     target="create-schema">
-                </ant>
+                <property name="project.output.dir" value="${project.build.outputDirectory}"/>
+                <ant antfile="scripts/antrun-schema.xml" target="create-schema" inheritRefs="yes"/>
               </tasks>
             </configuration>
           </execution>
@@ -76,4 +70,4 @@
     </plugins>
   </build>
 
-</project>
\ No newline at end of file
+</project>

Modified: jbpm4/tags/jbpm-4.0/modules/db/scripts/antrun-schema.xml
===================================================================
--- jbpm4/tags/jbpm-4.0/modules/db/scripts/antrun-schema.xml	2009-08-14 01:57:23 UTC (rev 5478)
+++ jbpm4/tags/jbpm-4.0/modules/db/scripts/antrun-schema.xml	2009-08-14 05:01:17 UTC (rev 5479)
@@ -15,14 +15,11 @@
   <!-- ================================================================== -->
 
   <target name="create-schema">
-    <echo message="${maven.runtime.classpath}"/>
-
     <taskdef name="schemaexport"
-             classname="org.hibernate.tool.hbm2ddl.SchemaExportTask">
-      <classpath path="${maven.runtime.classpath}"/>
-    </taskdef>
+             classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
+             classpathref="maven.compile.classpath" />
 
-    <mkdir dir="target"/>
+    <mkdir dir="${project.output.dir}" />
 
     <!-- HsqlDB -->
     <create-ddl db="hsqldb"/>
@@ -30,7 +27,7 @@
     <!-- MySQL -->
     <create-ddl db="mysql"/>
     <!--TODO: https://jira.jboss.org/jira/browse/JBPM-2071 -->
-    <replace file="target/jbpm.mysql.create.sql" token="BLOB_VALUE_ blob" value="BLOB_VALUE_ longblob" />
+    <replace file="${project.output.dir}/jbpm.mysql.create.sql" token="BLOB_VALUE_ blob" value="BLOB_VALUE_ longblob" />
 
     <!-- Oracle -->
     <create-ddl db="oracle"/>
@@ -50,22 +47,20 @@
     <attribute name="db"/>
 
     <sequential>
-      <echo></echo>
       <echo>=====================</echo>
       <echo>Create DDL @{db}</echo>
       
-      <schemaexport output="target/jbpm.@{db}.create.sql"
+      <schemaexport output="${project.output.dir}/jbpm.@{db}.create.sql"
                     create="yes" drop="no"
                     config="src/main/config/@{db}.hibernate.cfg.xml"
                     text="yes" delimiter=";"
                     quiet="yes"/>
-      <schemaexport output="target/jbpm.@{db}.drop.sql"
+      <schemaexport output="${project.output.dir}/jbpm.@{db}.drop.sql"
                     create="no" drop="yes"
                     config="src/main/config/@{db}.hibernate.cfg.xml"
                     text="yes" delimiter=";"
                     quiet="yes"/>
 
-      <echo>Done.</echo>
       <echo>=====================</echo>
     </sequential>
   </macrodef>



More information about the jbpm-commits mailing list