users@jaxb.java.net

Plugin development

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Fri, 15 Sep 2006 13:55:38 +0200

Hi.

I see more and more people get involved in plugin development. This is very
nice, makes JAXB a big future.

I have been developing JAXB plugins since a couple of years now. I've written
about a dozen plugins for JAXB 1 (some of them released as open source, some
used internally by my company).

I'd like to share my vision of the JAXB2 plugins.

My feeling that we need a solid framework for JAXB plugin development.

First of all, developing plugins requires a lot of utilities. You need things to
analyze ClassOutlines or FieldOutlines, you need things to assist you with code
creation, correctly resolve class names and many more stuff. You need your
plugins be parameterizable from the command line - or even configured with
Spring or other DI container.

You need a testing framework. You need the ability to trace your plugin with a
debugger to see what's happening an why does it fail. Without tracing you can
only develop relatively simple thingss. You need the ability to test your plugin
in the frame of automatic tests. You need the ability to tests that the
generated code behaves as it should behave. That it's compilable. That it's stable.

You need an approach to build and manage plugin projects. You need to make the
plugins you develop usable no matter if the user invokes xjc from the command
line, Ant or Maven.

You need to manage plugin dependencies - compile time or runtime.

You need all of this if you're serious.

You need documentation, experience and compenetce.

After all, you need promotion to let people know that your solution is out there.


This is my vision. I am implementing in in my projects.

There is a maven-jaxb2-plugin that lets you use and develop your own maven
plugins for jaxb-based code generation.

There is a maven-jaxb2-plugin-testing module which lets you execute XJC from
your test cases. I.e. you can trace your JAXB plugins with it.

(Here's some doc on that: https://maven-jaxb2-plugin.dev.java.net/docs/guide.html)

hyperjaxb3-tools already implements some valuable JAXB/XJC utilities, more to come.

If you think of developing a plugin, think of joining my projects. You will
benefit from the infrastructure and experience that's out there. The community
will benefit from innovative tools and solutions that ou develop on a solid
basement. The solid basement will benefit from you helping it to become a solid
basement. ;)

You are welcome.

Bye.
/lexi