cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [2/2] cayenne git commit: CAY-2214 cdbimport: rename maven-cayenne-plugin - change artifactId to cayenne-maven-plugin - new module for the old version of plugin
Date Tue, 31 Jan 2017 11:02:54 GMT
CAY-2214 cdbimport: rename maven-cayenne-plugin
     - change artifactId to cayenne-maven-plugin
     - new module for the old version of plugin


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

Branch: refs/heads/master
Commit: bbd7f62f1448d5fb36ed9359859ed369f68a04bd
Parents: 2cddff9
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Tue Jan 31 14:02:14 2017 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
Committed: Tue Jan 31 14:02:14 2017 +0300

----------------------------------------------------------------------
 plugins/cayenne-maven-plugin/pom.xml            |  15 +-
 .../cayenne/tools/CayenneGeneratorMojo.java     |  66 +++-----
 .../apache/cayenne/tools/DbGeneratorMojo.java   |  43 ++----
 .../test/resources/cgen/project-to-test/pom.xml |   2 +-
 .../org/apache/cayenne/tools/config/pom-01.xml  |   2 +-
 .../tools/config/pom-catalog-and-schema.xml     |   2 +-
 .../apache/cayenne/tools/config/pom-catalog.xml |   2 +-
 .../tools/config/pom-default-package.xml        |   2 +-
 .../apache/cayenne/tools/config/pom-flat.xml    |   2 +-
 .../apache/cayenne/tools/config/pom-mapping.xml |   2 +-
 .../cayenne/tools/config/pom-schema-2.xml       |   2 +-
 .../apache/cayenne/tools/config/pom-schema.xml  |   2 +-
 .../config/pom-skip-primary-key-loading.xml     |   2 +-
 .../config/pom-skip-relationships-loading.xml   |   2 +-
 .../cayenne/tools/config/pom-table-types.xml    |   2 +-
 .../dbimport/testComplexChangeOrder-pom.xml     |   2 +-
 .../testCustomObjectLayerSettings-pom.xml       |   2 +-
 .../dbimport/testDbAttributeChange-pom.xml      |   2 +-
 .../tools/dbimport/testDefaultPackage-pom.xml   |   2 +-
 .../dbimport/testFilteringWithSchema-pom.xml    |   2 +-
 .../dbimport/testFkAttributeRename-pom.xml      |   2 +-
 ...tFlattensManyToManyWithRecursiveLink-pom.xml |   2 +-
 .../dbimport/testForceDataMapSchema-pom.xml     |   2 +-
 .../testImportAddTableAndColumn-pom.xml         |   2 +-
 .../tools/dbimport/testImportNewDataMap-pom.xml |   2 +-
 .../dbimport/testImportWithoutChanges-pom.xml   |   2 +-
 .../cayenne/tools/dbimport/testOneToOne-pom.xml |   2 +-
 .../testPreserveCustomObjMappings-pom.xml       |   2 +-
 .../dbimport/testPreserveRelationships-pom.xml  |   2 +-
 .../dbimport/testSchemasAndTableExclude-pom.xml |   2 +-
 .../dbimport/testSkipPrimaryKeyLoading-pom.xml  |   2 +-
 .../testSkipRelationshipsLoading-pom.xml        |   2 +-
 ...SupportsCatalogsOnReverseEngineering-pom.xml |   2 +-
 .../tools/dbimport/testTableTypes-pom.xml       |   2 +-
 .../dbimport/testUnFlattensManyToMany-pom.xml   |   2 +-
 .../tools/dbimport/testViewsExclude-pom.xml     |   2 +-
 .../apache/cayenne/tools/dbimporter-pom1.xml    |   2 +-
 .../apache/cayenne/tools/dbimporter-pom2.xml    |   2 +-
 .../apache/cayenne/tools/dbimporter-pom3.xml    |   2 +-
 plugins/maven-cayenne-plugin/pom.xml            | 150 +++++++++++++++++++
 .../cayenne/tools/CayenneGeneratorOldMojo.java  |  49 ++++++
 .../cayenne/tools/DbGeneratorOldMojo.java       |  49 ++++++
 .../apache/cayenne/tools/DbImporterOldMojo.java |  50 +++++++
 .../META-INF/m2e/lifecycle-mapping-metadata.xml |  32 ++++
 .../tools/CayenneGeneratorOldMojoTest.java      |  77 ++++++++++
 .../DbImporterOldMojoConfigurationTest.java     | 110 ++++++++++++++
 .../src/test/resources/cdbimport/pom-01.xml     |  99 ++++++++++++
 .../cdbimport/pom-catalog-and-schema.xml        |  84 +++++++++++
 .../test/resources/cdbimport/pom-catalog.xml    |  87 +++++++++++
 .../resources/cdbimport/pom-default-package.xml |  38 +++++
 .../src/test/resources/cdbimport/pom-flat.xml   |  78 ++++++++++
 .../test/resources/cdbimport/pom-mapping.xml    |  67 +++++++++
 .../test/resources/cdbimport/pom-schema-2.xml   |  41 +++++
 .../src/test/resources/cdbimport/pom-schema.xml |  87 +++++++++++
 .../cdbimport/pom-skip-primary-key-loading.xml  |  39 +++++
 .../pom-skip-relationships-loading.xml          |  39 +++++
 .../resources/cdbimport/pom-table-types.xml     |  41 +++++
 .../test/resources/cgen/cayenne-testDomain.xml  |   5 +
 .../test/resources/cgen/project-to-test/pom.xml |  56 +++++++
 .../resources/cgen/testAdditionalMap.map.xml    |  18 +++
 .../test/resources/cgen/testDomainMap.map.xml   |  45 ++++++
 plugins/pom.xml                                 |   2 +
 62 files changed, 1431 insertions(+), 108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/pom.xml b/plugins/cayenne-maven-plugin/pom.xml
