Search

3.3. Validating Server-Side Plug-ins

download PDF
The JBoss ON server includes special classes that validate server-side plug-ins as part of the Maven build process.
Validation means that the build process checks that the server-side plug-in descriptor is acceptable and complete. Every server-side plug-in is checked for a handful of things:
  • The XML is well-formed and validates with the configured server plug-in XML schema
  • If a plug-in component is specified, its class is found in the plug-in JAR and can be instantiated
  • All scheduled jobs are configured properly
  • The plug-in has a valid version
  • The plug-in configuration is declared correctly
NOTE
Plug-in validation is executed during the Maven build process when creating the JAR file. If the plug-in JAR is built using another system or on a different machine, then validation isn't run.
To automatically validate a plug-in during a build using Maven; any plug-ins to be validated must be added to the validator's pom.xml configuration file.
  1. Open the pom.xml file in the sourceRoot/modules/enterprise/server/plugins/validate-all-serverplugins/ directory.
  2. Add a <pathelement> line to the file which points to the custom server-side plug-in JAR file. For example:
    <pathelement location="../myPlugin/target/myPlugin.jar" />
    
  3. Build the plug-in.
    mvn install
    
TIP
The RHQ source code includes a validator utility which can be used with custom plug-in infrastructure. This is contained in the org.rhq.enterprise.server.plugin.pc.ServerPluginValidatorUtil class.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.