avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r1407418 - in /avro/trunk: CHANGES.txt lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/AbstractAvroMojo.java lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/SchemaMojo.java
Date Fri, 09 Nov 2012 10:46:22 GMT
Author: tomwhite
Date: Fri Nov  9 10:46:21 2012
New Revision: 1407418

URL: http://svn.apache.org/viewvc?rev=1407418&view=rev
Log:
AVRO-983. maven-avro-plugin: Allow maven schema compiler to support external reference in
an another avro schema file.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/AbstractAvroMojo.java
    avro/trunk/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/SchemaMojo.java

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1407418&r1=1407417&r2=1407418&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Fri Nov  9 10:46:21 2012
@@ -20,6 +20,9 @@ Trunk (not yet released)
     AVRO-1169. Java: Reduce memory footprint of resolver.
     (Hernan Otero via cutting)
 
+    AVRO-983. maven-avro-plugin: Allow maven schema compiler to support
+    external reference in an another avro schema file (tomwhite)
+
   BUG FIXES
 
     AVRO-1171. Java: Don't call configure() twice on mappers & reducers.

Modified: avro/trunk/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/AbstractAvroMojo.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/AbstractAvroMojo.java?rev=1407418&r1=1407417&r2=1407418&view=diff
==============================================================================
--- avro/trunk/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/AbstractAvroMojo.java
(original)
+++ avro/trunk/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/AbstractAvroMojo.java
Fri Nov  9 10:46:21 2012
@@ -20,6 +20,7 @@ package org.apache.avro.mojo;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.Arrays;
 
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -136,7 +137,9 @@ public abstract class AbstractAvroMojo e
     for (String exclude : excludes) {
       fs.addExclude(exclude);
     }
-    return fileSetManager.getIncludedFiles(fs);
+    String[] files = fileSetManager.getIncludedFiles(fs);
+    Arrays.sort(files);
+    return files;
   }
 
   private void compileFiles(String[] files, File sourceDir, File outDir) throws MojoExecutionException
{

Modified: avro/trunk/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/SchemaMojo.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/SchemaMojo.java?rev=1407418&r1=1407417&r2=1407418&view=diff
==============================================================================
--- avro/trunk/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/SchemaMojo.java (original)
+++ avro/trunk/lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/SchemaMojo.java Fri
Nov  9 10:46:21 2012
@@ -51,10 +51,11 @@ public class SchemaMojo extends Abstract
    */
   private String[] testIncludes = new String[] { "**/*.avsc" };
 
+  private Schema.Parser parser = new Schema.Parser();
+
   @Override
   protected void doCompile(String filename, File sourceDirectory, File outputDirectory) throws
IOException {
     File src = new File(sourceDirectory, filename);
-    Schema.Parser parser = new Schema.Parser();
     Schema schema = parser.parse(src);
     SpecificCompiler compiler = new SpecificCompiler(schema);
     compiler.setTemplateDir(templateDirectory);



Mime
View raw message