users@jaxb.java.net

Maven 2 Jaxb2 plugin - request for supporting plugins

From: Jonathan Johnson <jonjohnson_at_mail.com>
Date: Thu, 18 May 2006 23:15:55 -0400

Malachi –

I think all we need in the configuration is…

  <classpaths>
    <classpath>/path/to/jaxb-xjc.jar</classpath>
    <classpath>/path/to/plugin.jar</classpath>
  </classpaths >


and

<extensions>
  <extension>locator</extension>
</extensions>

My only question is how to pass this information to XJC2Task? XJC2Task has
a setClasspath method so I will just take all the classpath settings and put
them into a long classpath string (separated with ‘;’ or ‘:’). But, I don’t
see how to pass the name of the plugin invocation method to the XJC2Task
class. There does not seem to be a public method for this. Perhaps Kohsuke
knows.

There is no need for a enabled="true" attribute since the absence or
presence of a list will determine this state..

Passing the classpath to the plugin does not seem too bad to me. Its just a
little odd since all the jars are typically in the repository yet these jaxb
plugins would be in the module source – that does mike it a little strange,
but it should work. I’m not sure what the XJC2Task does with the classpath,
but what if we could just add the jaxb plugin to the maven pom dependency
list and just called the plugin invocation method? That would be nice so
the jaxb plugin could be published to the repository and it would follow the
maven approach. We could avoid the classpath setting entirely. (Kohsuke -
thoughts?)

What else is needed? Does the invocation method ever take a parameter list?
Do the plugins inherit the XJC2Task logging mechanism?