cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [8/9] cayenne git commit: CAY-2118 cdbimport: drop support for the old style of table filtering
Date Fri, 30 Sep 2016 14:23:54 GMT
CAY-2118 cdbimport: drop support for the old style of table filtering

* maven


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/e9e81a6e
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/e9e81a6e
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/e9e81a6e

Branch: refs/heads/master
Commit: e9e81a6ed886428c118e0b03af89d1fb104e3a6e
Parents: ab6c204
Author: Andrus Adamchik <andrus@objectstyle.com>
Authored: Fri Sep 30 13:51:20 2016 +0300
Committer: Andrus Adamchik <andrus@objectstyle.com>
Committed: Fri Sep 30 17:16:49 2016 +0300

----------------------------------------------------------------------
 .../reverse/db/DbAttributesPerSchemaLoader.java | 11 +--
 .../DefaultReverseEngineeringLoaderTest.java    |  5 +-
 .../tools/DbImporterMojoConfigurationTest.java  | 54 +++++++++----
 .../cayenne/tools/DbImporterMojoTest.java       | 12 +--
 .../tools/config/pom-catalog-and-schema.xml     | 82 +++++++++----------
 .../apache/cayenne/tools/config/pom-catalog.xml | 84 ++++++++++----------
 .../apache/cayenne/tools/config/pom-schema.xml  | 84 ++++++++++----------
 .../tools/dbimport/testDefaultPackage-pom.xml   | 28 ++++---
 .../dbimport/testFilteringWithSchema-pom.xml    | 28 ++++---
 .../testOldParamsSchemasAndTableExclude-pom.xml | 43 ----------
 ...dParamsSchemasAndTableExclude.map.xml-result | 37 ---------
 .../testOldParamsSchemasAndTableExclude.sql     | 64 ---------------
 .../testPreserveCustomObjMappings-pom.xml       | 33 ++++----
 .../dbimport/testSchemasAndTableExclude-pom.xml | 35 ++++----
 .../tools/dbimport/testSimpleFiltering-pom.xml  | 41 ----------
 .../dbimport/testSimpleFiltering.map.xml-result | 37 ---------
 .../tools/dbimport/testSimpleFiltering.sql      | 37 ---------
 ...SupportsCatalogsOnReverseEngineering-pom.xml |  9 ++-
 .../tools/dbimport/testViewsExclude-pom.xml     | 28 ++++---
 .../apache/cayenne/tools/dbimporter-pom3.xml    |  3 +-
 20 files changed, 267 insertions(+), 488 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/db/DbAttributesPerSchemaLoader.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/db/DbAttributesPerSchemaLoader.java b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/db/DbAttributesPerSchemaLoader.java
index cd26db7..77896c8 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/db/DbAttributesPerSchemaLoader.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/db/DbAttributesPerSchemaLoader.java
@@ -18,6 +18,11 @@
  ****************************************************************/
 package org.apache.cayenne.dbsync.reverse.db;
 
+import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dbsync.reverse.filters.PatternFilter;
+import org.apache.cayenne.dbsync.reverse.filters.TableFilter;
+import org.apache.cayenne.map.DbAttribute;
+
 import java.sql.DatabaseMetaData;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
@@ -29,11 +34,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.cayenne.dbsync.reverse.filters.PatternFilter;
-import org.apache.cayenne.dbsync.reverse.filters.TableFilter;
-import org.apache.cayenne.dba.DbAdapter;
-import org.apache.cayenne.map.DbAttribute;
-
 /**
  * Load all attributes for schema and return it for each table
  * */
