this descriptor is already looking ok. For the plugin-config, you need to add
<c:simple-property ..... />
Elements to the <server> element.
Have a look at e.g.
for an example and
http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=blob;f=modules/plugins/irc/src/main/java/org/rhq/plugins/irc/IRCServerDiscoveryComponent.java (starting at Line 35) on how to use this configuration.
It is also possible not to get anything from the UI set up in the properties and have stuff being added within your discovery method.
If you can discover the resource (= find it at all), you don't need a ManualAddFacet.
Also have a look at this "How to write a plugin" paper, page 18+ http://www.redhat.com/f/pdf/Write_A_Plugin_WP_web.pdf
I should mention that I'm using JON 2.4. When I add <plugin-configuration> elements to my descriptor, the plugin won't load and the log says "no xml descriptor found." Is this because of the version I'm using?
RHQ 3 and JBoss ON 2.4 are compatible here. This should not be an issue.
Can you please output the full server + agent log (for the deploy , not since very start)
You can find many examples of plugin descriptors by unzipping any of the plugin jars that are bundled with JON (these jars live in RHQ_SERVER_HOME/jbossas/server/default/deploy/rhq.ear/rhq-plugins/) and looking at the file META-INF/rhq-plugin.xml.
The short of it is adding
<c:simple-property name="port" type="integer" default="5672"/>
Produces this in the server log:
2011-02-08 09:33:20,152 WARN [org.rhq.enterprise.server.core.plugin.PluginDeploymentScanner] Does not look like [/home/jhlopez/Desktop/jon-server-2.4.0.GA/plugins/MRGM-plugin-3.0.0.jar.fixme] is a plugin jar -(Cause: java.lang.NullPointerException:no xml descriptor found in jar). It will be ignored. Please fix that file or remove it.
So it doesn't get deployed or make an appearance in the agent log. Can this error be caused by anything besides an invalid xml descriptor?
Its either an invalid XML or it isn't found explicitly at META-INF/rhq-plugin.xml.
There are XML schemas (.xsd) available - load them up in your XML editor and verify that your plugin .xml file is validated via the schema.
Here's the location of the two .xsd schemas needed to validate plugin descriptors (there is one main schema plus the configuration schema that is used to validate the config elements - you need both to fully validate a plugin descriptor)
this sounds more like a build issue where the jar job is not including the plugin descriptor.
If you unzip your plugin-jar, it should look like
IF you are on windows, make sure META-INF is all uppercase