users@jaxb.java.net

Re: getting simple xjc plugin to work

From: Nicola Fagnani <nicfagn_at_iol.it>
Date: Thu, 9 Mar 2006 18:07:47 +0100

> All, I need serious help with this - have been struggling for a day
> or so
> trying to get a very simple first xjc plugin to work...I feel like
> I have
> done everything I need to do and have followed all instructions
> (that I can
> find) on the web. Am now getting the "unrecognized parameter
> -Xhibernate-java" error and don't know where to go next.....

The code and the ant script seems to be ok.
For this to work you have to include into the plugin jar a file named
com.sun.tools.xjc.Plugin in the package META-INF.services. The file
must contain the fully qualified name of your plugin, in this case
src.XjcHibernatePlugin.
Other than this, you must obviously include your plugin jar in the
xjc task classpath.
If you still have problems, perhaps you should try it with a fresh
CVS snapshot of JAXB2. In fact I made a very simple plugin that works
with a CVS snapshot of two weeks ago, and if you are interested you
can see its code in CVS under jaxb2-commons/camelcase-always.

Bye

Nicola Fagnani