Separating the test code for the JPA projects in a separate directory so
authorErik Brakkee <erik@brakkee.org>
Wed, 12 May 2010 17:03:00 +0000 (17:03 +0000)
committerErik Brakkee <erik@brakkee.org>
Wed, 12 May 2010 17:03:00 +0000 (17:03 +0000)
the eclipselink and toplink support libs can be deployed on maven
central.

24 files changed:
security/jpatest/pom.xml
test/eclipselink/pom.xml
test/eclipselink/src/test/java/org/wamblee/support/persistence/eclipselink/DatabaseUtilsTest.java [deleted file]
test/eclipselink/src/test/java/org/wamblee/support/persistence/eclipselink/MyEntityExampleTest.java [deleted file]
test/hibernate/pom.xml
test/hibernate/src/test/java/org/wamblee/support/persistence/hibernate/DatabaseUtilsTest.java [deleted file]
test/hibernate/src/test/java/org/wamblee/support/persistence/hibernate/MyEntityExampleTest.java [deleted file]
test/hibernate/src/test/java/org/wamblee/support/persistence/hibernate/TransactionProxyFactoryTest.java [deleted file]
test/jpatest-eclipselink/pom.xml
test/jpatest-eclipselink/src/main/java/org/wamblee/support/persistence/eclipselink/EclipselinkJpaCustomizer.java [deleted file]
test/jpatest-eclipselink/src/main/java/org/wamblee/support/persistence/eclipselink/EclipselinkTables.java [deleted file]
test/jpatest-eclipselink/src/main/resources/META-INF/services/org.wamblee.support.persistence.JpaCustomizer [deleted file]
test/jpatest-hibernate/pom.xml
test/jpatest-hibernate/src/main/java/org/wamblee/support/persistence/hibernate/HibernateJpaCustomizer.java [deleted file]
test/jpatest-hibernate/src/main/java/org/wamblee/support/persistence/hibernate/HibernateTables.java [deleted file]
test/jpatest-hibernate/src/main/resources/META-INF/services/org.wamblee.support.persistence.JpaCustomizer [deleted file]
test/jpatest-toplink-essentials/pom.xml
test/jpatest-toplink-essentials/src/main/java/org/wamblee/support/persistence/toplink/ToplinkJpaCustomizer.java [deleted file]
test/jpatest-toplink-essentials/src/main/java/org/wamblee/support/persistence/toplink/ToplinkTables.java [deleted file]
test/jpatest-toplink-essentials/src/main/resources/META-INF/services/org.wamblee.support.persistence.JpaCustomizer [deleted file]
test/pom.xml
test/toplink-essentials/pom.xml
test/toplink-essentials/src/test/java/org/wamblee/support/persistence/toplink/DatabaseUtilsTest.java [deleted file]
test/toplink-essentials/src/test/java/org/wamblee/support/persistence/toplink/MyEntityExampleTest.java [deleted file]

index 5d43ea0dc014b6ed84a386d3d7a4f425dadd970e..cc2f1ef8b496570e9ece412c1733f164f80f2b04 100644 (file)
                     <version>0.2.4-SNAPSHOT</version>
                     <scope>test</scope>
                 </dependency>
+                       <dependency>
+                        <groupId>org.eclipse.persistence</groupId>
+                        <artifactId>javax.persistence</artifactId>
+                        <version>2.0.0</version>
+                </dependency>
+
+                <dependency>
+                        <groupId>javax.persistence</groupId>
+                        <artifactId>persistence-api</artifactId>
+                </dependency>
+
+                <dependency>
+                        <groupId>org.eclipse.persistence</groupId>
+                        <artifactId>eclipselink</artifactId>
+                </dependency>
+
             </dependencies>
             <repositories>
                 <repository>
index ce12dcb6ee8694014b9ca845d07d02b57d899538..347f53b4b8373b04b24bba91b54c1247ee39066f 100644 (file)
                        <version>0.2.4-SNAPSHOT</version>
                </dependency>
 
-               <dependency>
-                       <groupId>org.wamblee</groupId>
-                       <artifactId>wamblee-test-enterprise</artifactId>
-                       <version>0.2.4-SNAPSHOT</version>
-                       <type>test-jar</type>
-               </dependency>
-
                <dependency>
                        <groupId>org.dbunit</groupId>
                        <artifactId>dbunit</artifactId>
                </dependency>
 
