+1 This sounds like a useful addition to me.
Instead of a comma, might you use a space, so that the last parameter on the command line was the output directory and all preceding are inputs? Doug On 08/16/2011 01:38 PM, Bill Graham wrote: > Hi, > > With Avro-874, multiple inter-dependent schema files can be parsed. I've > written a patch to the SpecificCompilerTool to allow the same when > producing java from multiple schemas that I'd like to contribute for > consistency if there's interest. It allows you to pass multiple input > files like this: > > $ java -cp avro-tools-1.6.0.jar org.apache.avro.tool.Main compile schema > input/position.avsc,input/player.avsc tmp/ > > While I was at it, it seemed useful to parse an entire directory of > schema files as well so I implemented this: > > $ java -cp avro-tools-1.6.0.jar org.apache.avro.tool.Main compile schema > input/ tmp/ > > The latter approach will not work properly for files with dependencies, > since the file order probably isn't in reverse dependency order. If > that's the case, a combination of files and directories can be used to > force an ordering. So if b depends on a and other files depend on either > of them you could do this: > > $ java -cp avro-tools-1.6.0.jar org.apache.avro.tool.Main compile schema > input/a.avsc,input/b.avsc,input/ tmp/ > > Let me know if some or all of this seems useful to contribute. The first > example is really the main one that I need. I've done the same for > Protocol as well btw. > > thanks, > Bill
