users@jaxb.java.net

Using vendor extension in the MAVEN 2 plugin

From: Benoit Callebaut <benoit.callebaut_at_euphonynet.be>
Date: Thu, 12 Oct 2006 19:49:17 +0200

Hello,
I have a maven 2 Project in Netbeans 5.0 with a xsd file.
Compiling the XML Schema with the maven plugin works fine.
But, I have a problem. I want to use vendor extension (I need to inject
code in the generated classes).
This doesn't work.
Here is how I did it :
I set up the project to compile my XML Schema : enable jaxb2 maven plugin.
I created a maven plugin containing the extension and I put a reference
to it into my POM file.
I enabled in the config of the maven-jaxb-plugin extensionsions with
the following tag <extension>true</extension>
I also put the following tag <args>-Xsync-methods</args> (only to test)

I build the project without any problem but I have no synchronized methods

I have put my xsd file and the POM file.
Note that in the xsd file I tried also to use the code-injector plugin
and I removed the following line
jaxb:extensionBindingPrefixes="ci"

Netbeans complains with that line.

Can you explain me how to do it (and maybe add an article in your blog
about it)

Thanks,
Benoit