You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2007/12/09 23:44:10 UTC

svn commit: r602747 - /cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java

Author: aadamchik
Date: Sun Dec  9 14:44:09 2007
New Revision: 602747

URL: http://svn.apache.org/viewvc?rev=602747&view=rev
Log:
CAY-933 Embeddable classes - support class generation
(adding support to the frontend tasks)

Modified:
    cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java

Modified: cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java?rev=602747&r1=602746&r2=602747&view=diff
==============================================================================
--- cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java (original)
+++ cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java Sun Dec  9 14:44:09 2007
@@ -44,7 +44,7 @@
  * @goal cgen
  */
 public class CayenneGeneratorMojo extends AbstractMojo {
-	
+
 	/**
 	 * Project instance used to add generated source code to the build.
 	 * 
@@ -169,13 +169,13 @@
 	private String superTemplate;
 
 	/**
-	 * Location of Velocity template file for Entity class generation. If omitted,
-	 * default template is used.
+	 * Location of Velocity template file for Entity class generation. If
+	 * omitted, default template is used.
 	 * 
 	 * @parameter expression="${cgen.template}"
 	 */
 	private String template;
-	
+
 	/**
 	 * Location of Velocity template file for Embeddable superclass generation.
 	 * Ignored unless <code>makepairs</code> set to <code>true</code>. If
@@ -186,14 +186,13 @@
 	private String embeddableSuperTemplate;
 
 	/**
-	 * Location of Velocity template file for Embeddable class generation. If omitted,
-	 * default template is used.
+	 * Location of Velocity template file for Embeddable class generation. If
+	 * omitted, default template is used.
 	 * 
 	 * @parameter expression="${cgen.embeddableTemplate}"
 	 */
 	private String embeddableTemplate;
 
-
 	/**
 	 * If set to <code>true</code> (default), a directory tree will be
 	 * generated in "destDir" corresponding to the class package structure, if
@@ -215,6 +214,7 @@
 	 * &quot;1.2&quot;.)
 	 * 
 	 * @parameter expression="${cgen.version}"
+	 * @deprecated since 3.0 as 1.1 mode is deprecated.
 	 */
 	private String version;
 
@@ -239,13 +239,14 @@
 			loaderAction.setAdditionalDataMapFiles(convertAdditionalDataMaps());
 
 			DataMap dataMap = loaderAction.getMainDataMap();
-			
+
 			ClassGenerationAction generator = createGenerator();
 			generator.setLogger(logger);
 			generator.setTimestamp(map.lastModified());
 			generator.setDataMap(dataMap);
 			generator.addEntities(filterAction.getFilteredEntities(dataMap));
-			generator.addEmbeddables(filterAction.getFilteredEmbeddables(dataMap));
+			generator.addEmbeddables(filterAction
+					.getFilteredEmbeddables(dataMap));
 			generator.execute();
 		} catch (Exception e) {
 			throw new MojoExecutionException("Error generating classes: ", e);