-               <dependency>
-                       <groupId>org.eclipse.persistence</groupId>
-                       <artifactId>javax.persistence</artifactId>
-                       <version>2.0.0</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>javax.persistence</groupId>
-                       <artifactId>persistence-api</artifactId>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.eclipse.persistence</groupId>
-                       <artifactId>eclipselink</artifactId>
-               </dependency>
-
        </dependencies>
 
-       <repositories>
-               <repository>
-                       <id>EclipseLink Repo</id>
-                       <url>http://www.eclipse.org/downloads/download.php?r=1&amp;nf=1&amp;file=/rt/eclipselink/maven.repo</url>
-               </repository>
-
-       </repositories>
-
-
 </project>
diff --git a/test/eclipselink/src/test/java/org/wamblee/support/persistence/eclipselink/DatabaseUtilsTest.java b/test/eclipselink/src/test/java/org/wamblee/support/persistence/eclipselink/DatabaseUtilsTest.java
deleted file mode 100644 (file)
index 3fbf2f2..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2005-2010 the original author or authors.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
-package org.wamblee.support.persistence.eclipselink;
-
-import org.wamblee.support.persistence.DatabaseUtilsTestBase;
-
-/**
- * 
- * @author $author$
- * @version $Revision$
- */
-public class DatabaseUtilsTest extends DatabaseUtilsTestBase {
-    // Empty, all tests inherited
-}
diff --git a/test/eclipselink/src/test/java/org/wamblee/support/persistence/eclipselink/MyEntityExampleTest.java b/test/eclipselink/src/test/java/org/wamblee/support/persistence/eclipselink/MyEntityExampleTest.java
deleted file mode 100644 (file)
index e95afb8..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2005-2010 the original author or authors.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
-package org.wamblee.support.persistence.eclipselink;
-
-import org.wamblee.support.persistence.MyEntityExampleTestBase;
-
-/**
- * This class shows an example of how to test an entity using jpa.
- */
-public class MyEntityExampleTest extends MyEntityExampleTestBase {
-    // Empty, all tests are inherited
-}
index fa7273bda1f156dd6cd3b05ad782a99639b91c1c..e9d9060a2ddab10c009ba3be6ce97b5b021cc3a4 100644 (file)
       <version>0.2.4-SNAPSHOT</version>
     </dependency>
 
-    <dependency>
-      <groupId>org.wamblee</groupId>
-      <artifactId>wamblee-test-enterprise</artifactId>
-      <version>0.2.4-SNAPSHOT</version>
-      <type>test-jar</type>
-    </dependency>
-
     <dependency>
       <groupId>org.dbunit</groupId>
       <artifactId>dbunit</artifactId>
     </dependency>
 
-    <dependency>
-      <groupId>javax.persistence</groupId>
-      <artifactId>persistence-api</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.wamblee</groupId>
-      <artifactId>wamblee-hibernate-jpa</artifactId>
-      <version>0.2.4-SNAPSHOT</version>
-    </dependency>
-
   </dependencies>
 
 </project>
diff --git a/test/hibernate/src/test/java/org/wamblee/support/persistence/hibernate/DatabaseUtilsTest.java b/test/hibernate/src/test/java/org/wamblee/support/persistence/hibernate/DatabaseUtilsTest.java
deleted file mode 100644 (file)
index 6059c95..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2005-2010 the original author or authors.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
-package org.wamblee.support.persistence.hibernate;
-
-import org.wamblee.support.persistence.DatabaseUtilsTestBase;
-
-/**
- * 
- * @author $author$
- * @version $Revision$
- */
-public class DatabaseUtilsTest extends DatabaseUtilsTestBase {
-    // Empty, all tests inherited
-}
diff --git a/test/hibernate/src/test/java/org/wamblee/support/persistence/hibernate/MyEntityExampleTest.java b/test/hibernate/src/test/java/org/wamblee/support/persistence/hibernate/MyEntityExampleTest.java
deleted file mode 100644 (file)
index 3ac32a5..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2005-2010 the original author or authors.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
-package org.wamblee.support.persistence.hibernate;
-
-import org.wamblee.support.persistence.MyEntityExampleTestBase;
-
-/**
- * This class shows an example of how to test an entity using jpa.
- */
-public class MyEntityExampleTest extends MyEntityExampleTestBase {
-    // Empty, all tests are inherited
-}
diff --git a/test/hibernate/src/test/java/org/wamblee/support/persistence/hibernate/TransactionProxyFactoryTest.java b/test/hibernate/src/test/java/org/wamblee/support/persistence/hibernate/TransactionProxyFactoryTest.java
deleted file mode 100644 (file)
index df057b5..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.wamblee.support.persistence.hibernate;
-
-import org.wamblee.support.persistence.TransactionProxyFactoryTestBase;
-
-public class TransactionProxyFactoryTest extends
-    TransactionProxyFactoryTestBase {
-
-}
index d7de88ff502bf3636b129022fbc520defe885b70..e3461b887700c8e18f4897a491f65b20a7cab515 100644 (file)
        <groupId>org.wamblee</groupId>
        <artifactId>wamblee-test-jpatest-eclipselink</artifactId>
        <packaging>jar</packaging>
