tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r379763 - /incubator/tuscany/java/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java
Date Wed, 22 Feb 2006 13:09:43 GMT
Author: jboynes
Date: Wed Feb 22 05:09:42 2006
New Revision: 379763

URL: http://svn.apache.org/viewcvs?rev=379763&view=rev
Log:
add ability to specify a schema file to generate from

Modified:
    incubator/tuscany/java/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java

Modified: incubator/tuscany/java/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java?rev=379763&r1=379762&r2=379763&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java
(original)
+++ incubator/tuscany/java/sdo/plugin/src/main/java/org/apache/tuscany/sdo/plugin/GeneratorMojo.java
Wed Feb 22 05:09:42 2006
@@ -40,6 +40,12 @@
     private String schemaDir;
 
     /**
+     * Name of the schema file; if omitted all files in the directory are processed
+     * @parameter
+     */
+    private File schemaFile;
+
+    /**
      * The Java package to generate into. By default the value is derived from the schema
URI.
      *
      * @parameter
@@ -65,7 +71,13 @@
         getLog().info("javaPackage = " + javaPackage);
         getLog().info("Generating SDO interfaces");
 
-        File[] files = new File(schemaDir).listFiles(FILTER);
+        File[] files;
+        if (schemaFile == null) {
+            files = new File(schemaDir).listFiles(FILTER);
+        } else {
+            files = new File[]{schemaFile};
+        }
+
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
             getLog().info("Generating from " + file);



Mime
View raw message