On Feb 20, 2009, at 10:58 AM, Mark Petrovic wrote:
>
> My project POM is growing incrementally as I add new aspects and
> functionality. Prior to adding the WADL plugin, I had the JAXB XJC
> plugin building classes from a referenced XSD schema file. I refer
> to this JAXB XJC artifact:
>
> <plugin>
> <groupId>com.sun.tools.xjc.maven2</groupId>
> <artifactId>maven-jaxb-plugin</artifactId>
> ...
> </plugin>
>
> When I added the WADL compiler plugin, I noticed that it, too,
> appears to call XJC independently. In fact, for the two plugins to
> coexist, I had to point them to the same output directory; had I
> not, they both generate the same classes in different places, and
> maven eventually complains about duplicate classes.
>
> My questions are these:
>
> 1) all other things being equal, may I, or perhaps should I, remove
> the XJC plugin and let the WADL plugin do the XJC compile?
>
Provided the WADL references all the XSDs that you previously used the
xjc plug-in on then you should be ok to remove the xjc task.
> 2) if I retain both plugins in my pom, is there a way to
> insightfully comment their mutual presence so that this potential
> duplication of work is declared ("These two plugins duplicate *some*
> work, but they are both included because...")?
>
I'll leave that to the Maven experts on the list.
>
> I should add that it *appears* that the WADL plugin is calling XJC.
> I'm new to maven (all of 2 weeks of immersion) and WADL/XJC. I
> could be seeing something else, but I don't think so.
>
The WADL plug-in does use xjc functionality to compile schemas
referenced from the WADL.
Marc.
>
---
Marc Hadley <marc.hadley at sun.com>
Sun Microsystems.