-       <name>/test/eclipselink</name>
+       <name>/test/jpatest-eclipselink</name>
        <url>http://wamblee.org</url>
 
        <dependencies>
                <dependency>
                        <groupId>org.wamblee</groupId>
-                       <artifactId>wamblee-test-enterprise</artifactId>
+                       <artifactId>wamblee-test-eclipselink</artifactId>
                        <version>0.2.4-SNAPSHOT</version>
                </dependency>
 
                        <type>test-jar</type>
                </dependency>
 
-               <dependency>
-                       <groupId>org.dbunit</groupId>
-                       <artifactId>dbunit</artifactId>
-               </dependency>
-
                <dependency>
                        <groupId>org.eclipse.persistence</groupId>
                        <artifactId>javax.persistence</artifactId>
diff --git a/test/jpatest-eclipselink/src/main/java/org/wamblee/support/persistence/eclipselink/EclipselinkJpaCustomizer.java b/test/jpatest-eclipselink/src/main/java/org/wamblee/support/persistence/eclipselink/EclipselinkJpaCustomizer.java
deleted file mode 100644 (file)
index 1679942..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2005-2010 the original author or authors.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
-package org.wamblee.support.persistence.eclipselink;
-
-import org.dbunit.dataset.filter.ITableFilterSimple;
-
-import org.wamblee.io.FileSystemUtils;
-import org.wamblee.support.persistence.JpaCustomizer;
-import org.wamblee.support.persistence.PersistenceUnitDescription;
-
-import java.io.File;
-import java.util.Map;
-
-/**
- * 
- * @author $author$
- * @version $Revision$
- */
-public class EclipselinkJpaCustomizer implements JpaCustomizer {
-    /**
-     * Creates a new EclipselinkJpaCustomizer object.
-     */
-    public EclipselinkJpaCustomizer() {
-        // Empty
-    }
-
-    @Override
-    public void customize(PersistenceUnitDescription aPersistenceUnit,
-        Map<String, String> aJpaProperties) {
-  
-        // DDL generation
-        aJpaProperties.put("eclipselink.ddl-generation", "create-tables");
-        
-        // DDL generation
-        FileSystemUtils.createDir(new File("target/sql"));
-        aJpaProperties.put("eclipselink.application-location", "target/sql");
-        aJpaProperties.put("eclipselink.create-ddl-jdbc-file-name", "create-schema.sql");
-        aJpaProperties.put("eclipselink.drop-ddl-jdbc-file-name", "drop-schema.sql");
-        aJpaProperties.put("eclipselink.ddl-generation.output-mode", "both");
-    }
-
-    @Override
-    public ITableFilterSimple getJpaTables() {
-        return new EclipselinkTables();
-    }
-}
diff --git a/test/jpatest-eclipselink/src/main/java/org/wamblee/support/persistence/eclipselink/EclipselinkTables.java b/test/jpatest-eclipselink/src/main/java/org/wamblee/support/persistence/eclipselink/EclipselinkTables.java
deleted file mode 100644 (file)
index 29872d0..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2005-2010 the original author or authors.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
-package org.wamblee.support.persistence.eclipselink;
-
-import org.dbunit.dataset.DataSetException;
-import org.dbunit.dataset.filter.ITableFilterSimple;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Toplink-specific tables.
- */
-public class EclipselinkTables implements ITableFilterSimple {
-    private static final List<String> TABLES = Arrays
-        .asList(new String[] { "SEQUENCE" });
-
-    public boolean accept(String aTableName) throws DataSetException {
-        return TABLES.contains(aTableName);
-    }
-}
diff --git a/test/jpatest-eclipselink/src/main/resources/META-INF/services/org.wamblee.support.persistence.JpaCustomizer b/test/jpatest-eclipselink/src/main/resources/META-INF/services/org.wamblee.support.persistence.JpaCustomizer
deleted file mode 100644 (file)
index 35638de..0000000
+++ /dev/null
@@ -1 +0,0 @@
-org.wamblee.support.persistence.eclipselink.EclipselinkJpaCustomizer
index a13fe2568f2032da8dc269369a3ec61b5484e855..3df0051b817936dde995484c29a1bf8d4b6934eb 100644 (file)
   <groupId>org.wamblee</groupId>
   <artifactId>wamblee-test-jpatest-hibernate</artifactId>
   <packaging>jar</packaging>
