users@jaxb.java.net

Re: Can i customize that JAB will not generate a given complex type

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Mon, 9 Mar 2009 21:46:22 +0100

Well, modifying generated files is a no-no,... Having said that, I can
suggest a couple of things.

There is one xjc plugin
https://jaxb2-commons.dev.java.net/simple-regenerator/ that lets you add
code (including comments) to generated files and retains this code when the
class is generated again. You would have to add special comment lines to
delimit the inserted sections.

Another way to have comments in each generated version would be to insert
 <xs:annotation>
    <xs:documentation>
This is some comment ...
    </xs:documentation>
 </xs:annotation>
in the XML schema.

-W


On Mon, Mar 9, 2009 at 4:37 PM, Avihaimar <avihaimar_at_yahoo.com> wrote:

>
> I will explain myself.
>
> Lets say i have complex type name ItemType in the schema.
> In 1/1 i generate the shema and the ItemType was generates.
>
> In 7/1 someone add new type to the schema - BillType and run xjc.
> In this case the ItemType will generate again, but i dont want it to be
> generated again.
> So,my question is there a way to tell jaxb to not generate some types.
>
> Ps. few reasons why i dont want to generate it again:
> I added manulcomments to ItemType
>
>
> Jose Correia-2 wrote:
> >
> > Hi Avihaimar
> >
> > I think you very confused, if they already exist then they were
> > auto-generated by the .xsd file .... I suggest you then modify .xsd file
> > to
> > fix whatever needed to be fixed in the source files.
> >
> > If on the other hand you have existing classes with same package name
> then
> > either change their package name or modify the .xsd's generated package
> > name.
> >
> > Regards
> > Jose
> >
> >
> > On Mon, Mar 9, 2009 at 3:21 PM, Avihaimar <avihaimar_at_yahoo.com> wrote:
> >
> >>
> >> Hey,
> >>
> >> I dont want JAXB to generate some complex type, because they already
> >> exists
> >> in the system (and fixed manually). is there a way to tell it this?
> >>
> >> Thank you
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Can-i-customize-that-JAB-will-not-generate-a-given-complex-type-tp22412980p22412980.html
> >> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> >> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Can-i-customize-that-JAB-will-not-generate-a-given-complex-type-tp22412980p22413484.html
> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>