users@jaxb.java.net

Re: patch for maven-jaxb2-plugin

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Mon, 29 Jan 2007 22:46:46 +0100

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.

Bye.
/lexi