-  <name>/test/hibernate</name>
+  <name>/test/jpatest-hibernate</name>
   <url>http://wamblee.org</url>
 
   <dependencies>
     <dependency>
       <groupId>org.wamblee</groupId>
-      <artifactId>wamblee-test-enterprise</artifactId>
+      <artifactId>wamblee-test-hibernate</artifactId>
       <version>0.2.4-SNAPSHOT</version>
     </dependency>
 
       <type>test-jar</type>
     </dependency>
 
-    <dependency>
-      <groupId>org.dbunit</groupId>
-      <artifactId>dbunit</artifactId>
-    </dependency>
-
     <dependency>
       <groupId>javax.persistence</groupId>
       <artifactId>persistence-api</artifactId>
diff --git a/test/jpatest-hibernate/src/main/java/org/wamblee/support/persistence/hibernate/HibernateJpaCustomizer.java b/test/jpatest-hibernate/src/main/java/org/wamblee/support/persistence/hibernate/HibernateJpaCustomizer.java
deleted file mode 100644 (file)
index 71bbb18..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2005-2010 the original author or authors.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
-package org.wamblee.support.persistence.hibernate;
-
-import org.dbunit.dataset.filter.ITableFilterSimple;
-
-import org.wamblee.support.persistence.JpaCustomizer;
-import org.wamblee.support.persistence.PersistenceUnitDescription;
-
-import java.util.Map;
-
-/**
- * 
- * @author $author$
- * @version $Revision$
- */
-public class HibernateJpaCustomizer implements JpaCustomizer {
-    /**
-     * Creates a new HibernateJpaCustomizer object.
-     */
-    public HibernateJpaCustomizer() {
-        // Empty
-    }
-
-    @Override
-    public void customize(PersistenceUnitDescription aPersistenceUnit,
-        Map<String, String> aJpaProperties) {
-        
-        System.setProperty("hibernate.temp.use_jdbc_metadata_defaults", "true");
-        
-        // Set non-JPA connection properties for older versions of hibernate
-        System.getProperties().remove("hibernate.connection.datasource");
-        if (System.getProperty("hibernate.connection.datasource") != null ) { 
-            throw new RuntimeException("ERROR");
-        }
-        System.setProperty("hibernate.connection.url", aJpaProperties.get("javax.persistence.jdbc.url"));
-        System.setProperty("hibernate.connection.username", aJpaProperties.get("javax.persistence.jdbc.user"));
-        System.setProperty("hibernate.connection.password", aJpaProperties.get("javax.persistence.jdbc.password"));
-
-        // Hibernate schema generation
-        aJpaProperties.put("hibernate.hbm2ddl.auto", "create");
-    }
-
-    @Override
-    public ITableFilterSimple getJpaTables() {
-        return new HibernateTables();
-    }
-}
diff --git a/test/jpatest-hibernate/src/main/java/org/wamblee/support/persistence/hibernate/HibernateTables.java b/test/jpatest-hibernate/src/main/java/org/wamblee/support/persistence/hibernate/HibernateTables.java
deleted file mode 100644 (file)
index f58ea8e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2005-2010 the original author or authors.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
-package org.wamblee.support.persistence.hibernate;
-
-import org.dbunit.dataset.DataSetException;
-import org.dbunit.dataset.filter.ITableFilterSimple;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Toplink-specific tables.
- */
-public class HibernateTables implements ITableFilterSimple {
-    private static final List<String> TABLES = Arrays
-        .asList(new String[] { "" });
-
-    public boolean accept(String aTableName) throws DataSetException {
-        return TABLES.contains(aTableName);
-    }
-}
diff --git a/test/jpatest-hibernate/src/main/resources/META-INF/services/org.wamblee.support.persistence.JpaCustomizer b/test/jpatest-hibernate/src/main/resources/META-INF/services/org.wamblee.support.persistence.JpaCustomizer
deleted file mode 100644 (file)
index d057634..0000000
+++ /dev/null
@@ -1 +0,0 @@
-org.wamblee.support.persistence.hibernate.HibernateJpaCustomizer
index df6c33a9a23944df18c7b279217a93f7b204037d..03f2f213e19e5a2c61bb338f9d5e79f3f14cc504 100644 (file)
   <groupId>org.wamblee</groupId>
   <artifactId>wamblee-test-jpatest-toplink-essentials</artifactId>
   <packaging>jar</packaging>