@@ -74,6 +74,7 @@ public class DbAttributesPerSchemaLoader extends DbAttributesBaseLoader {
 				String tableName = rs.getString("TABLE_NAME");
 				String columnName = rs.getString("COLUMN_NAME");
 
+				// TODO: instead of elaborate filtering, can we just limit this to the tables that we already have?
 				PatternFilter columnFilter = filter.isIncludeTable(tableName);
 				/*
 				 * Here is possible optimization if filter will contain

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/cayenne-server/src/test/java/org/apache/cayenne/dbimport/DefaultReverseEngineeringLoaderTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/dbimport/DefaultReverseEngineeringLoaderTest.java b/cayenne-server/src/test/java/org/apache/cayenne/dbimport/DefaultReverseEngineeringLoaderTest.java
index c478db7..dd88eda 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/dbimport/DefaultReverseEngineeringLoaderTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/dbimport/DefaultReverseEngineeringLoaderTest.java
@@ -36,11 +36,10 @@ public class DefaultReverseEngineeringLoaderTest {
         assertEquals("catalog-name-01", catalogs.next().getName());
         assertEquals("catalog-name-02", catalogs.next().getName());
 
-        assertCatalog(catalogs);
+        assertCatalog(catalogs.next());
     }
 
-    public static void assertCatalog(Iterator<Catalog> catalogs) {
-        Catalog catalog = catalogs.next();
+    public static void assertCatalog(Catalog catalog ) {
         assertEquals("catalog-name-03", catalog.getName());
 
         Iterator<IncludeTable> includeTables = catalog.getIncludeTables().iterator();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoConfigurationTest.java
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoConfigurationTest.java b/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoConfigurationTest.java
index f76eb90..20a65fa 100644
--- a/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoConfigurationTest.java
+++ b/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoConfigurationTest.java
@@ -18,33 +18,55 @@
  ****************************************************************/
 package org.apache.cayenne.tools;
 
-import static org.apache.cayenne.dbimport.DefaultReverseEngineeringLoaderTest.*;
-
+import org.apache.cayenne.dbimport.Catalog;
+import org.apache.cayenne.dbimport.Schema;
 import org.apache.cayenne.dbsync.reverse.filters.FiltersConfig;
 import org.apache.cayenne.dbsync.reverse.filters.IncludeTableFilter;
 import org.apache.cayenne.dbsync.reverse.filters.PatternFilter;
 import org.apache.cayenne.dbsync.reverse.filters.TableFilter;
 import org.apache.cayenne.tools.dbimport.DbImportConfiguration;
-import org.apache.cayenne.dbimport.Schema;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
 import org.junit.Test;
 
+import java.util.HashMap;
+import java.util.Map;
 import java.util.TreeSet;
 import java.util.regex.Pattern;
 
+import static org.apache.cayenne.dbimport.DefaultReverseEngineeringLoaderTest.assertCatalog;
+import static org.apache.cayenne.dbimport.DefaultReverseEngineeringLoaderTest.assertCatalogAndSchema;
+import static org.apache.cayenne.dbimport.DefaultReverseEngineeringLoaderTest.assertFlat;
+import static org.apache.cayenne.dbimport.DefaultReverseEngineeringLoaderTest.assertSchemaContent;
+import static org.apache.cayenne.dbimport.DefaultReverseEngineeringLoaderTest.assertSkipPrimaryKeyLoading;
+import static org.apache.cayenne.dbimport.DefaultReverseEngineeringLoaderTest.assertSkipRelationshipsLoading;
+import static org.apache.cayenne.dbimport.DefaultReverseEngineeringLoaderTest.assertTableTypes;
+
 public class DbImporterMojoConfigurationTest extends AbstractMojoTestCase {
 
     @Test
     public void testLoadCatalog() throws Exception {
-        assertCatalog(getCdbImport("pom-catalog.xml").getReverseEngineering().getCatalogs().iterator());
+        Map<String, Catalog> catalogs = new HashMap<>();
+        for (Catalog c : getCdbImport("pom-catalog.xml").getReverseEngineering().getCatalogs()) {
+            catalogs.put(c.getName(), c);
+        }
+
+        assertEquals(3, catalogs.size());
+        Catalog c3 = catalogs.get("catalog-name-03");
+        assertNotNull(c3);
+        assertCatalog(c3);
     }
 
     @Test
     public void testLoadSchema() throws Exception {
-        Schema schema = getCdbImport("pom-schema.xml").getReverseEngineering().getSchemas().iterator().next();
-        assertEquals("schema-name-03", schema.getName());
-
-        assertSchemaContent(schema);
+        Map<String, Schema> schemas = new HashMap<>();
+        for (Schema s : getCdbImport("pom-schema.xml").getReverseEngineering().getSchemas()) {
+            schemas.put(s.getName(), s);
+        }
+
+        assertEquals(3, schemas.size());
+        Schema s3 = schemas.get("schema-name-03");
+        assertNotNull(s3);
+        assertSchemaContent(s3);
     }
 
     @Test
@@ -52,10 +74,10 @@ public class DbImporterMojoConfigurationTest extends AbstractMojoTestCase {
         FiltersConfig filters = getCdbImport("pom-schema-2.xml").toParameters()
                 .getDbLoaderConfig().getFiltersConfig();
 
-        TreeSet<IncludeTableFilter> includes = new TreeSet<IncludeTableFilter>();
+        TreeSet<IncludeTableFilter> includes = new TreeSet<>();
         includes.add(new IncludeTableFilter(null, new PatternFilter().exclude("^ETL_.*")));
 
-        TreeSet<Pattern> excludes = new TreeSet<Pattern>(PatternFilter.PATTERN_COMPARATOR);
+        TreeSet<Pattern> excludes = new TreeSet<>(PatternFilter.PATTERN_COMPARATOR);
         excludes.add(PatternFilter.pattern("^ETL_.*"));
 
         assertEquals(filters.tableFilter(null, "NHL_STATS"),
@@ -66,12 +88,12 @@ public class DbImporterMojoConfigurationTest extends AbstractMojoTestCase {
     public void testLoadCatalogAndSchema() throws Exception {
         assertCatalogAndSchema(getCdbImport("pom-catalog-and-schema.xml").getReverseEngineering());
     }
-    
-	@Test
-	public void testDefaultPackage() throws Exception {
-		DbImportConfiguration config = getCdbImport("pom-default-package.xml").toParameters();
-		assertEquals("com.example.test", config.getDefaultPackage());
-	}
+
+    @Test
+    public void testDefaultPackage() throws Exception {
+        DbImportConfiguration config = getCdbImport("pom-default-package.xml").toParameters();
+        assertEquals("com.example.test", config.getDefaultPackage());
+    }
 
     @Test
     public void testLoadFlat() throws Exception {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java b/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java
index 1f0ed60..c2cdc6d 100644
--- a/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java
+++ b/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterMojoTest.java
@@ -60,17 +60,18 @@ public class DbImporterMojoTest extends AbstractMojoTestCase {
     private static DerbyManager derbyAssembly;
 
     @BeforeClass
-    public static void setUpClass() throws IOException, SQLException {
+    public static void beforeClass() throws IOException, SQLException {
         derbyAssembly = new DerbyManager("target/derby");
     }
 
     @AfterClass
-    public static void tearDownClass() throws IOException, SQLException {
+    public static void afterClass() throws IOException, SQLException {
         derbyAssembly.shutdown();
         derbyAssembly = null;
     }
 
-	public void testToParameters_MeaningfulPk() throws Exception {
+    @Test
+	public void testToParameters_MeaningfulPkTables() throws Exception {
 
 		DbImportConfiguration parameters1 = getCdbImport("dbimporter-pom1.xml").toParameters();
 		assertNull(parameters1.getMeaningfulPkTables());
@@ -116,11 +117,6 @@ public class DbImporterMojoTest extends AbstractMojoTestCase {
 	}
 
     @Test
-	public void testSimpleFiltering() throws Exception {
-		test("testSimpleFiltering");
-	}
-
-    @Test
 	public void testFilteringWithSchema() throws Exception {
 		test("testFilteringWithSchema");
 	}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog-and-schema.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog-and-schema.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog-and-schema.xml
index 5b6932d..185c280 100644
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog-and-schema.xml
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog-and-schema.xml
@@ -28,52 +28,54 @@
                 <configuration>
                     <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
 
-                    <catalog>
-                        <name>catalog-name</name>
-                        <schema>
-                            <name>schema-name</name>
-                            <includeTable>includeTable-01</includeTable>
+                    <reverseEngineering>
+                        <catalog>
+                            <name>catalog-name</name>
+                            <schema>
+                                <name>schema-name</name>
+                                <includeTable>includeTable-01</includeTable>
 
-                            <includeTable>
-                                <pattern>includeTable-02</pattern>
-                            </includeTable>
+                                <includeTable>
+                                    <pattern>includeTable-02</pattern>
+                                </includeTable>
 
-                            <includeTable>
-                                <pattern>includeTable-03</pattern>
+                                <includeTable>
+                                    <pattern>includeTable-03</pattern>
 
-                                <includeColumn>includeColumn-01</includeColumn>
-                                <excludeColumn>excludeColumn-01</excludeColumn>
-                            </includeTable>
+                                    <includeColumn>includeColumn-01</includeColumn>
+                                    <excludeColumn>excludeColumn-01</excludeColumn>
+                                </includeTable>
 
-                            <excludeTable>excludeTable-01</excludeTable>
-                            <excludeTable>
-                                <pattern>excludeTable-02</pattern>
-                            </excludeTable>
-                            <excludeTable>excludeTable-03</excludeTable>
+                                <excludeTable>excludeTable-01</excludeTable>
+                                <excludeTable>
+                                    <pattern>excludeTable-02</pattern>
+                                </excludeTable>
+                                <excludeTable>excludeTable-03</excludeTable>
 
-                            <includeColumn>includeColumn-01</includeColumn>
-                            <includeColumn>
-                                <pattern>includeColumn-02</pattern>
-                            </includeColumn>
-                            <includeColumn>includeColumn-03</includeColumn>
-                            <excludeColumn>excludeColumn-01</excludeColumn>
-                            <excludeColumn>
-                                <pattern>excludeColumn-02</pattern>
-                            </excludeColumn>
-                            <excludeColumn>excludeColumn-03</excludeColumn>
+                                <includeColumn>includeColumn-01</includeColumn>
+                                <includeColumn>
+                                    <pattern>includeColumn-02</pattern>
+                                </includeColumn>
+                                <includeColumn>includeColumn-03</includeColumn>
+                                <excludeColumn>excludeColumn-01</excludeColumn>
+                                <excludeColumn>
+                                    <pattern>excludeColumn-02</pattern>
+                                </excludeColumn>
+                                <excludeColumn>excludeColumn-03</excludeColumn>
 
-                            <includeProcedure>includeProcedure-01</includeProcedure>
-                            <includeProcedure>
-                                <pattern>includeProcedure-02</pattern>
-                            </includeProcedure>
-                            <includeProcedure>includeProcedure-03</includeProcedure>
-                            <excludeProcedure>excludeProcedure-01</excludeProcedure>
-                            <excludeProcedure>
-                                <pattern>excludeProcedure-02</pattern>
-                            </excludeProcedure>
-                            <excludeProcedure>excludeProcedure-03</excludeProcedure>
-                        </schema>
-                    </catalog>
+                                <includeProcedure>includeProcedure-01</includeProcedure>
+                                <includeProcedure>
+                                    <pattern>includeProcedure-02</pattern>
+                                </includeProcedure>
+                                <includeProcedure>includeProcedure-03</includeProcedure>
+                                <excludeProcedure>excludeProcedure-01</excludeProcedure>
+                                <excludeProcedure>
+                                    <pattern>excludeProcedure-02</pattern>
+                                </excludeProcedure>
+                                <excludeProcedure>excludeProcedure-03</excludeProcedure>
+                            </schema>
+                        </catalog>
+                    </reverseEngineering>
                 </configuration>
             </plugin>
         </plugins>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog.xml
index 43bd650..b47f49d 100644
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog.xml
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog.xml
@@ -28,55 +28,57 @@
                 <configuration>
                     <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
 
-                    <catalog>catalog-name-01</catalog>
+                    <reverseEngineering>
+                        <catalog>catalog-name-01</catalog>
 
-                    <catalog>
-                        <name>catalog-name-02</name>
-                    </catalog>
+                        <catalog>
+                            <name>catalog-name-02</name>
+                        </catalog>
 
-                    <catalog>
-                        <name>catalog-name-03</name>
-                        <includeTable>includeTable-01</includeTable>
+                        <catalog>
+                            <name>catalog-name-03</name>
+                            <includeTable>includeTable-01</includeTable>
 
-                        <includeTable>
-                            <pattern>includeTable-02</pattern>
-                        </includeTable>
+                            <includeTable>
+                                <pattern>includeTable-02</pattern>
+                            </includeTable>
 
-                        <includeTable>
-                            <pattern>includeTable-03</pattern>
+                            <includeTable>
+                                <pattern>includeTable-03</pattern>
 
-                            <includeColumn>includeColumn-01</includeColumn>
-                            <excludeColumn>excludeColumn-01</excludeColumn>
-                        </includeTable>
+                                <includeColumn>includeColumn-01</includeColumn>
+                                <excludeColumn>excludeColumn-01</excludeColumn>
+                            </includeTable>
 
-                        <excludeTable>excludeTable-01</excludeTable>
-                        <excludeTable>
-                            <pattern>excludeTable-02</pattern>
-                        </excludeTable>
-                        <excludeTable>excludeTable-03</excludeTable>
+                            <excludeTable>excludeTable-01</excludeTable>
+                            <excludeTable>
+                                <pattern>excludeTable-02</pattern>
+                            </excludeTable>
+                            <excludeTable>excludeTable-03</excludeTable>
 
-                        <includeColumn>includeColumn-01</includeColumn>
-                        <includeColumn>
-                            <pattern>includeColumn-02</pattern>
-                        </includeColumn>
-                        <includeColumn>includeColumn-03</includeColumn>
-                        <excludeColumn>excludeColumn-01</excludeColumn>
-                        <excludeColumn>
-                            <pattern>excludeColumn-02</pattern>
-                        </excludeColumn>
-                        <excludeColumn>excludeColumn-03</excludeColumn>
+                            <includeColumn>includeColumn-01</includeColumn>
+                            <includeColumn>
+                                <pattern>includeColumn-02</pattern>
+                            </includeColumn>
+                            <includeColumn>includeColumn-03</includeColumn>
+                            <excludeColumn>excludeColumn-01</excludeColumn>
+                            <excludeColumn>
+                                <pattern>excludeColumn-02</pattern>
+                            </excludeColumn>
+                            <excludeColumn>excludeColumn-03</excludeColumn>
 
-                        <includeProcedure>includeProcedure-01</includeProcedure>
-                        <includeProcedure>
-                            <pattern>includeProcedure-02</pattern>
-                        </includeProcedure>
-                        <includeProcedure>includeProcedure-03</includeProcedure>
-                        <excludeProcedure>excludeProcedure-01</excludeProcedure>
-                        <excludeProcedure>
-                            <pattern>excludeProcedure-02</pattern>
-                        </excludeProcedure>
-                        <excludeProcedure>excludeProcedure-03</excludeProcedure>
-                    </catalog>
+                            <includeProcedure>includeProcedure-01</includeProcedure>
+                            <includeProcedure>
+                                <pattern>includeProcedure-02</pattern>
+                            </includeProcedure>
+                            <includeProcedure>includeProcedure-03</includeProcedure>
+                            <excludeProcedure>excludeProcedure-01</excludeProcedure>
+                            <excludeProcedure>
+                                <pattern>excludeProcedure-02</pattern>
+                            </excludeProcedure>
+                            <excludeProcedure>excludeProcedure-03</excludeProcedure>
+                        </catalog>
+                    </reverseEngineering>
                 </configuration>
             </plugin>
         </plugins>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema.xml
index 62fc3f5..c355fb8 100644
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema.xml
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema.xml
@@ -28,55 +28,57 @@
                 <configuration>
                     <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
 
-                    <schema>schema-name-01</schema>
+                    <reverseEngineering>
+                        <schema>schema-name-01</schema>
 
-                    <schema>
-                        <name>schema-name-02</name>
-                    </schema>
+                        <schema>
+                            <name>schema-name-02</name>
+                        </schema>
 
-                    <schema>
-                        <name>schema-name-03</name>
-                        <includeTable>includeTable-01</includeTable>
+                        <schema>
+                            <name>schema-name-03</name>
+                            <includeTable>includeTable-01</includeTable>
 
-                        <includeTable>
-                            <pattern>includeTable-02</pattern>
-                        </includeTable>
+                            <includeTable>
+                                <pattern>includeTable-02</pattern>
+                            </includeTable>
 
-                        <includeTable>
-                            <pattern>includeTable-03</pattern>
+                            <includeTable>
+                                <pattern>includeTable-03</pattern>
 
-                            <includeColumn>includeColumn-01</includeColumn>
-                            <excludeColumn>excludeColumn-01</excludeColumn>
-                        </includeTable>
+                                <includeColumn>includeColumn-01</includeColumn>
+                                <excludeColumn>excludeColumn-01</excludeColumn>
+                            </includeTable>
 
-                        <excludeTable>excludeTable-01</excludeTable>
-                        <excludeTable>
-                            <pattern>excludeTable-02</pattern>
-                        </excludeTable>
-                        <excludeTable>excludeTable-03</excludeTable>
+                            <excludeTable>excludeTable-01</excludeTable>
+                            <excludeTable>
+                                <pattern>excludeTable-02</pattern>
+                            </excludeTable>
+                            <excludeTable>excludeTable-03</excludeTable>
 
-                        <includeColumn>includeColumn-01</includeColumn>
-                        <includeColumn>
-                            <pattern>includeColumn-02</pattern>
-                        </includeColumn>
-                        <includeColumn>includeColumn-03</includeColumn>
-                        <excludeColumn>excludeColumn-01</excludeColumn>
-                        <excludeColumn>
-                            <pattern>excludeColumn-02</pattern>
-                        </excludeColumn>
-                        <excludeColumn>excludeColumn-03</excludeColumn>
+                            <includeColumn>includeColumn-01</includeColumn>
+                            <includeColumn>
+                                <pattern>includeColumn-02</pattern>
+                            </includeColumn>
+                            <includeColumn>includeColumn-03</includeColumn>
+                            <excludeColumn>excludeColumn-01</excludeColumn>
+                            <excludeColumn>
+                                <pattern>excludeColumn-02</pattern>
+                            </excludeColumn>
+                            <excludeColumn>excludeColumn-03</excludeColumn>
 
-                        <includeProcedure>includeProcedure-01</includeProcedure>
-                        <includeProcedure>
-                            <pattern>includeProcedure-02</pattern>
-                        </includeProcedure>
-                        <includeProcedure>includeProcedure-03</includeProcedure>
-                        <excludeProcedure>excludeProcedure-01</excludeProcedure>
-                        <excludeProcedure>
-                            <pattern>excludeProcedure-02</pattern>
-                        </excludeProcedure>
-                        <excludeProcedure>excludeProcedure-03</excludeProcedure>
-                    </schema>
+                            <includeProcedure>includeProcedure-01</includeProcedure>
+                            <includeProcedure>
+                                <pattern>includeProcedure-02</pattern>
+                            </includeProcedure>
+                            <includeProcedure>includeProcedure-03</includeProcedure>
+                            <excludeProcedure>excludeProcedure-01</excludeProcedure>
+                            <excludeProcedure>
+                                <pattern>excludeProcedure-02</pattern>
+                            </excludeProcedure>
+                            <excludeProcedure>excludeProcedure-03</excludeProcedure>
+                        </schema>
+                    </reverseEngineering>
                 </configuration>
             </plugin>
         </plugins>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml
index 10d85e6..0c70eb7 100644
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml
@@ -18,25 +18,27 @@
   ~    under the License.
   -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
 	http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
-	<name>DbImporterMojo Test1</name>	
+    <name>DbImporterMojo Test1</name>
 
-	<build>
-		<plugins>
-			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
-				<configuration>
-					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testDefaultPackage.map.xml</map>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-cayenne-plugin</artifactId>
+                <configuration>
+                    <map>target/test-classes/org/apache/cayenne/tools/dbimport/testDefaultPackage.map.xml</map>
                     <defaultPackage>com.example.test</defaultPackage>
                     <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
                     <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url>
 
-                    <schema>SCHEMA_01</schema>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
+                    <reverseEngineering>
+                        <schema>SCHEMA_01</schema>
+                    </reverseEngineering>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml
index 70806d7..cc92813 100644
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml
@@ -18,24 +18,26 @@
   ~    under the License.
   -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
 	http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
-	<name>DbImporterMojo Test1</name>	
+    <name>DbImporterMojo Test1</name>
 
-	<build>
-		<plugins>
-			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
-				<configuration>
-					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.map.xml</map>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-cayenne-plugin</artifactId>
+                <configuration>
+                    <map>target/test-classes/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.map.xml</map>
                     <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
                     <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url>
 
-                    <schema>SCHEMA_01</schema>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
+                    <reverseEngineering>
+                        <schema>SCHEMA_01</schema>
+                    </reverseEngineering>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude-pom.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude-pom.xml
deleted file mode 100644
index 8b1ba32..0000000
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude-pom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you 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.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
-	http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-	<name>DbImporterMojo Test1</name>	
-
-	<build>
-		<plugins>
-			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
-				<configuration>
-					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude.map.xml</map>
-                    <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
-                    <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url>
-
-                    <schema>SCHEMA_01</schema>
-
-                    <tablePattern>Parent</tablePattern>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
-
-</project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude.map.xml-result
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude.map.xml-result b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude.map.xml-result
deleted file mode 100644
index b07dfb6..0000000
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude.map.xml-result
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-	Licensed to the Apache Software Foundation (ASF) under one
-	or more contributor license agreements.  See the NOTICE file
-	distributed with this work for additional information
-	regarding copyright ownership.  The ASF licenses this file
-	to you 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.
--->
-<data-map xmlns="http://cayenne.apache.org/schema/8/modelMap"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://cayenne.apache.org/schema/8/modelMap http://cayenne.apache.org/schema/8/modelMap.xsd"
-          project-version="8">
-    <db-entity name="PARENT" schema="SCHEMA_01">
-        <db-attribute name="COL2" type="CHAR" length="25"/>
-        <db-attribute name="COL3" type="DECIMAL" length="10" scale="2"/>
-        <db-attribute name="COL4" type="VARCHAR" length="25"/>
-        <db-attribute name="COL5" type="DATE" length="10"/>
-        <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
-    </db-entity>
-    <obj-entity name="Parent" className="Parent" dbEntityName="PARENT">
-        <obj-attribute name="col2" type="java.lang.String" db-attribute-path="COL2"/>
-        <obj-attribute name="col3" type="java.math.BigDecimal" db-attribute-path="COL3"/>
-        <obj-attribute name="col4" type="java.lang.String" db-attribute-path="COL4"/>
-        <obj-attribute name="col5" type="java.util.Date" db-attribute-path="COL5"/>
-    </obj-entity>
-</data-map>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude.sql
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude.sql b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude.sql
deleted file mode 100644
index dba8da6..0000000
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude.sql
+++ /dev/null
@@ -1,64 +0,0 @@
---  Licensed to the Apache Software Foundation (ASF) under one
---  or more contributor license agreements.  See the NOTICE file
---  distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
---  to you 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.
-
-CREATE SCHEMA schema_01;
-SET SCHEMA schema_01;
-
-CREATE TABLE schema_01.Parent (
-  id INTEGER NOT NULL,
-  COL2 CHAR(25),
-  COL3 DECIMAL(10,2),
-  COL4 VARCHAR(25),
-  COL5 DATE,
-
-  PRIMARY KEY (id),
-  UNIQUE (COL3)
-);
-
-CREATE TABLE schema_01.Child (
-  id INTEGER NOT NULL,
-  Parent_id CHAR(25),
-  COL3 DECIMAL(10,2),
-  COL4 VARCHAR(25),
-  COL5 DATE,
-
-  PRIMARY KEY (id)
-);
-
-CREATE SCHEMA schema_02;
-SET SCHEMA schema_02;
-
-CREATE TABLE schema_02.Parent (
-  id INTEGER NOT NULL,
-  COL2 CHAR(25),
-  COL3 DECIMAL(10,2),
-  COL4 VARCHAR(25),
-  COL5 DATE,
-
-  PRIMARY KEY (id),
-  UNIQUE (COL3)
-);
-
-CREATE TABLE schema_02.Child (
-  id INTEGER NOT NULL,
-  Parent_id CHAR(25),
-  COL3 DECIMAL(10,2),
-  COL4 VARCHAR(25),
-  COL5 DATE,
-
-  PRIMARY KEY (id)
-);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveCustomObjMappings-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveCustomObjMappings-pom.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveCustomObjMappings-pom.xml
index 1dc63ea..8abae0d 100644
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveCustomObjMappings-pom.xml
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveCustomObjMappings-pom.xml
@@ -18,26 +18,29 @@
   ~    under the License.
   -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
 	http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
-	<name>DbImporterMojo Test1</name>	
+    <name>DbImporterMojo Test1</name>
 
-	<build>
-		<plugins>
-			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
-				<configuration>
-					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testPreserveCustomObjMappings.map.xml</map>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-cayenne-plugin</artifactId>
+                <configuration>
+                    <map>target/test-classes/org/apache/cayenne/tools/dbimport/testPreserveCustomObjMappings.map.xml
+                    </map>
                     <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
                     <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url>
 
-                    <schema>
-                        <name>SCHEMA_01</name>
-                    </schema>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
+                    <reverseEngineering>
+                        <schema>
+                            <name>SCHEMA_01</name>
+                        </schema>
+                    </reverseEngineering>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude-pom.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude-pom.xml
index 66b051e..20411f4 100644
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude-pom.xml
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude-pom.xml
@@ -18,28 +18,29 @@
   ~    under the License.
   -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
 	http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
-	<name>DbImporterMojo Test1</name>	
+    <name>DbImporterMojo Test1</name>
 
-	<build>
-		<plugins>
-			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
-				<configuration>
-					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude.map.xml</map>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-cayenne-plugin</artifactId>
+                <configuration>
+                    <map>target/test-classes/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude.map.xml</map>
                     <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
                     <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url>
 
-                    <schema>
-                        <name>SCHEMA_01</name>
-                    </schema>
-
-                    <excludeTables>Child</excludeTables>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
+                    <reverseEngineering>
+                        <schema>
+                            <name>SCHEMA_01</name>
+                        </schema>
+                        <excludeTable>Child</excludeTable>
+                    </reverseEngineering>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering-pom.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering-pom.xml
deleted file mode 100644
index 1cb3ed6..0000000
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering-pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~    or more contributor license agreements.  See the NOTICE file
-  ~    distributed with this work for additional information
-  ~    regarding copyright ownership.  The ASF licenses this file
-  ~    to you 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.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
-	http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-	<name>DbImporterMojo Test1</name>	
-
-	<build>
-		<plugins>
-			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
-				<configuration>
-					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testSimpleFiltering.map.xml</map>
-                    <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
-                    <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url>
-
-                    <tablePattern>Parent</tablePattern>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
-
-</project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering.map.xml-result
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering.map.xml-result b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering.map.xml-result
deleted file mode 100644
index e5ba734..0000000
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering.map.xml-result
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-	Licensed to the Apache Software Foundation (ASF) under one
-	or more contributor license agreements.  See the NOTICE file
-	distributed with this work for additional information
-	regarding copyright ownership.  The ASF licenses this file
-	to you 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.
--->
-<data-map xmlns="http://cayenne.apache.org/schema/8/modelMap"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://cayenne.apache.org/schema/8/modelMap http://cayenne.apache.org/schema/8/modelMap.xsd"
-          project-version="8">
-    <db-entity name="PARENT" schema="APP">
-        <db-attribute name="COL2" type="CHAR" length="25"/>
-        <db-attribute name="COL3" type="DECIMAL" length="10" scale="2"/>
-        <db-attribute name="COL4" type="VARCHAR" length="25"/>
-        <db-attribute name="COL5" type="DATE" length="10"/>
-        <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
-    </db-entity>
-    <obj-entity name="Parent" className="Parent" dbEntityName="PARENT">
-        <obj-attribute name="col2" type="java.lang.String" db-attribute-path="COL2"/>
-        <obj-attribute name="col3" type="java.math.BigDecimal" db-attribute-path="COL3"/>
-        <obj-attribute name="col4" type="java.lang.String" db-attribute-path="COL4"/>
-        <obj-attribute name="col5" type="java.util.Date" db-attribute-path="COL5"/>
-    </obj-entity>
-</data-map>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering.sql
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering.sql b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering.sql
deleted file mode 100644
index 0bdef9a..0000000
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering.sql
+++ /dev/null
@@ -1,37 +0,0 @@
---  Licensed to the Apache Software Foundation (ASF) under one
---  or more contributor license agreements.  See the NOTICE file
---  distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
---  to you 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.
-
-CREATE TABLE Parent (
-  id INTEGER NOT NULL,
-  COL2 CHAR(25),
-  COL3 DECIMAL(10,2),
-  COL4 VARCHAR(25),
-  COL5 DATE,
-
-  PRIMARY KEY (id),
-  UNIQUE (COL3)
-);
-
-CREATE TABLE Child (
-  id INTEGER NOT NULL,
-  Parent_id CHAR(25),
-  COL3 DECIMAL(10,2),
-  COL4 VARCHAR(25),
-  COL5 DATE,
-
-  PRIMARY KEY (id)
-);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSupportsCatalogsOnReverseEngineering-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSupportsCatalogsOnReverseEngineering-pom.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSupportsCatalogsOnReverseEngineering-pom.xml
index 94e2965..1e07a50 100644
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSupportsCatalogsOnReverseEngineering-pom.xml
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSupportsCatalogsOnReverseEngineering-pom.xml
@@ -28,11 +28,16 @@
             <plugin>
                 <artifactId>maven-cayenne-plugin</artifactId>
                 <configuration>
-                    <map>target/test-classes/org/apache/cayenne/tools/dbimport/testSupportsCatalogsOnReverseEngineering.map.xml</map>
+                    <map>
+                        target/test-classes/org/apache/cayenne/tools/dbimport/testSupportsCatalogsOnReverseEngineering.map.xml
+                    </map>
                     <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
                     <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url>
                     <adapter>org.apache.cayenne.dba.postgres.PostgresAdapter</adapter>
-                    <catalog>DbImporterMojoTest1</catalog>
+
+                    <reverseEngineering>
+                        <catalog>DbImporterMojoTest1</catalog>
+                    </reverseEngineering>
                 </configuration>
             </plugin>
         </plugins>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testViewsExclude-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testViewsExclude-pom.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testViewsExclude-pom.xml
index 1f8f25d..1045482 100644
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testViewsExclude-pom.xml
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testViewsExclude-pom.xml
@@ -18,24 +18,26 @@
   under the License.
   -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
 	http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
-	<name>DbImporterMojo Test1</name>	
+    <name>DbImporterMojo Test1</name>
 
-	<build>
-		<plugins>
-			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
-				<configuration>
-					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testViewsExclude.map.xml</map>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-cayenne-plugin</artifactId>
+                <configuration>
+                    <map>target/test-classes/org/apache/cayenne/tools/dbimport/testViewsExclude.map.xml</map>
                     <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
                     <url>jdbc:derby:memory:DbImporterMojoTest;create=true</url>
 
-                    <excludeTables>v_*</excludeTables>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
+                    <reverseEngineering>
+                        <excludeTable>^V_.*</excludeTable>
+                    </reverseEngineering>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e9e81a6e/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom3.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom3.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom3.xml
index 6e63b69..71d8d56 100644
--- a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom3.xml
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom3.xml
@@ -28,8 +28,7 @@
 			<plugin>
 				<artifactId>maven-cayenne-plugin</artifactId>
 				<configuration>
-					<!-- this is a deprecated config, but it should work -->
-					<meaningfulPk>true</meaningfulPk>
+					<meaningfulPkTables>*</meaningfulPkTables>
 				</configuration>
 			</plugin>
 		</plugins>


Mime
View raw message