java -jar rhq-pluginGen-3.0.2-SNAPSHOT-jar-with-dependencies.jar
This module is a simple generator, that asks some questions and builds a plugin skeleton from it.
The generator lives in the RHQ source tree under modules/helpers/pluginGen
Binary versions can be obtained from the SourceForge download page.
To start the generator just type
java -jar rhq-pluginGen-3.0.2-SNAPSHOT-jar-with-dependencies.jar
After the generator has run (and you have finished the plugin), you need to remember to add the new plugin to the parent pom as well. Otherwise it will not be picked up on full builds.
Vesion 3.0.2 is not working on Windows.
User input is in bold, comments are in italics
$ java -jar rhq-pluginGen-3.0.2-SNAPSHOT-jar-with-dependencies.jar
Please specify the plugin root category PLATFORM(P), SERVER(S), SERVICE(I), s
Please specify its Name: foo
Please specify its PackagePrefix: org.rhq.plugins
Please specify its FileSystemRoot: /your/path/for/plugins
Please specify its ComponentClass: FooComponent
Please specify its DiscoveryClass: FooDiscovery
Please specify if it should support Events (y/N): y
Please specify its Description: my foobar descripion
Please specify its ParentType:
Please specify if it should support HasMetrics (y/N): y
Please specify if it should support HasOperations (y/N): y
Please specify if it should support Singleton (y/N): y
Please specify if it should support ResourceConfiguration (y/N): y
Please specify if it should support SupportFacet (y/N): y
Please specify if it should support CreateChildren (y/N): y
Please specify if it should support UsesExternalJarsInPlugin (y/N): y
Please specify if it should support DeleteChildren (y/N): y
Please specify if it should support ManualAddOfResourceType (y/N): y
Please specify if it should support UsePluginLifecycleListenerApi (y/N): y
Please specify if it should support DependsOnJmxPlugin (y/N): y
Please specify its RhqVersion: 4.1.0
Please specify its PluginName: foo
Please specify its PluginDescription: my plugin description
Do you want to add a child to foo? (y/N) y
Please specify the plugin root category SERVER(S), SERVICE(I), i
Please specify its Name: child
Please specify its ComponentClass: ChildComponent
Please specify its DiscoveryClass: ChildDiscovery
Please specify if it should support Events (y/N): y
Please specify its Description: my child description
Please specify if it should support HasMetrics (y/N): y
Please specify if it should support HasOperations (y/N): y
Please specify if it should support Singleton (y/N): y
Please specify if it should support ResourceConfiguration (y/N): y
Please specify if it should support SupportFacet (y/N): y
Please specify if it should support CreateChildren (y/N): y
Please specify if it should support DeleteChildren (y/N): y
Please specify if it should support ManualAddOfResourceType (y/N): y
Please specify its PluginName: child
Please specify its PluginDescription: child plugin description