You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Jim Johnson <ja...@gmail.com> on 2008/12/03 00:43:33 UTC

Generated class differences between ant task & maven plugin

Hi.  I'm at a bit of a loss for the problem I'm currently facing.  I
currently have a project that uses the xmlbeans ant task to generate classes
based on a supplied XSD.  In my ant version I use XMLBeans 2.3.0.  I'm in
the process of converting this project over the maven, and as such I'm using
the maven-xmlbeans-plugin.  I'm using version 2.3.1 of the plugin which from
what I can tell by inspecting the pom of the plugin uses XMLBeans 2.3.0 as
well.  The generated classes are different though in that my ant version
generates methods like getFooList() along with getFooArray() which is
deprecated.  The maven version only generates a non-deprecated getFooArray()
with no getFooList() to be found.  I've tried digging through the code for
the ant task to see if it passes some property that would be responsible for
this that the maven version doesn't, but I have had no luck.  Google is also
failing me.  Is there some simple setting I need for the SchemaCompiler to
generate getXXXList() methods?  Thank you much for any help.

-Jim

Re: Generated class differences between ant task & maven plugin

Posted by Jim Johnson <ja...@gmail.com>.
Thank you Jacob, that was exactly it.  Specifying a javaSource of 1.5 for
the maven plugin caused the "correct" getter to appear.

-Jim

On Tue, Dec 2, 2008 at 4:10 PM, Jacob Danner <ja...@gmail.com> wrote:

> As far as I remember the getFooList() methods are generated for
> generic accessors. This in done via the scomp tool with:
>    -javasource [version] - generate java source compatible for a Java
> version (
> 1.4 or 1.5)
>
> It looks like one of your tools' usages is settings this value while
> the other is not.
>
> On Tue, Dec 2, 2008 at 3:43 PM, Jim Johnson <ja...@gmail.com> wrote:
> > Hi.  I'm at a bit of a loss for the problem I'm currently facing.  I
> > currently have a project that uses the xmlbeans ant task to generate
> classes
> > based on a supplied XSD.  In my ant version I use XMLBeans 2.3.0.  I'm
> in
> > the process of converting this project over the maven, and as such I'm
> using
> > the maven-xmlbeans-plugin.  I'm using version 2.3.1 of the plugin which
> from
> > what I can tell by inspecting the pom of the plugin uses XMLBeans 2.3.0
> as
> > well.  The generated classes are different though in that my ant version
> > generates methods like getFooList() along with getFooArray() which is
> > deprecated.  The maven version only generates a non-deprecated
> getFooArray()
> > with no getFooList() to be found.  I've tried digging through the code
> for
> > the ant task to see if it passes some property that would be responsible
> for
> > this that the maven version doesn't, but I have had no luck.  Google is
> also
> > failing me.  Is there some simple setting I need for the SchemaCompiler
> to
> > generate getXXXList() methods?  Thank you much for any help.
> >
> > -Jim
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>

Re: Generated class differences between ant task & maven plugin

Posted by Jacob Danner <ja...@gmail.com>.
As far as I remember the getFooList() methods are generated for
generic accessors. This in done via the scomp tool with:
    -javasource [version] - generate java source compatible for a Java version (
1.4 or 1.5)

It looks like one of your tools' usages is settings this value while
the other is not.

On Tue, Dec 2, 2008 at 3:43 PM, Jim Johnson <ja...@gmail.com> wrote:
> Hi.  I'm at a bit of a loss for the problem I'm currently facing.  I
> currently have a project that uses the xmlbeans ant task to generate classes
> based on a supplied XSD.  In my ant version I use XMLBeans 2.3.0.  I'm in
> the process of converting this project over the maven, and as such I'm using
> the maven-xmlbeans-plugin.  I'm using version 2.3.1 of the plugin which from
> what I can tell by inspecting the pom of the plugin uses XMLBeans 2.3.0 as
> well.  The generated classes are different though in that my ant version
> generates methods like getFooList() along with getFooArray() which is
> deprecated.  The maven version only generates a non-deprecated getFooArray()
> with no getFooList() to be found.  I've tried digging through the code for
> the ant task to see if it passes some property that would be responsible for
> this that the maven version doesn't, but I have had no luck.  Google is also
> failing me.  Is there some simple setting I need for the SchemaCompiler to
> generate getXXXList() methods?  Thank you much for any help.
>
> -Jim
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org