users@jaxb.java.net

Re: jaxb/annox issue with custom annotations

From: Ioannis Mavroukakis <imavroukakis_at_gmail.com>
Date: Sun, 20 May 2012 01:13:02 +0100

Cheers gents :)

On 19 May 2012 22:58, Aleksei Valikov <valikov_at_gmx.net> wrote:

> Hi,
>
>
>
> On Mon, May 14, 2012 at 10:20 AM, Voß, Marko
> <Marko.Voss_at_fiz-karlsruhe.de> wrote:
> > Hello Ioannis,
> >
> > Please make sure, that your annotation class and its dependencies are
> available in the classpath of the maven-jaxb-plugin like this:
> >
> > <plugin>
> > <groupId>org.jvnet.jaxb2.maven2</groupId>
> > <artifactId>maven-jaxb2-plugin</artifactId>
> > ...
> > <configuration>
> > ...
> > <plugins>
> > <plugin>
> > YOUR ARTIFACT HERE
> > </plugin>
> > </plugins>
> > </configuration>
> > </plugin>
> >
> >
> > Regrettably, the maven JAXB plugin does not check for the existing
> classpath of the project. Other plugins are able to do that, so I guess it
> should be possible and in my opinion this is a bug. I came across the same
> problem like you.
>
> There's a difference between the XJC classpath and the project
> compilation classpath. In this case I'd agree, it makes sense to use
> the compilation classpath - but this is the Maven plugin scope, not
> the XJC plugin scope. The XJC plugin does not really know that there's
> some "Maven" out there.
>
> The issue can be solved by adding all the project dependencies to the
> XJC classpath, but I'm really not sure if it is a good idea.
>
> Please file an issue here:
>
> http://jira.highsource.org/browse/JIIB
>
> or here:
>
> http://java.net/jira/browse/JAXB2_COMMONS
>
> Bye,
> /lexi
>