-  <name>/test/toplinkessentials</name>
+  <name>/test/jpatest-toplinkessentials</name>
   <url>http://wamblee.org</url>
 
   <dependencies>
     <dependency>
       <groupId>org.wamblee</groupId>
-      <artifactId>wamblee-test-enterprise</artifactId>
+      <artifactId>wamblee-test-toplink-essentials</artifactId>
       <version>0.2.4-SNAPSHOT</version>
     </dependency>
 
       <type>test-jar</type>
     </dependency>
 
-    <dependency>
-      <groupId>org.dbunit</groupId>
-      <artifactId>dbunit</artifactId>
-    </dependency>
-
     <dependency>
       <groupId>javax.persistence</groupId>
       <artifactId>persistence-api</artifactId>
diff --git a/test/jpatest-toplink-essentials/src/main/java/org/wamblee/support/persistence/toplink/ToplinkJpaCustomizer.java b/test/jpatest-toplink-essentials/src/main/java/org/wamblee/support/persistence/toplink/ToplinkJpaCustomizer.java
deleted file mode 100644 (file)
index 1b3808f..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2005-2010 the original author or authors.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
-package org.wamblee.support.persistence.toplink;
-
-import java.io.File;
-import java.util.Map;
-
-import org.dbunit.dataset.filter.ITableFilterSimple;
-import org.wamblee.io.FileSystemUtils;
-import org.wamblee.support.persistence.JpaCustomizer;
-import org.wamblee.support.persistence.PersistenceUnitDescription;
-
-/**
- * 
- * @author $author$
- * @version $Revision$
- */
-public class ToplinkJpaCustomizer implements JpaCustomizer {
-    /**
-     * Creates a new ToplinkJpaCustomizer object.
-     */
-    public ToplinkJpaCustomizer() {
-        // Empty
-    }
-
-    @Override
-    public void customize(PersistenceUnitDescription aPersistenceUnit,
-        Map<String, String> aJpaProperties) {
-
-        // Custom datasource properties.
-        aJpaProperties.put("toplink.jdbc.url", aJpaProperties.get("javax.persistence.jdbc.url"));
-        aJpaProperties.put("toplink.jdbc.user", aJpaProperties.get("javax.persistence.jdbc.user"));
-        aJpaProperties.put("toplink.jdbc.password", aJpaProperties.get("javax.persistence.jdbc.password"));
-
-        // DDL generation for toplink
-        aJpaProperties.put("toplink.ddl-generation", "create-tables");
-        
-        // DDL generation
-        FileSystemUtils.createDir(new File("target/sql"));
-        aJpaProperties.put("toplink.create-ddl-jdbc-file-name", "target/sql/create-schema.sql");
-        aJpaProperties.put("toplink.drop-ddl-jdbc-file-name", "target/sql/drop-schema.sql");
-    }
-
-    @Override
-    public ITableFilterSimple getJpaTables() {
-        return new ToplinkTables();
-    }
-}
diff --git a/test/jpatest-toplink-essentials/src/main/java/org/wamblee/support/persistence/toplink/ToplinkTables.java b/test/jpatest-toplink-essentials/src/main/java/org/wamblee/support/persistence/toplink/ToplinkTables.java
deleted file mode 100644 (file)
index 4a99d7d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2005-2010 the original author or authors.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
-package org.wamblee.support.persistence.toplink;
-
-import org.dbunit.dataset.DataSetException;
-import org.dbunit.dataset.filter.ITableFilterSimple;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Toplink-specific tables.
- */
-public class ToplinkTables implements ITableFilterSimple {
-    private static final List<String> TABLES = Arrays
-        .asList(new String[] { "SEQUENCE" });
-
-    public boolean accept(String aTableName) throws DataSetException {
-        return TABLES.contains(aTableName);
-    }
-}
diff --git a/test/jpatest-toplink-essentials/src/main/resources/META-INF/services/org.wamblee.support.persistence.JpaCustomizer b/test/jpatest-toplink-essentials/src/main/resources/META-INF/services/org.wamblee.support.persistence.JpaCustomizer
deleted file mode 100644 (file)
index 82d1265..0000000
+++ /dev/null
@@ -1 +0,0 @@
-org.wamblee.support.persistence.toplink.ToplinkJpaCustomizer
index 74ebfe59c75d45df472c668e1f8fa665f4aaa748..341bb27217320bf0d821c2d9d43a386ebfeca9a8 100644 (file)
@@ -16,6 +16,8 @@
   <modules>
     <module>enterprise</module>
     <module>hibernate</module>
