vent time…

Vent time!

I spent the vast majority of the day surrounding by code printouts, a notebook with scrawls and notes, and a laptop only to find the one true example of a software klien bottle. You know – one of those rare examples of software that is built from two projects that have dependencies on each other? Although I’d love to say it’s hard to do, it’s unfortunately all to easy. Build up one project, store the results somewhere. Build the second project, reference the results of the first while building, invert the process and repeat. Sort of a vile jacobs ladder where you can’t actually build either project independently anymore. Blech!

And all this to develop a maven 2 plugin, which is proving far more troublesome than I’d hoped. At its core this is all about some code generation – doclet stuff. I’ve never done anything like that in the java world, and so today includes a few brushes with XDoclet and comparing it to the original concept of extending javadoc from Java 1.3 (which is how this klein-bottle-software code works). Talk about a complete PITA. Generating a plain java-based maven plugin isn’t bad at all – a little hard to find docs on, but relatively straightfoward.

I finally bagged on dissecting the klein bottle and tried to wrap this all up into a maven ANT based mojo. That only resulted in a completely undecipherable Null Pointer Exception when I attempted to use it from a project. It’s the ant based plugins which are starting to (in my opinion) really annoy the snot out of me – if only because of the utterly useless error message from Maven. By the way, ‘mvn -e -X’ is your friend.

I spent a few minutes seeing if I could drive the javadoc plugin into doing what I needed – but I didn’t see any easy mechanism to get it to bind to an earlier part of the build lifecycle. Which it kinda needs to be, since it’s generating sources. No luck there.

So now I’m at asking the mailing list for help debuging the mojo and looking at just slapping some Ant tasks directly into the POM file for this project. I really wanted to do this as a plugin, but unless I want to go learn all about XDoclet I think I may be SOL.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s