We shouldn't silently ignore this though - if we aren't logging an error
message at plugin deployment time, we should be. It would be a problem if we do not log an error to let you know why it failed.
I just tried deploying a plugin with one of the metric's default collection interval set to 20000. The following warning was printed in the Server log:
08:58:22,067 WARN [AgentPluginScanner] Failed to scan agent plugin [/home/ips/Projects/rhq/dev-container/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-jboss-as-plugin-4.1.0-SNAPSHOT.jar] found on filesystem. Skipping. Cause: org.rhq.core.clientapi.agent.PluginContainerException: Could not successfully parse the plugin descriptor [META-INF/rhq-plugin.xml found in plugin jar at [file:/home/ips/Projects/rhq/dev-container/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-jboss-as-plugin-4.1.0-SNAPSHOT.jar]
It correctly states that it could not parse the plugin descriptor, but it doesn't give any details as to what was wrong with the plugin descriptor. We can probably print something more informative here. I'll take a peek at the code.
I checked in a fix to master [1] so that we now log the details of the validation errors, including the line # and column # of the schema violation. Here's an example:
[ERROR] Validation fatal error while parsing [jopr-jboss-as-plugin-4.1.0-SNAPSHOT.jar:META-INF/rhq-plugin.xml] at line 221, column 94: cvc-minInclusive-valid: Value '20000' is not facet-valid with respect to minInclusive '30000' for type '#AnonType_defaultIntervalmetric'.
Similar logging is also done when validation errors occur during parsing of server plugin descriptors.