That is why we created the plugin community.
One cool new feature since writing the blog series is the new plugin skeleton generator, that Jason Dobies wrote. While the name of (the generator, not of Jay :-) is a little complicated ("RHQ Plugin Archetype") you don't need to be afraid :)
It is just a maven command that will create all you need.
To use the archetype you first need to download it as indicated on its wiki page.
Then you call it as follows (I am using multiple lines here, but on the shell you need to give that in one line).
$ cd $RHQ/modules/plugins
$ mvn archetype:create -DarchetypeGroupId=org.rhq \
This will emit a lot of stuff ending in:
[INFO] Archetype created in dir: /jon/jonHEAD/rhq/modules/plugins/rhq-test-plugin
Note that the version in the
-Dversionattribute above must correspond to the version of RHQ that you are using to build the plugin. Otherwise compiling of the plugin will fail.
All options are described on the wiki page. Basically you need two things:
artifactId, the name of your plugin, and
package, the java package of it.
One caveat: currently (as of 6/20) it is only generating the base directory structure and plugin descriptor, but no Java files. But I am very sure, Jason will fix that soon. And hey, this is open source and the source code is available from svn.
Have fun -- and join us on irc://irc.freenode.net/ in channel #rhq.