Hello,
The reason my code was not compiling is the following: After running Ant
from a command prompt, I went back to eclipse and did a refresh of
"com.seagullsw.*" which caused eclipse to recompile everything BUT I had not
refreshed the root "generated" package, which I did not expect to get
generated, and eclipse did not know about these files (yet).
So this issue is settled. Thank you for your diligence in following up on
this.
Gary
-----Original Message-----
From: Kohsuke Kawaguchi [mailto:Kohsuke.Kawaguchi_at_Sun.COM]
Sent: Thursday, July 10, 2003 08:39
To: JAXB-INTEREST_at_JAVA.SUN.COM
Subject: Re: 1.0.1 generated code does not compile (extends generated.Foo)
Gary Gregory <ggregory_at_seagullsw.com> wrote:
> > Perhaps your javac invocation doesn't specify this as the source
> directory?
>
> Nope, XJC generated "generated" ;-) all by itself as far as I can tell. We
> do not use "generated" anywhere in our code or build.xml files
Wait a second, I thought your problem is that the code generated from XJC
doesn't compile. But it now seems to me that you are saying it actually
compiles. You just didn't like the package name "generated" it produces
(which is quite understandable BTW.)
I told you why XJC was so desperate to use the package name like
"generated".
> I've since significantly redone my XSDs for other reasons and this problem
> no longer happens but... perhaps XJC should blow up with an error message
> rather than generate code that cannot be compiled, wouldn't you say? OTOH,
> maybe going as far as you can, from XJC's POV is better for debugging the
> output. Just a thought.
Assuming I understood you right, I don't understand why XJC needs to see
that as an error. It produces files in the "generated" package, it
refers to classes in that package, so as long as you include that in
a javac compilation, it would compile.
regards,
--
Kohsuke Kawaguchi 408-276-7063 (x17063)
Sun Microsystems kohsuke.kawaguchi_at_sun.com