db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r919537 - in /db/torque/torque4/trunk/torque-test: pom.xml profiles.xml
Date Fri, 05 Mar 2010 18:42:23 GMT
Author: tfischer
Date: Fri Mar  5 18:42:23 2010
New Revision: 919537

URL: http://svn.apache.org/viewvc?rev=919537&view=rev
Log:
get test project running

Modified:
    db/torque/torque4/trunk/torque-test/pom.xml
    db/torque/torque4/trunk/torque-test/profiles.xml

Modified: db/torque/torque4/trunk/torque-test/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/pom.xml?rev=919537&r1=919536&r2=919537&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/pom.xml (original)
+++ db/torque/torque4/trunk/torque-test/pom.xml Fri Mar  5 18:42:23 2010
@@ -46,17 +46,8 @@
       <groupId>org.apache.torque</groupId>
       <version>${project.version}</version>
     </dependency>
-    <dependency>
-      <!-- needed for SQLToAppDataRuntimeTest -->
-      <artifactId>torque-generator</artifactId>
-      <groupId>org.apache.torque</groupId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <artifactId>log4j</artifactId>
-      <groupId>log4j</groupId>
-      <version>1.2.8</version>
-    </dependency>
+
+    <!-- jndi -->
     <dependency>
       <artifactId>naming-common</artifactId>
       <groupId>tomcat</groupId>
@@ -69,12 +60,16 @@
       <version>5.0.28</version>
       <scope>test</scope>
     </dependency>
+
+    <!--  db driver -->
     <dependency>
       <artifactId>${torque.test.driver.artifactId}</artifactId>
       <groupId>${torque.test.driver.groupId}</groupId>
       <version>${torque.test.driver.version}</version>
       <scope>test</scope>
     </dependency>
+
+    <!-- avalon -->
     <dependency>
       <groupId>avalon-framework</groupId>
       <artifactId>avalon-framework-impl</artifactId>
@@ -123,6 +118,8 @@
                 <copy todir="target/torque/test/schema">
                   <fileset dir="src/main/schema">
                     <include name="*" />
+                    <!-- TODO: remove exclude once external schemata are implemented -->
+                    <exclude name="ext*schema.xml" />
                   </fileset>
                   <filterset>
                     <filter token="DATABASE_DEFAULT" value="bookstore"/>
@@ -144,57 +141,127 @@
 
       <plugin>
         <groupId>org.apache.torque</groupId>
-        <artifactId>torque-maven-plugin</artifactId>
+        <artifactId>maven-torque-generator-plugin</artifactId>
         <version>${project.version}</version>
-        <configuration>
-          <schemaDir>target/torque/test/schema</schemaDir>
-          <targetDatabase>${torque.targetDatabase}</targetDatabase>
-          <targetPackage>org.apache.torque.test</targetPackage>
-          <useManagers>${torque.useManagers}</useManagers>
-          <generateBeans>${torque.generateBeans}</generateBeans>
-          <runOnlyOnSchemaChange>false</runOnlyOnSchemaChange>
-          <driver>${torque.driver}</driver>
-          <url>${torque.database.url}</url>
-          <user>${torque.database.user}</user>
-          <password>${torque.database.password}</password>
-          <projectName>bookstore</projectName>
-        </configuration>
         <executions>
           <execution>
+            <id>generate-sources</id>
             <phase>generate-sources</phase>
-            <id>om</id>
             <goals>
-              <goal>om</goal>
-              <goal>sql</goal>
-              <goal>id-table-init-sql</goal>
-              <goal>sqlExec</goal>
-              <goal>documentation</goal>
+              <goal>generate</goal>
             </goals>
+            <configuration>
+              <packaging>classpath</packaging>
+              <configPackage>org.apache.torque.templates.om</configPackage>
+              <sourceDir>target/torque/test/schema</sourceDir>
+              <overrideConfigDir>src/main/torque-gf</overrideConfigDir>
+              <options>
+                <torque.om.package>org.apache.torque.test</torque.om.package>
+                <torque.database>${torque.targetDatabase}</torque.database>
+              </options>
+            </configuration>
+          </execution>
+          <execution>
+            <id>generate-sql</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <packaging>classpath</packaging>
+              <configPackage>org.apache.torque.templates.sql</configPackage>
+              <sourceDir>target/torque/test/schema</sourceDir>
+              <newFileTargetDir>target/generated-sql</newFileTargetDir>
+              <compileNewFileTargetDir>false</compileNewFileTargetDir>
+              <compileModifiedFileTargetDir>false</compileModifiedFileTargetDir>
+              <loglevel>info</loglevel>
+              <options>
+                <torque.database>${torque.targetDatabase}</torque.database>
+              </options>
+            </configuration>
+          </execution>
+          <execution>
+            <id>generate-html-doc</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <packaging>classpath</packaging>
+              <configPackage>org.apache.torque.templates.doc.html</configPackage>
+              <sourceDir>target/torque/test/schema</sourceDir>
+              <newFileTargetDir>target/generated-docs</newFileTargetDir>
+              <compileNewFileTargetDir>false</compileNewFileTargetDir>
+              <compileModifiedFileTargetDir>false</compileModifiedFileTargetDir>
+              <options>
+                <torque.database>${torque.targetDatabase}</torque.database>
+                <torque.om.package>org.apache.torque.test</torque.om.package>
+              </options>
+            </configuration>
           </execution>
           <execution>