index bebdcf4..1c2e6ea 100644
--- a/plugins/cayenne-maven-plugin/pom.xml
+++ b/plugins/cayenne-maven-plugin/pom.xml
@@ -18,9 +18,20 @@
 	</parent>
 
 	<modelVersion>4.0.0</modelVersion>
-	<artifactId>maven-cayenne-plugin</artifactId>
+	<artifactId>cayenne-maven-plugin</artifactId>
 	<packaging>maven-plugin</packaging>
-	<name>maven-cayenne-plugin: Cayenne Maven Plugin</name>
+	<name>cayenne-maven-plugin: Cayenne Maven Plugin</name>
+
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-plugin-plugin</artifactId>
+				<configuration>
+					<goalPrefix>cayenne</goalPrefix>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
 
 	<dependencies>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java b/plugins/cayenne-maven-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java
index 46a7cb5..98e54e3 100644
--- a/plugins/cayenne-maven-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java
+++ b/plugins/cayenne-maven-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java
@@ -27,6 +27,9 @@ import org.apache.commons.logging.Log;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 
 import java.io.File;
 import java.io.FilenameFilter;
@@ -36,33 +39,29 @@ import java.io.FilenameFilter;
  * adapter to DefaultClassGenerator class.
  * 
  * @since 3.0
- *
- * @phase generate-sources
- * @goal cgen
  */
