cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertdzeig...@apache.org
Subject svn commit: r749754 - /cayenne/main/trunk/framework/maven-cayenne-modeler-plugin/src/main/java/org/apache/cayenne/tools/CayenneModelerMojo.java
Date Tue, 03 Mar 2009 21:02:44 GMT
Author: robertdzeigler
Date: Tue Mar  3 21:02:43 2009
New Revision: 749754

URL: http://svn.apache.org/viewvc?rev=749754&view=rev
Log:
CAY-1181: Default class generation folder is wrong
Make it so that mvn cayenne-modeler:run will set the cayenne.cgen.destdir property to the
sourceDirectory of the project.

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

Modified: cayenne/main/trunk/framework/maven-cayenne-modeler-plugin/src/main/java/org/apache/cayenne/tools/CayenneModelerMojo.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/maven-cayenne-modeler-plugin/src/main/java/org/apache/cayenne/tools/CayenneModelerMojo.java?rev=749754&r1=749753&r2=749754&view=diff
==============================================================================
--- cayenne/main/trunk/framework/maven-cayenne-modeler-plugin/src/main/java/org/apache/cayenne/tools/CayenneModelerMojo.java
(original)
+++ cayenne/main/trunk/framework/maven-cayenne-modeler-plugin/src/main/java/org/apache/cayenne/tools/CayenneModelerMojo.java
Tue Mar  3 21:02:43 2009
@@ -103,8 +103,11 @@
     }
 
 	public void execute() throws MojoExecutionException, MojoFailureException {
-        File f = lookupModelFile();
+        //setup the system property to tell the modeler where to generate the java source
files.
+        System.setProperty("cayenne.cgen.destdir",project.getBuild().getSourceDirectory());
+
         //start the modeler with the provided model file, if it exists.
+        File f = lookupModelFile();
         if (f != null && f.exists() && !f.isDirectory()) {
             Main.main(new String[] {f.getAbsolutePath()});
         } else {



Mime
View raw message