JBoss Community Archive (Read Only)

RHQ 4.9

Plugins - Skeleton Plugin

What is the Skeleton Plugin?

The Skeleton Plugin is a project stub on which new plugins can be easily written. It includes the following:

  • The basic file structure required for a plugin.

  • Maven POM file necessary to build the project, placing the necessary files in their correct locations. This POM file is configured to use the RHQ Plugin Validator as well.

  • A stubbed out plugin descriptor with comments guiding how to get started.

  • Code samples demonstrating how to use the required API interfaces.

  • IDE project files for Eclipse and IntelliJ.

How do I use it to write my own plugins?

The simplest way is to copy the directory structure and begin to edit as necessary. In other words, the contents of the skeleton-plugin directory may be copied to another directory to serve as the basis for the new plugin. If you are unfamiliar with using Maven for builds, check their site for more information.

The following checklist describes areas in the Skeleton Plugin to be edited:

images/author/images/icons/emoticons/check.gif Changes to the pom.xml file

  • Rename the artifactId and groupId

  • Change the name attribute to reflect the new plugin

  • Optional: Change the description attribute to reflect the new plugin

  • Optional: Select a logging framework dependency (see descriptor for more details)

  • Optional: Add any dependencies the new plugin requires

images/author/images/icons/emoticons/check.gif Remove or rename and modify the sample resource types from the plugin descriptor
images/author/images/icons/emoticons/check.gif Once the references to the sample code components are removed from the plugin descriptor, those classes may be deleted

Once the plugin code has been added, the plugin can be built using the following maven command:

mvn install

The plugin will be created in the target directory with the following name:


Once the plugin has been built, the validator can be used to ensure the integrity of the descriptor and class files.

Where can I download the skeleton plugin?

Get the most up-to-date version of the plugin by simply getting this maven module from git: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=tree;f=etc/samples/skeleton-plugin;hb=refs/heads/master

The 1.0.0.GA version of the skeleton plugin can be downloaded here.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 07:57:33 UTC, last content change 2013-09-18 19:42:09 UTC.