>> I'm using JAXB/xjc to generate code to access my schema. It created a
>> package-info.java file along with other files. Everything compiles fine
[quoted text clipped - 18 lines]
>
> Andrew T.

Signature
Daniel Dyer
http://www.dandyer.co.uk
>>> I'm using JAXB/xjc to generate code to access my schema. It created a
>>> package-info.java file along with other files. Everything compiles
[quoted text clipped - 25 lines]
> Unfortunately javac doesn't like it and you have to exclude it from the
> source set.
Sorry, that post wasn't as helpful as it could have been - I didn't read
Frank's post that Andrew was responding to, and as such didn't notice that
he was using annotations.
It's more correct to say that package-info.java was introduced to provide
a way for annotations to be applied to packages. A side benefit was that
it provided a more logical place for javadoc comments for packages than
package.html. So far I've not needed to use it for annotations, just for
Javadoc, so when I had problems I added an exclude pattern to the compile
task in my Ant build files. However, giving it some thought I couldn't
remember exactly what led me down this path and it didn't make much sense
that the compile should fail. So I've just removed the exclusion from one
of my projects and there is no complaint from the compiler (1.5.0_06 on a
Mac). So, either it is only a problem with certain earlier versions (this
was a while ago with 1.5.0_something on Windows) or I had some other
reason, that I don't recall, for wanting to exclude it.
However, if the package *is* annotated, as in the OP's example, the
package-info.java *should* be compiled and the compiler should output a
synthetic package-info.class (if it didn't output anything the package
level annotations would be lost). So, returning to Frank's problem... I
have no idea why it doesn't work :)
Dan.

Signature
Daniel Dyer
http://www.dandyer.co.uk