Case Study: Modular Java Workspace Administration

by Pete Carapetyan

 

Resistance To Modularity

Cultural resistance to OSGi in particular, and modularity in general, is almost as deep and broad as the resistance to testing, build management, continuous integration, and other practices that irritate the typical corporate Java developer who 'just wants to write code'.

Foolishness

In a foolish bid to woo the hearts and minds of his brethern, I authored MJWA or Modular Java Workspace Administration. Hey! It only took Maven 10 years to win the hearts and minds of developers, maybe if similarly easy (?) tooling was available for modularity, it wouldn't be thought of as such an evil hindrance to java developers.

How It Works

Written in the Groovy languge with little more than a delimited text file as source data, MJWA allows the developer to almost instantly set up a workspace with mulitple modules. It can be run as OSGi or without, just using separate Maven modules. Later, as each new module needs to be added, the developer only adds a line to the delimited file, re runs, and his new module appears.

Thus, the resistance to modularity disappears instantly, and developers embrace OSGi, singing Kum Ba Yah and holding hands.

Additionally, as each new version advances, the change need only be made in the one delimited file, and automagically pom.xml and MANIFEST.MF files are updated and ready to commit to git or the SCM of choice.

Code Link: MJWA at bitbucket.

Status

This project is usable by the author, but as of yet not documented sufficiently to help much of anyone else. Thus, it has probably not delivered on it's stated purpose.