users@jaxb.java.net

Re: patch for maven-jaxb2-plugin

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 29 Jan 2007 14:37:01 -0800

Aha!

I didn't know that a plugin could individually declare additional
dependencies (I guess that can be used to cause maven-jaxb2-plugin to
use more recent version of the JAXB RI?.)

Aleksei Valikov wrote:
> Hi.
>
>>> Why is this patch necessary? Isn't the built-in <dependencies>
>>> elements of the maven-plugin section enough?
>>>
>>> I'm asking because if there is a need for it, then i should also
>>> update the maven-jaxb1-plugin.
>>
>> Maybe I'm missing something obvious, but I didn't spot the code that
>> copies the current project's dependencies and make them available to the
>> XJC. So as far as I could tell, there was no way to add a XJC plugin in
>> short of modifying the POM of maven-jaxb2-plugin.
>>
>> But it sounds like you've been already successfully using XJC plugins
>> with this maven plugin for some time now. I'm curious how XJC found XJC
>> plugins.
>
> I used to add JAXB plugi dependencies into the dependencies of the
> maven-jaxb2-plugin:
>
> <plugin>
> <groupId>org.jvnet.jaxb2.maven2</groupId>
> <artifactId>maven-jaxb2-plugin</artifactId>
> <dependencies>
> <dependency>
> <groupId>org.jvnet.jaxb2_commons</groupId>
> <artifactId>basic</artifactId>
> <version>${pom.version}</version>
> </dependency>
> </dependencies>
> <configuration>
> <args>
> <arg>-XtoString</arg>
> <arg>-Xequals</arg>
> <arg>-XhashCode</arg>
> <arg>-Xcopyable</arg>
> </args>
> </configuration>
> </plugin>
>
> This works, but sometimes fails due to the Maven bug/problem I've
> described in a previous mail on the topic.


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com