RHQ, the common services project for infrastructure management

  Dashboard > RHQ-Project > ... > RHQ Plugin Community > Plugins - Archetype
  RHQ-Project Log In | Sign Up   View a printable version of the current page.  
  Plugins - Archetype
Added by Jason Dobies , last edited by Jason Dobies on Jun 09, 2008  (view change)
Labels: 
(None)

What is the RHQ Plugin Archetype?

Instead of starting with the skeleton plugin, a plugin developer may elect to use a maven archetype. The archetype will prompt for basic information on the plugin and create the corresponding directory structure, populating in the entered values where appropriate. The following describes the requested parameters and their use:

Parameter Name Example Restrictions Use
rhq-plugin-name PostgresPlugin Cannot have spaces Programmatic name of the plugin. This will also be used to populate the displayName value in the rhq-plugin.xml (plugin descriptor) file.
groupId org.rhq See maven documentation Maven group ID. See maven documentation for more details.
artifactId rhq-postgres-plugin See maven documentation Maven artifact ID. Part of the name of the plugin JAR built by maven. See maven documentation for more details.
version 1.0.1-SNAPSHOT See maven documentation Maven version number. In other words, version of the JAR that is built by maven (this will be used in the generated JAR as well). See maven documentation for more details.
package org.rhq.plugins.postgres Cannot have spaces Java package which will be created in the Java source directory. This is also referenced in the rhq-plugin.xml file as the package attribute on the plugin. As maven archetypes do not support creating empty directories, a temporary Java class (Holder.java) will be created and should be deleted.

How do I use the archetype?

The files for the archetype are currently stored in the JBoss maven repository. The following command will use that repository to download the archetype files:

mvn archetype:generate -DarchetypeGroupId=org.rhq -DarchetypeArtifactId=rhq-plugin-archetype -DarchetypeVersion=1.0.0.GA -DarchetypeRepository=http://repository.jboss.org/maven2/
Powered by a free Atlassian Confluence Open Source Project License granted to Hyperic HQ. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators