db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r420270 - in /db/torque/test/trunk/test-project: pom.xml profiles.xml
Date Sun, 09 Jul 2006 09:23:08 GMT
Author: tfischer
Date: Sun Jul  9 02:23:07 2006
New Revision: 420270

URL: http://svn.apache.org/viewvc?rev=420270&view=rev
Log:
Enabling multiple targetDatabases in the test for the maven2-plugin by using profiles

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

Modified: db/torque/test/trunk/test-project/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/test/trunk/test-project/pom.xml?rev=420270&r1=420269&r2=420270&view=diff
==============================================================================
--- db/torque/test/trunk/test-project/pom.xml (original)
+++ db/torque/test/trunk/test-project/pom.xml Sun Jul  9 02:23:07 2006
@@ -51,9 +51,9 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <artifactId>mysql-connector-java</artifactId>
-      <groupId>mysql</groupId>
-      <version>3.1.12</version>
+      <artifactId>${torque.test.driver.artifactId}</artifactId>
+      <groupId>${torque.test.driver.groupId}</groupId>
+      <version>${torque.test.driver.version}</version>
       <scope>test</scope>
     </dependency>
     
@@ -61,6 +61,14 @@
 
   <build>
     <testSourceDirectory>src/java</testSourceDirectory>
+    <testResources>
+      <testResource>
+        <directory>src/java</directory>
+        <includes>
+          <include>*.ccf</include>
+        </includes>
+      </testResource>
+    </testResources>
     <plugins>
       <plugin>
         <artifactId>maven-antrun-plugin</artifactId>
@@ -75,7 +83,7 @@
                   </fileset>
                   <filterset>
                     <filter token="DATABASE_DEFAULT" value="bookstore"/>
-                    <filter token="DATABASE_ID_METHOD" value="native"/> 
+                    <filter token="DATABASE_ID_METHOD" value="${torque.test.idmethod}"/>

                   </filterset>
                 </copy>
                 <delete dir="target/torque/test/sql" />
@@ -96,14 +104,15 @@
         <artifactId>torque-maven-plugin</artifactId>
         <configuration>
           <schemaDir>target/torque/test/schema</schemaDir>
-          <targetDatabase>mysql</targetDatabase>
+          <targetDatabase>${torque.targetDatabase}</targetDatabase>
           <targetPackage>org.apache.torque.test</targetPackage>
-          <useManagers>true</useManagers>
+          <useManagers>${torque.useManagers}</useManagers>
+          <generateBeans>${torque.generateBeans}</generateBeans>
           <runOnlyOnSchemaChange>false</runOnlyOnSchemaChange>
-          <driver>org.gjt.mm.mysql.Driver</driver>
-          <url>jdbc:mysql://localhost:3306/bookstore</url>
-          <user>root</user>
-          <password>mysql</password>
+          <driver>${torque.driver}</driver>
+          <url>${torque.database.url}</url>
+          <user>${torque.database.user}</user>
+          <password>${torque.database.password}</password>
         </configuration>
         <executions>
           <execution>
@@ -113,21 +122,15 @@
               <goal>sql</goal>
               <goal>sqlExec</goal>
               <goal>documentation</goal>
-              <goal>dataDump</goal>
             </goals>
           </execution>
         </executions>
         <dependencies>
           <dependency>
-            <artifactId>mysql-connector-java</artifactId>
-            <groupId>mysql</groupId>
-            <version>3.1.12</version>
+            <artifactId>${torque.test.driver.artifactId}</artifactId>
+            <groupId>${torque.test.driver.groupId}</groupId>
+            <version>${torque.test.driver.version}</version>
           </dependency>
-          <!--dependency>
-            <artifactId>postgresql</artifactId>
-            <groupId>postgresql</groupId>
-            <version>8.0-312.jdbc3</version>
-          </dependency-->
         </dependencies>
       </plugin>
       
@@ -135,6 +138,11 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
+          <includes>
+            <include>**/*Test.java</include>
+            <include>**/${torque.test.include.beans}</include>
+            <include>**/${torque.test.include.managers}</include>
+          </includes>
           <excludes>
             <exclude>**/BaseRuntimeTestCase.java</exclude>
           </excludes>
@@ -142,9 +150,22 @@
           <systemProperties>
             <property>
               <name>torque.configuration.file</name>
-              <value>../profile/mysql/Torque.properties</value>
+              <value>../profile/${torque.test.profileDirectory}/Torque.properties</value>
             </property>
           </systemProperties>
+        </configuration>
+      </plugin>      
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <testIncludes>
+            <include>**/*Test.java</include>
+            <include>**/*TestCase.java</include>
+            <include>**/${torque.test.include.beans}</include>
+            <include>**/${torque.test.include.managers}</include>
+          </testIncludes>
         </configuration>
       </plugin>      
     </plugins>

Added: db/torque/test/trunk/test-project/profiles.xml
URL: http://svn.apache.org/viewvc/db/torque/test/trunk/test-project/profiles.xml?rev=420270&view=auto
==============================================================================
--- db/torque/test/trunk/test-project/profiles.xml (added)
+++ db/torque/test/trunk/test-project/profiles.xml Sun Jul  9 02:23:07 2006
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profilesXml>
+  <profiles>
+    <profile>
+      <id>axion</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+        <torque.test.profileDirectory>axion</torque.test.profileDirectory>
+        <torque.test.idmethod>idbroker</torque.test.idmethod>
+        <torque.test.driver.artifactId>axion</torque.test.driver.artifactId>
+        <torque.test.driver.groupId>axion</torque.test.driver.groupId>
+        <torque.test.driver.version>1.0-M1</torque.test.driver.version>
+        <torque.driver>org.axiondb.jdbc.AxionDriver</torque.driver>
+        <torque.targetDatabase>axion</torque.targetDatabase>
+        <torque.database.url>jdbc:axiondb:sqltest:target/test</torque.database.url>
+        <torque.database.user>sa</torque.database.user>
+        <torque.database.password></torque.database.password>
+      </properties>
+    </profile>
+
+    <profile>
+      <id>db2400</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+        <torque.test.profileDirectory>db2400</torque.test.profileDirectory>
+        <torque.test.idmethod>idbroker</torque.test.idmethod>
+        <torque.test.driver.artifactId>jtopen</torque.test.driver.artifactId>
+        <torque.test.driver.groupId>jtopen</torque.test.driver.groupId>
+        <torque.test.driver.version>4.8</torque.test.driver.version>
+        <torque.driver>com.ibm.as400.access.AS400JDBCDriver</torque.driver>
+        <torque.targetDatabase>db2400</torque.targetDatabase>
+        <torque.database.url>jdbc:as400://testhost/torquetest</torque.database.url>
+        <torque.database.user>sa</torque.database.user>
+        <torque.database.password></torque.database.password>
+      </properties>
+    </profile>
+
+    <profile>
+      <id>derby</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+        <torque.test.profileDirectory>derby</torque.test.profileDirectory>
+        <torque.test.idmethod>native</torque.test.idmethod>
+        <torque.test.driver.artifactId>derby</torque.test.driver.artifactId>
+        <torque.test.driver.groupId>org.apache.derby</torque.test.driver.groupId>
+        <torque.test.driver.version>10.1.2.1</torque.test.driver.version>
+        <torque.driver>org.apache.derby.jdbc.EmbeddedDriver</torque.driver>
+        <torque.targetDatabase>derby</torque.targetDatabase>
+        <torque.database.url>jdbc:derby:bookstore</torque.database.url>
+        <torque.database.user>test</torque.database.user>
+        <torque.database.password>test</torque.database.password>
+      </properties>
+    </profile>
+
+    <profile>
+      <id>firebird</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+        <torque.test.profileDirectory>firebird</torque.test.profileDirectory>
+        <torque.test.idmethod>native</torque.test.idmethod>
+        <torque.test.driver.artifactId>firebirdsql</torque.test.driver.artifactId>
+        <torque.test.driver.groupId>firebird</torque.test.driver.groupId>
+        <torque.test.driver.version>1.5.5-full</torque.test.driver.version>
+        <torque.driver>org.firebirdsql.jdbc.FBDriver</torque.driver>
+        <torque.targetDatabase>interbase</torque.targetDatabase>
+        <torque.database.url>jdbc:firebirdsql://192.168.1.101:3050/torquetest.fdb</torque.database.url>
+        <torque.database.user>sysdba</torque.database.user>
+        <torque.database.password>password</torque.database.password>
+      </properties>
+    </profile>
+    
+    <profile>
+      <id>hsqldb</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+        <torque.test.profileDirectory>hsqldb</torque.test.profileDirectory>
+        <torque.test.idmethod>idbroker</torque.test.idmethod>
+        <torque.test.driver.artifactId>hsqldb</torque.test.driver.artifactId>
+        <torque.test.driver.groupId>hsqldb</torque.test.driver.groupId>
+        <torque.test.driver.version>1.8.0.2</torque.test.driver.version>
+        <torque.driver>org.hsqldb.jdbcDriver</torque.driver>
+        <torque.targetDatabase>hypersonic</torque.targetDatabase>
+        <torque.database.url>jdbc:hsqldb:sqltest;shutdown=true</torque.database.url>
+        <torque.database.user>sa</torque.database.user>
+        <torque.database.password></torque.database.password>
+      </properties>
+    </profile>
+    
+    <profile>
+      <id>mysql</id>
+      <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>
+        <torque.test.driver.version>3.1.12</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>
+      </properties>
+    </profile>
+    
+    <profile>
+      <id>oracle</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+        <torque.test.profileDirectory>oracle</torque.test.profileDirectory>
+        <torque.test.idmethod>native</torque.test.idmethod>
+        <torque.test.driver.artifactId>oracle-jdbc</torque.test.driver.artifactId>
+        <torque.test.driver.groupId>oracle</torque.test.driver.groupId>
+        <torque.test.driver.version>9.2.0.6</torque.test.driver.version>
+        <torque.driver>org.oracle.jdbc.driver.OracleDriver</torque.driver>
+        <torque.targetDatabase>oracle</torque.targetDatabase>
+        <torque.database.url>jdbc:oracle:thin:@alpha.tucana.at:1521:oracle</torque.database.url>
+        <torque.database.user>torque</torque.database.user>
+        <torque.database.password>torque</torque.database.password>
+      </properties>
+    </profile>
+    
+    <profile>
+      <id>postgresql</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+        <torque.test.profileDirectory>postgresql</torque.test.profileDirectory>
+        <torque.test.idmethod>idbroker</torque.test.idmethod>
+        <torque.test.driver.artifactId>postgresql</torque.test.driver.artifactId>
+        <torque.test.driver.groupId>postgresql</torque.test.driver.groupId>
+        <torque.test.driver.version>8.0-312.jdbc3</torque.test.driver.version>
+        <torque.driver>org.postgresql.Driver</torque.driver>
+        <torque.targetDatabase>postgresql</torque.targetDatabase>
+        <torque.database.url>jdbc:postgresql://localhost:5432/bookstore</torque.database.url>
+        <torque.database.user>torque</torque.database.user>
+        <torque.database.password>torque</torque.database.password>
+      </properties>
+    </profile>
+
+    <profile>
+      <id>sybase</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+        <torque.test.profileDirectory>sybase</torque.test.profileDirectory>
+        <torque.test.idmethod>idbroker</torque.test.idmethod>
+        <torque.test.driver.artifactId>sybase</torque.test.driver.artifactId>
+        <torque.test.driver.groupId>jconnect</torque.test.driver.groupId>
+        <torque.test.driver.version>5.5</torque.test.driver.version>
+        <torque.driver>com.sybase.jdbc2.jdbc.SybDriver</torque.driver>
+        <torque.targetDatabase>sybase</torque.targetDatabase>
+        <torque.database.url>jdbc:sybase:Tds:localhost:5000/bookstore</torque.database.url>
+        <torque.database.user>sa</torque.database.user>
+        <torque.database.password></torque.database.password>
+      </properties>
+    </profile>
+
+    <profile>
+      <id>tv</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+        <torque.test.profileDirectory>tv</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>
+        <torque.test.driver.version>3.1.12</torque.test.driver.version>
+        <torque.driver>org.gjt.mm.mysql.Driver</torque.driver>
+        <torque.targetDatabase>mysql</torque.targetDatabase>
+        <torque.database.url>jdbc:mysql://gatekeeper.home.lan:3306/bookstore</torque.database.url>
+        <torque.database.user>torque</torque.database.user>
+        <torque.database.password>torque</torque.database.password>
+      </properties>
+    </profile>
+
+    <profile>
+      <id>beans</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+        <torque.generateBeans>true</torque.generateBeans>
+        <torque.test.include.beans>BeanTestConditional.java</torque.test.include.beans>
+      </properties>
+    </profile>
+      
+    <profile>
+      <id>managers</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+        <torque.useManagers>true</torque.useManagers>
+        <torque.test.include.managers>ManagerTestConditional.java</torque.test.include.managers>
+      </properties>
+    </profile>
+      
+  </profiles>
+</profilesXml>
\ No newline at end of file



---------------------------------------------------------------------
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