In lib/jaxb-xjc.jar, there is a file called, META-INF/services/
com.sun.tools.xjc.Plugin. You need to add an entry so it looks like
this:
com.sun.tools.xjc.addon.locator.SourceLocationAddOn
com.sun.tools.xjc.addon.sync.SynchronizedMethodAddOn
com.sun.tools.xjc.addon.at_generated.PluginImpl
com.sun.tools.xjc.addon.code_injector.PluginImpl <=== add this line
It should really be added to the base code, but it's tons of fun to
take the time to try and figure it out yourself why all the plugins
work except this one.
On Mar 24, 2007, at 7:15 PM, James Humphrey wrote:
> Hi guys,
>
> I just got done reading an old blog entry written by Kohsuke
> discussing plugin development.
>
> http://weblogs.java.net/blog/kohsuke/archive/2005/06/
> writing_a_plugi.html
>
> The code injection example used is exactly what I'm looking for -is
> there a working jar version floating around anywhere? I looked
> over at jaxb2-commons and didn't see anything. I actually tried to
> create the plugin myself but keep getting the following message
> from both the command line and xjc ant task:
>
> unrecognized parameter -Xinject-code
>
> I'm sure I missed something in the configuration; however, before I
> research further into the issues, I'm wondering if someone out
> there already has a working version of it that I can use.
>
> thanks guys,
>
> -james
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>