users@jaxb.java.net

Re: patch for maven-jaxb2-plugin

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

Hi Kohsuke,

> I made a patch for maven-jaxb2-plugin so that XJC plugins can be
> specified as a configuration of the mojo. See below for an example.
>
> Would it be possible to integrate that to the plugin? If it's OK, I'd
> happy to commit. I'd also like to then release a new version of this
> plugin, so that I can use this in another project of mine.

Thanks for the patch, nice idea.

I had to rework it a bit. It seems like your version does not resolve
dependencies of plugins. For instance, if I add

<plugins>
        <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin-testing</artifactId>
                <version>0.2</version>
        </plugin>
</plugins>


URL of the JAR maven-jaxb2-plugin-testing-0.2.jar is added to the classpaths,
but its dependencies are not. Consequently, the plugin cannot be instantiated by
JAXB because of the class not found errors.

I've added transitive plugin dependency resolution to correct this. Please see
the tests/two sample project in maven-jaxb2-plugin.
I'd also be grateful if you test it on your machine/in your projects.

These enhancements are made in the version 0.2. Works fine, all tests/sample
projects function well, so I'll go with a release.

Bye.
/lexi