-            <phase>test</phase>
-            <id>data</id>
+            <id>generate-xdoc</id>
+            <phase>pre-site</phase>
             <goals>
-              <goal>datadtd</goal>
-              <goal>datadump</goal>
-              <goal>datasql</goal>
+              <goal>generate</goal>
             </goals>
             <configuration>
-              <xmlFile>target/torque/test/schema/bookstore-schema.xml</xmlFile>
-              <dataXmlFile>target/data/torque/bookstore-bookstore-all-data.xml</dataXmlFile>
-              <dataDtd>target/data/torque/bookstore-data.dtd</dataDtd>
+              <packaging>classpath</packaging>
+              <configPackage>org.apache.torque.templates.doc.xdoc</configPackage>
+              <sourceDir>target/torque/test/schema</sourceDir>
+              <newFileTargetDir>target/generated-xdocs</newFileTargetDir>
+              <compileNewFileTargetDir>false</compileNewFileTargetDir>
+              <options>
+                <torque.database>${torque.targetDatabase}</torque.database>
+                <torque.om.package>org.apache.torque.test</torque.om.package>
+              </options>
+            </configuration>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.torque</groupId>
+            <artifactId>torque-templates</artifactId>
+            <version>${project.version}</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>sql-maven-plugin</artifactId>
+        <version>1.4</version>
+        <executions>
+          <execution>
+            <id>execute-generated-sql</id>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>execute</goal>
+            </goals>
+            <configuration>
+              <driver>${torque.driver}</driver>
+              <url>${torque.database.url}</url>
+              <username>${torque.database.user}</username>
+              <password>${torque.database.password}</password>
+              <onError>continue</onError>
+              <fileset>
+                <basedir>${basedir}/target/generated-sql</basedir>
+                <includes>
+                  <include>*.sql</include>
+                </includes>
+              </fileset>
             </configuration>
           </execution>
         </executions>
         <dependencies>
           <dependency>
-            <artifactId>${torque.test.driver.artifactId}</artifactId>
             <groupId>${torque.test.driver.groupId}</groupId>
+            <artifactId>${torque.test.driver.artifactId}</artifactId>
             <version>${torque.test.driver.version}</version>
           </dependency>
         </dependencies>
       </plugin>
-      
+
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
@@ -221,14 +288,28 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
           <testIncludes>
             <include>**/*Test.java</include>
             <include>**/*TestCase.java</include>
             <include>**/${torque.test.include.beans}</include>
             <include>**/${torque.test.include.managers}</include>
           </testIncludes>
+          <!-- TODO: remove testExcludes once SQLToAppDataRuntimeTest works -->
+          <testExcludes>
+            <exclude>**/SQLToAppDataRuntimeTest.java</exclude>
+          </testExcludes>
         </configuration>
-      </plugin>      
+      </plugin>
+
+      <plugin>
+        <artifactId>maven-site-plugin</artifactId>
+        <groupId>org.apache.maven.plugins</groupId>
+        <configuration>
+          <xdocDirectory>target/generated-xdocs</xdocDirectory>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>

Modified: db/torque/torque4/trunk/torque-test/profiles.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/profiles.xml?rev=919537&r1=919536&r2=919537&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/profiles.xml (original)
+++ db/torque/torque4/trunk/torque-test/profiles.xml Fri Mar  5 18:42:23 2010
@@ -119,17 +119,18 @@
       <activation>
         <activeByDefault>false</activeByDefault>
       </activation>
-      <properties>
-        <torque.test.profileDirectory>mysql</torque.test.profileDirectory>
-        <torque.test.idmethod>idbroker</torque.test.idmethod>
-        <torque.test.driver.artifactId>mysql-connector-java</torque.test.driver.artifactId>
-        <torque.test.driver.groupId>mysql</torque.test.driver.groupId>
+      <properties>
+        <torque.test.profileDirectory>mysql</torque.test.profileDirectory>
+        <torque.test.idmethod>native</torque.test.idmethod>
+        <torque.test.driver.artifactId>mysql-connector-java</torque.test.driver.artifactId>
+        <torque.test.driver.groupId>mysql</torque.test.driver.groupId>
         <torque.test.driver.version>5.0.4</torque.test.driver.version>
-        <torque.driver>org.gjt.mm.mysql.Driver</torque.driver>
-        <torque.targetDatabase>mysql</torque.targetDatabase>
-        <torque.database.url>jdbc:mysql://localhost:3306/bookstore</torque.database.url>
-        <torque.database.user>root</torque.database.user>
-        <torque.database.password></torque.database.password>
+        <torque.generateBeans>true</torque.generateBeans>
+        <torque.driver>org.gjt.mm.mysql.Driver</torque.driver>
+        <torque.targetDatabase>mysql</torque.targetDatabase>
+        <torque.database.url>jdbc:mysql://localhost:3306/bookstore</torque.database.url>
+        <torque.database.user>root</torque.database.user>
+        <torque.database.password></torque.database.password>
       </properties>
     </profile>
     



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message