- All Implemented Interfaces:
- org.azyva.dragom.model.plugin.ArtifactInfoPlugin, org.azyva.dragom.model.plugin.ModulePlugin, org.azyva.dragom.model.plugin.NodePlugin
public class SimpleArtifactInfoPluginImpl
extends ModulePluginAbstractImpl
implements org.azyva.dragom.model.plugin.ArtifactInfoPlugin
Factory for ArtifactInfoPlugin that assumes a simple equivalence between a
module node path and the ArtifactGroupId using inference rules.
Rule 1: Base artifactId
-----------------------
The value of the property BASE_GROUP_ID is used as the base groupId. Then each
node name in the node path (up to but not the module name) is converted into an
element of the groupId. The conversion algorithm is to convert from PascalCase
to lowercase-with-dash notation.
The artifactId of the ArtifactGroupId is the module name.
For example if the value of the BASE_GROUP_ID property is com.acme and the
module node path is Foo/Bar/PascalCaseNodeName/my-module, the ArtifactGroupId
"com.acme.foo.bar.pascal-case-node-name:my-module" is assumed to be
definitively produced by builds of the module.
Rule 2: Submodules
------------------
Also, any ArtifactGroupId with the same groupId as above and an artifactId
starting with the module name followed by - (my-module- following the example)
is considered as being possibly produced by builds of the module. This is to
support modules having submodules as with Maven aggregator builds.
Rule selection
--------------
The value of the MODULE_NODE_PATH_INFERENCE_RULES property affects the
inference rules above:
- Undefined (null) or "ALL": All inference rules are applied.
- ONLY_BASE_ARTIFACT_ID: Only rule 1 is applied.
- NONE: No rule is applied (only exceptions below).
Exceptions
----------
Exceptions are supported. The value of the
ARRAY_DEFINITE_ARTIFACT_GROUP_ID_PRODUCED property is a JSON array of strings
representing the ArtifactGroupId of the artifacts definitively produced
by builds of the module.
For example if the ARRAY_DEFINITE_ARTIFACT_GROUP_ID_PRODUCED property has the
following value:
["com.acme.exception:legacy-module","com.acme.other-exception.other-legacy-module"]
the listed ArtifactGroupId are assumed to be definitively produced by build of
the module, on top of any ArtifactGroupId inferred by the rules above.
- Author:
- David Raymond