incubator-nmaven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shane Isbell" <shane.isb...@gmail.com>
Subject Re: maven-xsd-plugin multiple xsd files
Date Fri, 21 Dec 2007 23:53:41 GMT
Hi David,

The implementation of the plugin only accepts one xsdFile, so one approach
would be to put each xsd file in a different project. This would of course
generate a separate assembly for each model.

The XsdGeneratorMojo could be modified by 1) changing the xsdFile parameter
type to a list; 2) within the XsdGeneratorMojo.execute method, iterating
over the NetExecutable.execute method for each xsdFile, passing in an xsd
file path to the XsdGeneratorMojo.getCommands method.

This does assume that the URI remains the same for each model. If the URI
changes then you would need to create a separate class that stores a URI to
xsdFile mapping and place of list of these class types into a parameter
within the XsdGeneratorMojo, iterating over the NetExecutable.execute method
similar to above.

Regards,
Shane
On Dec 21, 2007 10:56 AM, David D Johnson <ddjohnson@novell.com> wrote:

> Hi,
>
> I am trying to figure out how to use maven-xsd-plugin to generate a set of
> .cs files from a set of .xsd files.
> I have tried multiple files in xsdFile, multiple xsdFile tags, multiple
> configure tags and and multiple plugin tags.
> Some of those are tolerated but only generate one of the files.
>
> This is on windows with VS2005.
> xsd.exe will accept multiple files, but only if the filenames come last.
>  And then, it jams all the classes into one source file.
>
> What I really need to have happen is for xsd to run once for each file.
>
> Thanks for any advice,
>
> ==  dj
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message