After further analysis I have concluded that the best way to solve the
problem right now is to modify the Apache Felix SCR Maven Plugin.

On JavaClassDescriptorManager's constructor I will put a check before adding
a source tree for QDox's processing, so that the xjc generated directory
will be ignored.

This is a simple hack that solves the QDox problem, but it's much simpler
than messing with byacc rules for this.

Hope this helps somebody with the same problem I had when using OSGi + JAXB
(or any other tool based on buggy QDox).

Regards,
Rodrigo Madera

P.S. Keywords: maven osgi jaxb xjc xml serialization deserialization
marshalling unmarshalling qdox ParseException syntax error yyerror yyparse

On Tue, Mar 4, 2008 at 12:27 AM, Rodrigo Madera <[EMAIL PROTECTED]>
wrote:

> Hello community,
>
> I found a serious incompatibility between maven-scr-plugin (used to
> generate service descriptors for Declarative Services) and QDox, which is
> used for JAXB (Java XML Bindings).
> Thus, I am stuck using OSGi and JAXB together.
>
> The issue is that QDox has trouble reading the "package-info.java" files
> generated by the JAXB Schema-to-POJO compiler (xjc).
> QDox doesn't like the annotations on the package directive, as in:
>
>
> @javax.xml.bind.annotation.XmlSchema(namespace = "
> http://schemas.acme.com/product/coyote/1.0";)
> package com.acme.coyote;
>
>
> This problem is known on QDox's JIRA:
> http://jira.codehaus.org/browse/QDOX-98
> However it seems to be *very* dusty for some time now. Unfortunately,
> nobody is really concerned with it.
>
> I'm working on this issue and I'll post a follow-up if I get anything
> working.
>
> If anyone has experience using OSGi + JAXB please give us some thoughts on
> how this QDox issue was avoided or solved.
>
> Thank you for your attention,
> Rodrigo Madera
>

Reply via email to