cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [1/7] CAY-1946 CDbimport improvements
Date Wed, 29 Oct 2014 18:40:36 GMT
Repository: cayenne
Updated Branches:
  refs/heads/CAY-1946 [created] fde7761f8


http://git-wip-us.apache.org/repos/asf/cayenne/blob/fde7761f/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-01.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-01.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-01.xml
new file mode 100644
index 0000000..c3da6bb
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-01.xml
@@ -0,0 +1,96 @@
+<?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/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
+                    <catalog>catalog-name-01</catalog>
+
+                    <catalog>
+                        <name>catalog-name-02</name>
+
+                        <schema>schema-name-01</schema>
+
+                        <schema>
+                            <name>schema-name-02</name>
+
+                            <includeTable>incTable-01</includeTable>
+                            <excludeTable>excTable-01</excludeTable>
+
+                            <includeTable>
+                                <pattern>incTable-02</pattern>
+
+                                <includeColumn>includeColumn-01</includeColumn>
+                                <excludeColumn>excludeColumn-01</excludeColumn>
+                            </includeTable>
+
+                            <includeColumn>includeColumn-02</includeColumn>
+                            <excludeColumn>excludeColumn-02</excludeColumn>
+                        </schema>
+
+                        <includeColumn>includeColumn-03</includeColumn>
+                        <excludeColumn>excludeColumn-03</excludeColumn>
+                    </catalog>
+
+                    <schema>schema-name-03</schema>
+
+                    <schema>
+                        <name>schema-name-04</name>
+
+                        <includeTable>incTable-04</includeTable>
+                        <excludeTable>excTable-04</excludeTable>
+
+                        <includeTable>
+                            <pattern>incTable-05</pattern>
+
+                            <includeColumn>includeColumn-04</includeColumn>
+                            <excludeColumn>excludeColumn-04</excludeColumn>
+                        </includeTable>
+
+                        <includeColumn>includeColumn-04</includeColumn>
+                        <excludeColumn>excludeColumn-04</excludeColumn>
+                    </schema>
+
+                    <includeTable>incTable-06</includeTable>
+                    <excludeTable>excTable-06</excludeTable>
+
+                    <includeTable>
+                        <pattern>incTable-07</pattern>
+
+                        <includeColumn>includeColumn-06</includeColumn>
+                        <excludeColumn>excludeColumn-06</excludeColumn>
+                    </includeTable>
+
+                    <includeColumn>includeColumn-05</includeColumn>
+                    <excludeColumn>excludeColumn-05</excludeColumn>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/fde7761f/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
new file mode 100644
index 0000000..5b6932d
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog-and-schema.xml
@@ -0,0 +1,82 @@
+<?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">
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-cayenne-plugin</artifactId>
+                <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>
+
+                            <includeTable>
+                                <pattern>includeTable-02</pattern>
+                            </includeTable>
+
+                            <includeTable>
+                                <pattern>includeTable-03</pattern>
+
+                                <includeColumn>includeColumn-01</includeColumn>
+                                <excludeColumn>excludeColumn-01</excludeColumn>
+                            </includeTable>
+
+                            <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>
+
+                            <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>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/fde7761f/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
new file mode 100644
index 0000000..43bd650
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog.xml
@@ -0,0 +1,85 @@
+<?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">
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-cayenne-plugin</artifactId>
+                <configuration>
+                    <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
+
+                    <catalog>catalog-name-01</catalog>
+
+                    <catalog>
+                        <name>catalog-name-02</name>
+                    </catalog>
+
+                    <catalog>
+                        <name>catalog-name-03</name>
+                        <includeTable>includeTable-01</includeTable>
+
+                        <includeTable>
+                            <pattern>includeTable-02</pattern>
+                        </includeTable>
+
+                        <includeTable>
+                            <pattern>includeTable-03</pattern>
+
+                            <includeColumn>includeColumn-01</includeColumn>
+                            <excludeColumn>excludeColumn-01</excludeColumn>
+                        </includeTable>
+
+                        <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>
+
+                        <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>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/fde7761f/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-flat.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-flat.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-flat.xml
new file mode 100644
index 0000000..0645fe3
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-flat.xml
@@ -0,0 +1,76 @@
+<?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">
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-cayenne-plugin</artifactId>
+                <configuration>
+                    <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
+
+                    <includeTable>includeTable-01</includeTable>
+
+                    <includeTable>
+                        <pattern>includeTable-02</pattern>
+                    </includeTable>
+
+                    <includeTable>
+                        <pattern>includeTable-03</pattern>
+
+                        <includeColumn>includeColumn-01</includeColumn>
+                        <excludeColumn>excludeColumn-01</excludeColumn>
+                    </includeTable>
+
+                    <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>
+
+                    <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>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/fde7761f/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-mapping.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-mapping.xml b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-mapping.xml
new file mode 100644
index 0000000..10c99da
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-mapping.xml
@@ -0,0 +1,67 @@
+<?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">
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-cayenne-plugin</artifactId>
+                <configuration>
+                    <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
+
+                    <typeMapper >
+                        <mapperClassName>class</mapperClassName>
+                        <usePrimitives>false</usePrimitives>
+
+                        <type>
+                            <java>my.personal.type</java>
+                            <jdbc>varchar</jdbc>
+                        </type>
+                        <type>
+                            <java>java-01</java>
+                            <jdbc>jdbc-01</jdbc>
+                        </type>
+                        <type>
+                            <java>java-02</java>
+                            <jdbc>jdbc-02</jdbc>
+                            <length>21</length>
+                            <notNull>true</notNull>
+                        </type>
+                        <type>
+                            <java>java-03</java>
+                            <jdbc>jdbc-03</jdbc>
+                            <precision>5</precision>
+                            <scale>2</scale>
+                        </type>
+                        <type>
+                            <java>java-03</java>
+                            <jdbc>jdbc-03</jdbc>
+                            <precision>7</precision>
+                            <notNull>true</notNull>
+                        </type>
+                    </typeMapper>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/fde7761f/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
new file mode 100644
index 0000000..62fc3f5
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema.xml
@@ -0,0 +1,85 @@
+<?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">
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-cayenne-plugin</artifactId>
+                <configuration>
+                    <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
+
+                    <schema>schema-name-01</schema>
+
+                    <schema>
+                        <name>schema-name-02</name>
+                    </schema>
+
+                    <schema>
+                        <name>schema-name-03</name>
+                        <includeTable>includeTable-01</includeTable>
+
+                        <includeTable>
+                            <pattern>includeTable-02</pattern>
+                        </includeTable>
+
+                        <includeTable>
+                            <pattern>includeTable-03</pattern>
+
+                            <includeColumn>includeColumn-01</includeColumn>
+                            <excludeColumn>excludeColumn-01</excludeColumn>
+                        </includeTable>
+
+                        <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>
+
+                        <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>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/fde7761f/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
new file mode 100644
index 0000000..70806d7
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml
@@ -0,0 +1,41 @@
+<?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/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>
+
+</project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/fde7761f/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.map.xml-result
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.map.xml-result b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.map.xml-result
new file mode 100644
index 0000000..093f6cc
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.map.xml-result
@@ -0,0 +1,51 @@
+<?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/7/modelMap"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://cayenne.apache.org/schema/7/modelMap http://cayenne.apache.org/schema/7/modelMap.xsd"
+          project-version="7">
+    <property name="defaultSchema" value="SCHEMA_01"/>
+    <db-entity name="CHILD" schema="SCHEMA_01">
+        <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-attribute name="PARENT_ID" type="CHAR" length="25"/>
+    </db-entity>
+    <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="Child" className="Child" dbEntityName="CHILD">
+        <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-attribute name="parentId" type="java.lang.String" db-attribute-path="PARENT_ID"/>
+    </obj-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/fde7761f/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.sql
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.sql b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.sql
new file mode 100644
index 0000000..7e172f5
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.sql
@@ -0,0 +1,48 @@
+
+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/fde7761f/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
new file mode 100644
index 0000000..8b1ba32
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude-pom.xml
@@ -0,0 +1,43 @@
+<?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/fde7761f/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
new file mode 100644
index 0000000..5853842
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude.map.xml-result
@@ -0,0 +1,37 @@
+<?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/7/modelMap"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://cayenne.apache.org/schema/7/modelMap http://cayenne.apache.org/schema/7/modelMap.xsd"
+          project-version="7">
+    <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/fde7761f/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
new file mode 100644
index 0000000..7e172f5
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOldParamsSchemasAndTableExclude.sql
@@ -0,0 +1,48 @@
+
+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/fde7761f/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
new file mode 100644
index 0000000..f6665f8
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude-pom.xml
@@ -0,0 +1,45 @@
+<?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/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>
+
+                    <excludeTable>Child</excludeTable>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/fde7761f/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude.map.xml-result
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude.map.xml-result b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude.map.xml-result
new file mode 100644
index 0000000..5853842
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude.map.xml-result
@@ -0,0 +1,37 @@
+<?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/7/modelMap"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://cayenne.apache.org/schema/7/modelMap http://cayenne.apache.org/schema/7/modelMap.xsd"
+          project-version="7">
+    <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/fde7761f/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude.sql
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude.sql b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude.sql
new file mode 100644
index 0000000..7e172f5
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude.sql
@@ -0,0 +1,48 @@
+
+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/fde7761f/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
new file mode 100644
index 0000000..00f10ff
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering-pom.xml
@@ -0,0 +1,41 @@
+<?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>
+
+                    <includeTable>Parent</includeTable>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/fde7761f/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
new file mode 100644
index 0000000..f8eb58e
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering.map.xml-result
@@ -0,0 +1,37 @@
+<?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/7/modelMap"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://cayenne.apache.org/schema/7/modelMap http://cayenne.apache.org/schema/7/modelMap.xsd"
+          project-version="7">
+    <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/fde7761f/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
new file mode 100644
index 0000000..fb820b7
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSimpleFiltering.sql
@@ -0,0 +1,20 @@
+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/fde7761f/plugins/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/pom.xml b/plugins/pom.xml
index 042f904..5408e03 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -96,6 +96,22 @@
 					</execution>
 				</executions>
 			</plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-plugin-plugin</artifactId>
+                <version>3.3</version>
+                <configuration>
+                    <goalPrefix>signature</goalPrefix>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>descriptor</goal>
+                        </goals>
+                        <phase>process-classes</phase>
+                    </execution>
+                </executions>
+            </plugin>
 		</plugins>
 	</build>
 </project>


Mime
View raw message