+@Mojo(name = "cgen", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
 public class CayenneGeneratorMojo extends AbstractMojo {
 
     public static final File[] NO_FILES = new File[0];
+
     /**
 	 * Path to additional DataMap XML files to use for class generation.
-	 *
-	 * @parameter additionalMaps="additionalMaps"
 	 */
+    @Parameter
 	private File additionalMaps;
 
 	/**
 	 * Whether we are generating classes for the client tier in a Remote Object
 	 * Persistence application. Default is <code>false</code>.
-	 *
-	 * @parameter client="client" default-value="false"
 	 */
+	@Parameter(defaultValue = "false")
 	private boolean client;
 
 	/**
 	 * Destination directory for Java classes (ignoring their package names).
-	 *
-	 * @parameter destDir="destDir" default-value="${project.build.sourceDirectory}"
 	 */
+	@Parameter(defaultValue = "${project.build.sourceDirectory}")
 	private File destDir;
 
 	/**
@@ -71,68 +70,58 @@ public class CayenneGeneratorMojo extends AbstractMojo {
 	 * build. Standard encodings supported by Java on all platforms are
 	 * US-ASCII, ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, UTF-16. See Sun Java
 	 * Docs for java.nio.charset.Charset for more information.
-	 *
-	 * @parameter encoding="encoding"
 	 */
+	@Parameter
 	private String encoding;
 
 	/**
 	 * Entities (expressed as a perl5 regex) to exclude from template
 	 * generation. (Default is to include all entities in the DataMap).
-	 *
-	 * @parameter excludeEntities="excludeEntities"
 	 */
+	@Parameter
 	private String excludeEntities;
 
 	/**
 	 * Entities (expressed as a perl5 regex) to include in template generation.
 	 * (Default is to include all entities in the DataMap).
-	 *
-	 * @parameter includeEntities="includeEntities"
 	 */
+	@Parameter
 	private String includeEntities;
 
 	/**
 	 * If set to <code>true</code>, will generate subclass/superclass pairs,
 	 * with all generated code included in superclass (default is
 	 * <code>true</code>).
-	 *
-	 * @parameter makePairs="makePairs" default-value="true"
 	 */
+	@Parameter(defaultValue = "true")
 	private boolean makePairs;
 
 	/**
 	 * DataMap XML file to use as a base for class generation.
-	 *
-	 * @parameter map="map"
-	 * @required
 	 */
+	@Parameter(required = true)
 	private File map;
 
 	/**
 	 * Specifies generator iteration target. &quot;entity&quot; performs one
 	 * iteration for each selected entity. &quot;datamap&quot; performs one
 	 * iteration per datamap (This is always one iteration since cgen currently
-	 * supports specifying one-and-only-one datamap). (Default is
-	 * &quot;entity&quot;)
-	 *
-	 * @parameter mode="mode" default-value="entity"
+	 * supports specifying one-and-only-one datamap). (Default is &quot;entity&quot;)
 	 */
+	@Parameter(defaultValue = "entity")
 	private String mode;
 
 	/**
 	 * Name of file for generated output. (Default is &quot;*.java&quot;)
-	 *
-	 * @parameter outputPattern="outputPattern" default-value="*.java"
 	 */
+	@Parameter(defaultValue = "*.java")
 	private String outputPattern;
 
 	/**
 	 * If set to <code>true</code>, will overwrite older versions of generated
 	 * classes. Ignored unless makepairs is set to <code>false</code>.
-	 *
-	 * @parameter overwrite="overwrite" default-value="false"
 	 */
+	@Parameter(defaultValue = "false")
 	private boolean overwrite;
 
 	/**
@@ -142,43 +131,38 @@ public class CayenneGeneratorMojo extends AbstractMojo {
 	 * having superclass in a different package would only make sense when
 	 * <code>usepkgpath</code> is set to <code>true</code>. Otherwise classes
 	 * from different packages will end up in the same directory.
-	 *
-	 * @parameter superPkg="superPkg"
 	 */
+	@Parameter
 	private String superPkg;
 
 	/**
 	 * Location of Velocity template file for Entity superclass generation.
 	 * Ignored unless <code>makepairs</code> set to <code>true</code>. If
 	 * omitted, default template is used.
-	 *
-	 * @parameter superTemplate="superTemplate"
 	 */
+	@Parameter
 	private String superTemplate;
 
 	/**
 	 * Location of Velocity template file for Entity class generation. If
 	 * omitted, default template is used.
-	 *
-	 * @parameter template="template"
 	 */
+	@Parameter
 	private String template;
 
 	/**
 	 * Location of Velocity template file for Embeddable superclass generation.
 	 * Ignored unless <code>makepairs</code> set to <code>true</code>. If
 	 * omitted, default template is used.
-	 *
-	 * @parameter embeddableSuperTemplate="embeddableSuperTemplate"
 	 */
+	@Parameter
 	private String embeddableSuperTemplate;
 
 	/**
 	 * Location of Velocity template file for Embeddable class generation. If
 	 * omitted, default template is used.
-	 *
-	 * @parameter embeddableTemplate="embeddableTemplate"
 	 */
+	@Parameter
 	private String embeddableTemplate;
 
 	/**
@@ -186,17 +170,15 @@ public class CayenneGeneratorMojo extends AbstractMojo {
 	 * in "destDir" corresponding to the class package structure, if set to
 	 * <code>false</code>, classes will be generated in &quot;destDir&quot;
 	 * ignoring their package.
-	 *
-	 * @parameter usePkgPath="usePkgPath" default-value="true"
 	 */
+	@Parameter(defaultValue = "true")
 	private boolean usePkgPath;
 
     /**
      * If set to <code>true</code>, will generate String Property names.
      * Default is <code>false</code>.
-     *
-     * @parameter createPropertyNames="createPropertyNames" default-value="false"
      */
+    @Parameter(defaultValue = "false")
     private boolean createPropertyNames;
 
 	public void execute() throws MojoExecutionException, MojoFailureException {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/main/java/org/apache/cayenne/tools/DbGeneratorMojo.java
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/main/java/org/apache/cayenne/tools/DbGeneratorMojo.java b/plugins/cayenne-maven-plugin/src/main/java/org/apache/cayenne/tools/DbGeneratorMojo.java
index 72c524f..f951cb5 100644
--- a/plugins/cayenne-maven-plugin/src/main/java/org/apache/cayenne/tools/DbGeneratorMojo.java
+++ b/plugins/cayenne-maven-plugin/src/main/java/org/apache/cayenne/tools/DbGeneratorMojo.java
@@ -36,6 +36,9 @@ import org.apache.commons.logging.Log;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 import org.xml.sax.InputSource;
 
 import java.io.File;
@@ -46,97 +49,81 @@ import java.sql.Driver;
  * adapter to DefaultClassGenerator class.
  * 
  * @since 3.0
- * 
- * @phase pre-integration-test
- * @goal cdbgen
  */
+@Mojo(name = "cdbgen", defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST)
 public class DbGeneratorMojo extends AbstractMojo {
 
     /**
      * DataMap XML file to use as a schema descriptor.
-     * 
-     * @parameter map="map"
-     * @required
      */
+    @Parameter(required = true)
     private File map;
 
     /**
      * Java class implementing org.apache.cayenne.dba.DbAdapter. While this
      * attribute is optional (a generic JdbcAdapter is used if not set), it is
      * highly recommended to specify correct target adapter.
-     * 
-     * @parameter adapter="adapter"
      */
+    @Parameter
     private String adapter;
 
     /**
      * A class of JDBC driver to use for the target database.
-     * 
-     * @parameter driver="driver"
-     * @required
      */
+    @Parameter(required = true)
     private String driver;
 
     /**
      * JDBC connection URL of a target database.
-     * 
-     * @parameter url="url"
-     * @required
      */
+    @Parameter(required = true)
     private String url;
 
     /**
      * Database user name.
-     * 
-     * @parameter username="username"
      */
+    @Parameter
     private String username;
 
     /**
      * Database user password.
-     * 
-     * @parameter password="password"
      */
+    @Parameter
     private String password;
 
     /**
      * Defines whether cdbgen should drop the tables before attempting to create
      * new ones. Default is <code>false</code>.
-     * 
-     * @parameter dropTables="dropTables" default-value="false"
      */
+    @Parameter(defaultValue = "false")
     private boolean dropTables;
 
     /**
      * Defines whether cdbgen should drop Cayenne primary key support objects.
      * Default is <code>false</code>.
-     * 
-     * @parameter dropPK="dropPK" default-value="false"
      */
+    @Parameter(defaultValue = "false")
     private boolean dropPK;
 
     /**
      * Defines whether cdbgen should create new tables. Default is
      * <code>true</code>.
-     * 
-     * @parameter createTables="createTables" default-value="true"
      */
+    @Parameter(defaultValue = "true")
     private boolean createTables;
 
     /**
      * Defines whether cdbgen should create Cayenne-specific auto PK objects.
      * Default is <code>true</code>.
-     * 
-     * @parameter createPK="createPK" default-value="true"
      */
+    @Parameter(defaultValue = "true")
     private boolean createPK;
 
     /**
      * Defines whether cdbgen should create foreign key copnstraints. Default is
      * <code>true</code>.
-     * 
-     * @parameter createFK="createFK" default-value="true"
      */
+    @Parameter(defaultValue = "true")
     private boolean createFK;
 
     public void execute() throws MojoExecutionException, MojoFailureException {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/cgen/project-to-test/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/cgen/project-to-test/pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/cgen/project-to-test/pom.xml
index 41d545c..29cb06a 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/cgen/project-to-test/pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/cgen/project-to-test/pom.xml
@@ -35,7 +35,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<map>src/test/resources/cgen/testDomainMap.map.xml</map>
 					<destDir>target/cayenneGeneratedClasses</destDir>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-01.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-01.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-01.xml
index a4a6955..90f5a14 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-01.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-01.xml
@@ -26,7 +26,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog-and-schema.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog-and-schema.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog-and-schema.xml
index d3828ce..a8df865 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog-and-schema.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog-and-schema.xml
@@ -24,7 +24,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog.xml
index 9c919e8..6cfe54d 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-catalog.xml
@@ -24,7 +24,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-default-package.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-default-package.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-default-package.xml
index 7f09b88..f179f61 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-default-package.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-default-package.xml
@@ -24,7 +24,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
                     <dbimport>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-flat.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-flat.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-flat.xml
index 6987454..7532039 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-flat.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-flat.xml
@@ -24,7 +24,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-mapping.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-mapping.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-mapping.xml
index 10c99da..596eab7 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-mapping.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-mapping.xml
@@ -24,7 +24,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema-2.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema-2.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema-2.xml
index 05342fd..de67dd3 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema-2.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema-2.xml
@@ -24,7 +24,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <dbimport>
                         <schema>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema.xml
index 11804fc..54cc365 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-schema.xml
@@ -24,7 +24,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-skip-primary-key-loading.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-skip-primary-key-loading.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-skip-primary-key-loading.xml
index 2c3e6c5..5414a25 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-skip-primary-key-loading.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-skip-primary-key-loading.xml
@@ -24,7 +24,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-skip-relationships-loading.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-skip-relationships-loading.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-skip-relationships-loading.xml
index 9291871..f09f5ad 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-skip-relationships-loading.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-skip-relationships-loading.xml
@@ -24,7 +24,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-table-types.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-table-types.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-table-types.xml
index b8d3ad3..2b5f07b 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-table-types.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/config/pom-table-types.xml
@@ -24,7 +24,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder-pom.xml
index 6e09d8a..98dc674 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testComplexChangeOrder-pom.xml
@@ -26,7 +26,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test-classes/org/apache/cayenne/tools/dbimport/testComplexChangeOrder.map.xml</map>
                     <dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings-pom.xml
index 8d31eaf..8ba74e2 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings-pom.xml
@@ -26,7 +26,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>
                         target/test-classes/org/apache/cayenne/tools/dbimport/testCustomObjectLayerSettings.map.xml

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange-pom.xml
index ad0f98f..0fcafcb 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDbAttributeChange-pom.xml
@@ -26,7 +26,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test-classes/org/apache/cayenne/tools/dbimport/testDbAttributeChange.map.xml</map>
                     <dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml
index 2a6828f..c62c68f 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testDefaultPackage-pom.xml
@@ -26,7 +26,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test-classes/org/apache/cayenne/tools/dbimport/testDefaultPackage.map.xml</map>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml
index de84543..f7d6adb 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFilteringWithSchema-pom.xml
@@ -26,7 +26,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test-classes/org/apache/cayenne/tools/dbimport/testFilteringWithSchema.map.xml</map>
                     <dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename-pom.xml
index dd50897..7b454d8 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFkAttributeRename-pom.xml
@@ -27,7 +27,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test-classes/org/apache/cayenne/tools/dbimport/testFkAttributeRename.map.xml</map>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink-pom.xml
index 1bcefa6..f4ec9c7 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink-pom.xml
@@ -26,7 +26,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testFlattensManyToManyWithRecursiveLink.map.xml</map>
 					<dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema-pom.xml
index e1bbd50..81e54cc 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testForceDataMapSchema-pom.xml
@@ -26,7 +26,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test-classes/org/apache/cayenne/tools/dbimport/testForceDataMapSchema.map.xml</map>
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn-pom.xml
index 598607d..01f76e0 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn-pom.xml
@@ -26,7 +26,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testImportAddTableAndColumn.map.xml</map>
 					<dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportNewDataMap-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportNewDataMap-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportNewDataMap-pom.xml
index 440d340..f1465e0 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportNewDataMap-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportNewDataMap-pom.xml
@@ -26,7 +26,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testImportNewDataMap.map.xml</map>
 					<dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportWithoutChanges-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportWithoutChanges-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportWithoutChanges-pom.xml
index c1affd7..69831e9 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportWithoutChanges-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testImportWithoutChanges-pom.xml
@@ -26,7 +26,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testImportWithoutChanges.map.xml</map>
 					<dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOneToOne-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOneToOne-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOneToOne-pom.xml
index 418fd59..299b475 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOneToOne-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testOneToOne-pom.xml
@@ -26,7 +26,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testOneToOne.map.xml</map>
 					<dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveCustomObjMappings-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveCustomObjMappings-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveCustomObjMappings-pom.xml
index ea24dc8..eb15cd6 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveCustomObjMappings-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveCustomObjMappings-pom.xml
@@ -26,7 +26,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test-classes/org/apache/cayenne/tools/dbimport/testPreserveCustomObjMappings.map.xml
                     </map>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveRelationships-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveRelationships-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveRelationships-pom.xml
index 8056381..ae2b8b5 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveRelationships-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testPreserveRelationships-pom.xml
@@ -26,7 +26,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testPreserveRelationships.map.xml</map>
 					<dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude-pom.xml
index 488a560..74867d4 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude-pom.xml
@@ -26,7 +26,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test-classes/org/apache/cayenne/tools/dbimport/testSchemasAndTableExclude.map.xml</map>
                     <dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSkipPrimaryKeyLoading-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSkipPrimaryKeyLoading-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSkipPrimaryKeyLoading-pom.xml
index e8f41ea..1b5c8fc 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSkipPrimaryKeyLoading-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSkipPrimaryKeyLoading-pom.xml
@@ -26,7 +26,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testSkipPrimaryKeyLoading.map.xml</map>
 					<dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSkipRelationshipsLoading-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSkipRelationshipsLoading-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSkipRelationshipsLoading-pom.xml
index df9d7d5..f2b4c11 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSkipRelationshipsLoading-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSkipRelationshipsLoading-pom.xml
@@ -26,7 +26,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testSkipRelationshipsLoading.map.xml</map>
 					<dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSupportsCatalogsOnReverseEngineering-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSupportsCatalogsOnReverseEngineering-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSupportsCatalogsOnReverseEngineering-pom.xml
index f3409fa..daf5b59 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSupportsCatalogsOnReverseEngineering-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testSupportsCatalogsOnReverseEngineering-pom.xml
@@ -26,7 +26,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>
                         target/test-classes/org/apache/cayenne/tools/dbimport/testSupportsCatalogsOnReverseEngineering.map.xml

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testTableTypes-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testTableTypes-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testTableTypes-pom.xml
index 2f60ff5..ff20c79 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testTableTypes-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testTableTypes-pom.xml
@@ -26,7 +26,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testTableTypes.map.xml</map>
 					<dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testUnFlattensManyToMany-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testUnFlattensManyToMany-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testUnFlattensManyToMany-pom.xml
index bd43bb0..0c80294 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testUnFlattensManyToMany-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testUnFlattensManyToMany-pom.xml
@@ -26,7 +26,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<map>target/test-classes/org/apache/cayenne/tools/dbimport/testUnFlattensManyToMany.map.xml</map>
 					<dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testViewsExclude-pom.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testViewsExclude-pom.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testViewsExclude-pom.xml
index 749b309..1d5f4c0 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testViewsExclude-pom.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimport/testViewsExclude-pom.xml
@@ -26,7 +26,7 @@
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-cayenne-plugin</artifactId>
+                <artifactId>cayenne-maven-plugin</artifactId>
                 <configuration>
                     <map>target/test-classes/org/apache/cayenne/tools/dbimport/testViewsExclude.map.xml</map>
                     <dataSource>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom1.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom1.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom1.xml
index 43f71c1..3bb6207 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom1.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom1.xml
@@ -26,7 +26,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<map>target/test/org/apache/cayenne/tools/dbimporter-map1.map.xml</map>
 				</configuration>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom2.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom2.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom2.xml
index 24c065a..4ea460c 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom2.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom2.xml
@@ -26,7 +26,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<dbimport>
 						<meaningfulPkTables>x,b*</meaningfulPkTables>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom3.xml
----------------------------------------------------------------------
diff --git a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom3.xml b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom3.xml
index 73e65c5..be64020 100644
--- a/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom3.xml
+++ b/plugins/cayenne-maven-plugin/src/test/resources/org/apache/cayenne/tools/dbimporter-pom3.xml
@@ -26,7 +26,7 @@
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-cayenne-plugin</artifactId>
+				<artifactId>cayenne-maven-plugin</artifactId>
 				<configuration>
 					<dbimport>
 						<meaningfulPkTables>*</meaningfulPkTables>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/maven-cayenne-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/pom.xml b/plugins/maven-cayenne-plugin/pom.xml
new file mode 100644
index 0000000..ccd20ab
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/pom.xml
@@ -0,0 +1,150 @@
+<?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">
+    <parent>
+        <artifactId>cayenne-plugins-parent</artifactId>
+        <groupId>org.apache.cayenne.plugins</groupId>
+        <version>4.0.M5-SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>maven-cayenne-plugin</artifactId>
+    <packaging>maven-plugin</packaging>
+    <name>maven-cayenne-plugin: Deprecated Cayenne Maven Plugin</name>
+
+    <dependencies>
+        
+        <dependency>
+            <groupId>org.apache.cayenne.plugins</groupId>
+            <artifactId>cayenne-maven-plugin</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven.plugin-tools</groupId>
+            <artifactId>maven-plugin-annotations</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-artifact</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-compat</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.plexus</groupId>
+            <artifactId>plexus-interpolation</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.plexus</groupId>
+            <artifactId>plexus-container-default</artifactId>
+        </dependency>
+
+        <!-- Test deps -->
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven.plugin-testing</groupId>
+            <artifactId>maven-plugin-testing-harness</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derby</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>xmlunit</groupId>
+            <artifactId>xmlunit</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.cayenne</groupId>
+            <artifactId>cayenne-server</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+            <type>test-jar</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.cayenne</groupId>
+            <artifactId>cayenne-tools</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+            <type>test-jar</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.cayenne.build-tools</groupId>
+            <artifactId>cayenne-test-utilities</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-plugin-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </reporting>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorOldMojo.java
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorOldMojo.java b/plugins/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorOldMojo.java
new file mode 100644
index 0000000..38e30ec
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorOldMojo.java
@@ -0,0 +1,49 @@
+/*****************************************************************
+ *   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.
+ ****************************************************************/
+
+package org.apache.cayenne.tools;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+
+/**
+ * Maven mojo to perform class generation from data map. This class is an Maven
+ * adapter to DefaultClassGenerator class.
+ *
+ * @deprecated use "cayenne-maven-plugin"
+ * @since 4.0
+ */
+@Mojo(name = "cgen", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
+public class CayenneGeneratorOldMojo extends CayenneGeneratorMojo {
+
+    @Override
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        getLog().warn("Plugin \"maven-cayenne-plugin\" has been deprecated.\n" +
+                "Please use \"cayenne-maven-plugin\":\n" +
+                "<plugin>\n" +
+                "   <groupId>org.apache.cayenne.plugins</groupId>\n" +
+                "   <artifactId>cayenne-maven-plugin</artifactId>\n" +
+                "   <version>LATEST</version>\n" +
+                "</plugin>\n");
+
+        super.execute();
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbGeneratorOldMojo.java
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbGeneratorOldMojo.java b/plugins/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbGeneratorOldMojo.java
new file mode 100644
index 0000000..d296969
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbGeneratorOldMojo.java
@@ -0,0 +1,49 @@
+/*****************************************************************
+ *   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.
+ ****************************************************************/
+
+package org.apache.cayenne.tools;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+
+/**
+ * Maven mojo to perform class generation from data map. This class is a Maven
+ * adapter to DefaultClassGenerator class.
+ *
+ * @deprecated use "cayenne-maven-plugin"
+ * @since 4.0
+ */
+@Mojo(name = "cdbgen", defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST)
+public class DbGeneratorOldMojo extends DbGeneratorMojo {
+
+    @Override
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        getLog().warn("Plugin \"maven-cayenne-plugin\" has been deprecated.\n" +
+                "Please use \"cayenne-maven-plugin\":\n" +
+                "<plugin>\n" +
+                "   <groupId>org.apache.cayenne.plugins</groupId>\n" +
+                "   <artifactId>cayenne-maven-plugin</artifactId>\n" +
+                "   <version>LATEST</version>\n" +
+                "</plugin>\n");
+
+        super.execute();
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbImporterOldMojo.java
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbImporterOldMojo.java b/plugins/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbImporterOldMojo.java
new file mode 100644
index 0000000..0bded58
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbImporterOldMojo.java
@@ -0,0 +1,50 @@
+/*****************************************************************
+ *   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.
+ ****************************************************************/
+
+package org.apache.cayenne.tools;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+
+/**
+ * Maven Mojo to import data model from DB into DataMap.
+ *
+ * @deprecated use "cayenne-maven-plugin"
+ * @since 4.0
+ */
+@Mojo(name = "cdbimport", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
+public class DbImporterOldMojo extends DbImporterMojo {
+
+    @Override
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        getLog().warn("Plugin \"maven-cayenne-plugin\" has been deprecated.\n" +
+                "Please use \"cayenne-maven-plugin\":\n" +
+                "<plugin>\n" +
+                "   <groupId>org.apache.cayenne.plugins</groupId>\n" +
+                "   <artifactId>cayenne-maven-plugin</artifactId>\n" +
+                "   <version>LATEST</version>\n" +
+                "</plugin>\n");
+
+        super.execute();
+    }
+}
+
+

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/maven-cayenne-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml b/plugins/maven-cayenne-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
new file mode 100644
index 0000000..e5de2d0
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
@@ -0,0 +1,32 @@
+<!--
+    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.
+-->
+<lifecycleMappingMetadata>
+    <pluginExecutions>
+        <pluginExecution>
+            <pluginExecutionFilter>
+                <goals>
+                    <goal>cgen</goal>
+                </goals>
+            </pluginExecutionFilter>
+            <action>
+                <execute>
+                    <runOnIncremental>true</runOnIncremental>
+                    <runOnConfiguration>true</runOnConfiguration>
+                </execute>
+            </action>
+        </pluginExecution>
+    </pluginExecutions>
+</lifecycleMappingMetadata>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/CayenneGeneratorOldMojoTest.java
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/CayenneGeneratorOldMojoTest.java b/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/CayenneGeneratorOldMojoTest.java
new file mode 100644
index 0000000..e91bc49
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/CayenneGeneratorOldMojoTest.java
@@ -0,0 +1,77 @@
+/*****************************************************************
+ *   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.
+ ****************************************************************/
+package org.apache.cayenne.tools;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+
+import java.io.File;
+
+public class CayenneGeneratorOldMojoTest extends AbstractMojoTestCase {
+
+    public void testCgenExecution() throws Exception {
+
+        File pom = getTestFile("src/test/resources/cgen/project-to-test/pom.xml");
+        assertNotNull(pom);
+        assertTrue(pom.exists());
+
+        CayenneGeneratorMojo myMojo = (CayenneGeneratorMojo) lookupMojo("cgen", pom);
+        assertNotNull(myMojo);
+        myMojo.execute();
+
+        File superTestEntity = new File(
+                "target/cayenneGeneratedClasses/superPkg/_TestEntity.txt");
+        File testEntity = new File(
+                "target/cayenneGeneratedClasses/pack/TestEntity.txt");
+
+        File superEmbeddable = new File(
+                "target/cayenneGeneratedClasses/superPkg/_Embeddable.txt");
+        File embeddable = new File(
+                "target/cayenneGeneratedClasses/pack/Embeddable.txt");
+
+        File superNotIncludedEntity = new File(
+                "target/cayenneGeneratedClasses/pack/_NotIncludedEntity.txt");
+
+        File notIncludedEntity = new File(
+                "target/cayenneGeneratedClasses/pack/NotIncludedEntity.txt");
+
+        File superExcludedEntity = new File(
+                "target/cayenneGeneratedClasses/pack/_TestExcludedEntity.txt");
+        File excludedEntity = new File(
+                "target/cayenneGeneratedClasses/pack/TestExcludedEntity.txt");
+
+        assertTrue(superTestEntity.exists());
+        assertTrue(testEntity.exists());
+
+        assertTrue(superEmbeddable.exists());
+        assertTrue(embeddable.exists());
+
+        assertFalse(superNotIncludedEntity.exists());
+        assertFalse(notIncludedEntity.exists());
+
+        assertFalse(superExcludedEntity.exists());
+        assertFalse(excludedEntity.exists());
+
+        String content = FileUtils.readFileToString(superTestEntity);
+        assertTrue(content.contains("public static final Property<List<TestRelEntity>> ADDITIONAL_REL = Property.create(\"additionalRel\", List.class);"));
+        assertTrue(content.contains("public void addToAdditionalRel(TestRelEntity obj)"));
+        assertTrue(content.contains("public void removeFromAdditionalRel(TestRelEntity obj)"));
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterOldMojoConfigurationTest.java
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterOldMojoConfigurationTest.java b/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterOldMojoConfigurationTest.java
new file mode 100644
index 0000000..ae940b2
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/java/org/apache/cayenne/tools/DbImporterOldMojoConfigurationTest.java
@@ -0,0 +1,110 @@
+/*****************************************************************
+ *   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.
+ ****************************************************************/
+
+package org.apache.cayenne.tools;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeSet;
+import java.util.regex.Pattern;
+
+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.commons.logging.Log;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.junit.Test;
+
+import static org.apache.cayenne.dbimport.DefaultReverseEngineeringLoaderTest.*;
+import static org.mockito.Mockito.mock;
+
+public class DbImporterOldMojoConfigurationTest extends AbstractMojoTestCase {
+
+    public void testLoadCatalog() throws Exception {
+        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);
+    }
+
+    public void testLoadSchema() throws Exception {
+        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);
+    }
+
+    public void testLoadSchema2() throws Exception {
+        FiltersConfig filters = getCdbImport("pom-schema-2.xml").createConfig(mock(Log.class))
+                .getDbLoaderConfig().getFiltersConfig();
+
+        TreeSet<IncludeTableFilter> includes = new TreeSet<>();
+        includes.add(new IncludeTableFilter(null, new PatternFilter().exclude("^ETL_.*")));
+
+        TreeSet<Pattern> excludes = new TreeSet<>(PatternFilter.PATTERN_COMPARATOR);
+        excludes.add(PatternFilter.pattern("^ETL_.*"));
+
+        assertEquals(filters.tableFilter(null, "NHL_STATS"),
+                new TableFilter(includes, excludes));
+    }
+
+    public void testLoadCatalogAndSchema() throws Exception {
+        assertCatalogAndSchema(getCdbImport("pom-catalog-and-schema.xml").getReverseEngineering());
+    }
+
+    public void testDefaultPackage() throws Exception {
+        DbImportConfiguration config = getCdbImport("pom-default-package.xml").createConfig(mock(Log.class));
+        assertEquals("com.example.test", config.getDefaultPackage());
+    }
+
+    public void testLoadFlat() throws Exception {
+        assertFlat(getCdbImport("pom-flat.xml").getReverseEngineering());
+    }
+
+    public void testSkipRelationshipsLoading() throws Exception {
+        assertSkipRelationshipsLoading(getCdbImport("pom-skip-relationships-loading.xml").getReverseEngineering());
+    }
+
+    public void testSkipPrimaryKeyLoading() throws Exception {
+        assertSkipPrimaryKeyLoading(getCdbImport("pom-skip-primary-key-loading.xml").getReverseEngineering());
+    }
+
+    public void testTableTypes() throws Exception {
+        assertTableTypes(getCdbImport("pom-table-types.xml").getReverseEngineering());
+    }
+
+    private DbImporterMojo getCdbImport(String pomFileName) throws Exception {
+        return (DbImporterMojo) lookupMojo("cdbimport",
+                getTestFile("src/test/resources/cdbimport/" + pomFileName));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/maven-cayenne-plugin/src/test/resources/cdbimport/pom-01.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/cdbimport/pom-01.xml b/plugins/maven-cayenne-plugin/src/test/resources/cdbimport/pom-01.xml
new file mode 100644
index 0000000..a4a6955
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/cdbimport/pom-01.xml
@@ -0,0 +1,99 @@
+<?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>
+
+                    <dbimport>
+                        <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>
+                    </dbimport>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbd7f62f/plugins/maven-cayenne-plugin/src/test/resources/cdbimport/pom-catalog-and-schema.xml
----------------------------------------------------------------------
diff --git a/plugins/maven-cayenne-plugin/src/test/resources/cdbimport/pom-catalog-and-schema.xml b/plugins/maven-cayenne-plugin/src/test/resources/cdbimport/pom-catalog-and-schema.xml
new file mode 100644
index 0000000..d3828ce
--- /dev/null
+++ b/plugins/maven-cayenne-plugin/src/test/resources/cdbimport/pom-catalog-and-schema.xml
@@ -0,0 +1,84 @@
+<?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>
+
+                    <dbimport>
+                        <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>
+                    </dbimport>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>


Mime
View raw message