+    <module>eclipselink</module>
+    <module>toplink-essentials</module>
   </modules>
 
   <profiles>
@@ -27,8 +29,9 @@
         </property>
       </activation>
       <modules>
-        <module>eclipselink</module>
-        <module>toplink-essentials</module>
+        <module>jpatest-hibernate</module>
+        <module>jpatest-eclipselink</module>
+        <module>jpatest-toplink-essentials</module>
       </modules>
     </profile>
   </profiles>
index 85d29f9541dd27ca1c3ead9ebeebb5d960c7ede8..52e043c7f803005edc5b8279cb7792093de10858 100644 (file)
       <version>0.2.4-SNAPSHOT</version>
     </dependency>
 
-    <dependency>
-      <groupId>org.wamblee</groupId>
-      <artifactId>wamblee-test-enterprise</artifactId>
-      <version>0.2.4-SNAPSHOT</version>
-      <type>test-jar</type>
-    </dependency>
-
     <dependency>
       <groupId>org.dbunit</groupId>
       <artifactId>dbunit</artifactId>
     </dependency>
 
-    <dependency>
-      <groupId>javax.persistence</groupId>
-      <artifactId>persistence-api</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>toplink.essentials</groupId>
-      <artifactId>toplink-essentials</artifactId>
-    </dependency>
-
-
   </dependencies>
 
-    <repositories>
-        <repository>
-            <id>javaee</id>
-            <name>Java EE repo at SUN</name>
-            <url>http://download.java.net/maven/1</url>
-            <layout>legacy</layout>
-        </repository>
-
-    </repositories>
-
 </project>
diff --git a/test/toplink-essentials/src/test/java/org/wamblee/support/persistence/toplink/DatabaseUtilsTest.java b/test/toplink-essentials/src/test/java/org/wamblee/support/persistence/toplink/DatabaseUtilsTest.java
deleted file mode 100644 (file)
index c45ea93..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2005-2010 the original author or authors.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
-package org.wamblee.support.persistence.toplink;
-
-import org.wamblee.support.persistence.DatabaseUtilsTestBase;
-
-/**
- * 
- * @author $author$
- * @version $Revision$
- */
-public class DatabaseUtilsTest extends DatabaseUtilsTestBase {
-    // Empty, all tests inherited
-}
diff --git a/test/toplink-essentials/src/test/java/org/wamblee/support/persistence/toplink/MyEntityExampleTest.java b/test/toplink-essentials/src/test/java/org/wamblee/support/persistence/toplink/MyEntityExampleTest.java
deleted file mode 100644 (file)
index 8d60e75..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2005-2010 the original author or authors.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
-package org.wamblee.support.persistence.toplink;
-
-import org.wamblee.support.persistence.MyEntityExampleTestBase;
-
-/**
- * This class shows an example of how to test an entity using jpa.
- */
-public class MyEntityExampleTest extends MyEntityExampleTestBase {
-    // Empty, all tests are inherited
-}