OakPAL Checklists are discovered by scanning MANIFEST.MF files on the classpath for Oakpal-Checklist headers, which each define a comma-separated lists of JAR-relative resource paths. The MANIFEST.MF should also use a Bundle-SymbolicName or Automatic-Module-Name header to declare a module name for its exported checklists.
For example, the oakpal-core jar exports a single checklist, OAKPAL-INF/checklists/basic.json checklist, and identifies itself as net.adamcin.oakpal.core, in META-INF/MANIFEST.MF.
Discovered checklists are referenceable by module/name, as in net.adamcin.oakpal.core/basic, or for shorthand, just name, as in basic. Shorthand is matched according to the order of checklist discovery on the classpath.
Checklists are json files that match the basic structure of this example:
{ "name": "acmeAemChecks", "checks": [ { "name": "require-acme-metadata", "impl": "com.example.acme.oakpal.checks.RequireAcmeMetadataCheck" }, { "name": "OSGi Configs Check", "impl": "com.example.acme.oakpal.checks.OsgiConfigsProgressCheckFactory", "config": { "installerPaths": ["/libs","/apps"] } }, { "name": "No embedded clientlibs", "impl": "OAKPAL-INF/checks/noClientLibEmbed.js", "config": { "allow": true, "boo": false } } ], "repoInits": [ "create path (nt:folder) /apps", "create path (nt:folder) /libs" ], "forcedRoots: [ { "path": "/content/acme", "primaryType": "sling:Folder", "mixinTypes": [] } ], "jcrNodetypes": { "sling:ResourceSuperType": { "@":[ "mixin" ], "-":[{ "name":"sling:resourceSuperType", "type":"String" }] } }, "jcrPrivileges": [ "acme:distributeRedditGold" ], "jcrNamespaces": [ { "prefix": "sling", "uri": "http://sling.apache.org/jcr/sling/1.0" } ] }
A checklist basically has a name and a list of checks, which represent CheckSpecs. Each check spec must have at least a name, and an impl representing a className of a ProgressCheckFactory or ProgressCheck implementation, or a classpath resource name to locate a script progress check. For script checks and ProgressCheckFactory implementations, you can specify an optional config object to serve as a default configuration when this check spec is loaded.
For a real example, refer to the the basic checklist.
A checklist may also specify a few optional properties that the OakMachine can load before each scan as an InitStage. When the checklist is actively selected in the maven plugin, these resources will be used to to initialize the repository to a state that serves as a starting context for checks. They will be applied in the order they are listed below.