Discover subsystems. We need to distinguish two cases denoted by the path plugin config:
- Path is a single 'word': here the value denotes a key in the resource path of AS7, that identifies a child type see e.g. the Connectors below the JBossWeb service in the plugin descriptor. There can be multiple resources of the given type. In addition it is possible that a path entry in configuration shares multiple types that are separated by the pipe symbol.
- Path is a key-value pair (e.g. subsystem=web ). This denotes a singleton subsystem with a fixes path within AS7 (perhaps below another resource in the tree.
This subclass adds logic for discovering different versions of the same logical resource, by stripping version info out of the path, removing it from the resourceName and setting it as the resourceVersion.
The default version matching pattern is designed to match maven-like version stamping:
name-version.ext
being the basic format. The version must minimally contain
major.minor
values. See Maven documentation for more information. The default pattern is
"^(.*?)-([0-9]+\\.[0-9].*)(\\..*)$"
. The same pattern is applied to all
Deployment
and
Subdeployment
artifacts.
To override the default pattern the following environment variable can be defined:
rhq.as7.VersionedSubsystemDiscovery.pattern=theDesiredRegexPattern
. The regex *must* capture three groups as does the default. Group1=name, Group2=version, Group3=extension.
To disable versioned discovery and maintain version strings in the deployment names, set
rhq.as7.VersionedSubsystemDiscovery.pattern=disable
@author Jay Shaughnessy