users@jaxb.java.net

Re: compilation problem with JAXB2 generated code - import statements

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 15 May 2006 15:16:22 -0700

Vallamshettla, Anand wrote:
> When I compile the following Jaxb 2.0 generated class in IDE such as
> Eclipse, it compiles properly; but, when I compile using Ant or javac,
> it fails. (NOTE: all the tools are using same Jdk).

Hmm. Interesting. Can you file an issue in the issue tracker? I'd really
like a test case.

> Summary:
> ---------------
>
> Generated class contains import statements in the following order
>
> 1) inner classes
>
> 2) super classes that these inner classes extend.

AFAIK, the order of the import statements bare no significance.


> Questions:
> ---------------
> 1) Why compilation is failing on javac not in IDE.

That will be a question to the compiler team. If you can file an issue
against JAXB, I'll use that to ask around.

> 4) Is there a way to customize JAXB to produce import statements
> in proper order or generate full package names.

I believe there's no such thing as "proper order", but if certain
ordering is known to cause practical problems, I might be able to change
orders to forestall those issues.


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com