db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r965169 - in /db/torque/torque4/trunk/maven-torque-generator-plugin/src: main/java/org/apache/torque/generator/maven/TorqueGeneratorMojo.java test/gettingStarted/src/main/torque-gen/conf/control.xml
Date Sun, 18 Jul 2010 06:25:17 GMT
Author: tfischer
Date: Sun Jul 18 06:25:17 2010
New Revision: 965169

URL: http://svn.apache.org/viewvc?rev=965169&view=rev
Log:
adjusted to changes in generator

Modified:
    db/torque/torque4/trunk/maven-torque-generator-plugin/src/main/java/org/apache/torque/generator/maven/TorqueGeneratorMojo.java
    db/torque/torque4/trunk/maven-torque-generator-plugin/src/test/gettingStarted/src/main/torque-gen/conf/control.xml

Modified: db/torque/torque4/trunk/maven-torque-generator-plugin/src/main/java/org/apache/torque/generator/maven/TorqueGeneratorMojo.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/maven-torque-generator-plugin/src/main/java/org/apache/torque/generator/maven/TorqueGeneratorMojo.java?rev=965169&r1=965168&r2=965169&view=diff
==============================================================================
--- db/torque/torque4/trunk/maven-torque-generator-plugin/src/main/java/org/apache/torque/generator/maven/TorqueGeneratorMojo.java
(original)
+++ db/torque/torque4/trunk/maven-torque-generator-plugin/src/main/java/org/apache/torque/generator/maven/TorqueGeneratorMojo.java
Sun Jul 18 06:25:17 2010
@@ -30,6 +30,7 @@ import org.apache.maven.plugin.AbstractM
 import org.apache.maven.plugin.Mojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
+import org.apache.torque.generator.configuration.ConfigurationException;
 import org.apache.torque.generator.configuration.UnitDescriptor;
 import org.apache.torque.generator.configuration.UnitDescriptor.Packaging;
 import org.apache.torque.generator.configuration.controller.Loglevel;
@@ -42,6 +43,7 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.ProjectPaths;
 import org.apache.torque.generator.control.Controller;
 import org.apache.torque.generator.file.Fileset;
+import org.apache.torque.generator.source.stream.FileSourceProvider;
 
 /**
  * Executes a unit of generation within the torque generator.
@@ -395,14 +397,28 @@ public class TorqueGeneratorMojo extends
             getLog().debug("Setting source dir to " + sourceDir.toString());
         }
 
-        Fileset sourceFileset = null;
+        FileSourceProvider fileSourceProvider = null;
         if (sourceIncludes != null || sourceExcludes != null)
         {
-            sourceFileset = new Fileset(null, sourceIncludes, sourceExcludes);
+            Fileset sourceFileset 
+                    = new Fileset(
+                            projectPaths.getDefaultSourcePath(),
+                            sourceIncludes,
+                            sourceExcludes);
             getLog().debug("Setting source includes to " 
                     + sourceIncludes);
             getLog().debug("Setting source excludes to " 
                     + sourceExcludes);
+            try
+            {
+                fileSourceProvider 
+                        = new FileSourceProvider(null, sourceFileset);
+            } 
+            catch (ConfigurationException e)
+            {
+                throw new MojoExecutionException(
+                        "The source provider cannot be instantiated", e);
+            }
         }
 
         if (newFileTargetDir != null)
@@ -434,7 +450,7 @@ public class TorqueGeneratorMojo extends
                 projectPaths,
                 new DefaultTorqueGeneratorPaths(),
                 null,
-                sourceFileset,
+                fileSourceProvider,
                 optionConfiguration,
                 convertedLoglevel);
         getLog().debug("unit descriptor created");
@@ -443,12 +459,13 @@ public class TorqueGeneratorMojo extends
             CustomProjectPaths childProjectPaths
                 = new CustomProjectPaths(projectPaths);
             childProjectPaths.setConfigurationDir(overrideConfigDir);
+            
             unitDescriptor = new UnitDescriptor(
                     Packaging.DIRECTORY,
                     childProjectPaths,
                     new DefaultTorqueGeneratorPaths(),
                     unitDescriptor,
-                    sourceFileset,
+                    fileSourceProvider,
                     optionConfiguration,
                     convertedLoglevel);
             getLog().debug("child unit descriptor created");

Modified: db/torque/torque4/trunk/maven-torque-generator-plugin/src/test/gettingStarted/src/main/torque-gen/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/maven-torque-generator-plugin/src/test/gettingStarted/src/main/torque-gen/conf/control.xml?rev=965169&r1=965168&r2=965169&view=diff
==============================================================================
--- db/torque/torque4/trunk/maven-torque-generator-plugin/src/test/gettingStarted/src/main/torque-gen/conf/control.xml
(original)
+++ db/torque/torque4/trunk/maven-torque-generator-plugin/src/test/gettingStarted/src/main/torque-gen/conf/control.xml
Sun Jul 18 06:25:17 2010
@@ -23,7 +23,7 @@
     xmlns="http://db.apache.org/torque/4.0/generator/configuration">
   <output name="propertyKeys" 
       file="org/apache/torque/generator/maven/PropertyKeys.java">
-    <source>
+    <source xsi:type="fileSource">
       <include>propertiesData.properties</include>
     </source>
     <outlet name="classFrame"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message