public interface ReferenceManagerPlugin extends ModulePlugin
<dependencyManagement> section of the POM contains references to other
modules, but these are dependencies only if the POM also includes a reference
to the module in the <dependencies> section. Similarly, in the
<dependencies> section, if a module is identified without a version,
that is not considered a reference from the point of view of this plugin.
Only direct references are managed by this plugin. If a module A references
another module B which in turn references module C, module C's references are
not considered by this plugin, although they would probably be by tools like
Maven (transitive dependencies). Transitive references are not useful in the
context of Dragom.
References can be at the artifact or the source level. References at the source
level (in which case the ArtifactGroupId and artifact version is not included)
must always be to modules known to Dragom. Otherwise would be a configuration
error in the model. This is logical since source-level references imply that
the sources of the referenced module are required for building modules
referencing it.
References at the artifact level can be to modules unknown to Dragom. In such a
case the reference will not include a NodePath or a Version.
Note that version expressed using the class Version are considered to be
source-level versions, even though they are not simple strings and provide some
level of abstraction. The reason is that the mapping between them is handled
internally in the ScmPlugin for the module.
The way references of a module are expressed depends on implementation
details of the module, which includes, but is not limited, to the build tool
used. Different implementations of this plugin support these differing
implementation details.
If Maven is used as the build tool, references will be expressed within the POM
file of the module. If the module is an aggregator module with submodules, the
aggregator module and the submodules are viewed as a single module from the
point of view of Dragom and the references managed by this plugin include those
of the aggregator module as well as those of its submodules and are presented
in a ways that is abstract to the caller, since aggregator are implementation
detail of the module.| Modifier and Type | Method and Description |
|---|---|
List<Reference> |
getListReference(Path pathModuleWorkspace)
Returns the List of Reference's of the
Module given the source code in
a given path. |
boolean |
updateReferenceArtifactVersion(Path pathModuleWorkspace,
Reference reference,
ArtifactVersion artifactVersion,
ByReference<Reference> byReferenceReference)
Updates the version of a reference using an artifact version.
|
boolean |
updateReferenceVersion(Path pathModuleWorkspace,
Reference reference,
Version version,
ByReference<Reference> byReferenceReference)
Updates the version of a reference using a global version.
|
getModulegetNodeList<Reference> getListReference(Path pathModuleWorkspace)
Module given the source code in
a given path.pathModuleWorkspace - Path to the Module.boolean updateReferenceVersion(Path pathModuleWorkspace, Reference reference, Version version, ByReference<Reference> byReferenceReference)
pathModuleWorkspace - Path to the module within the workspace.reference - Reference to modify.version - New version.byReferenceReference - The new Reference as would be returned by
getListReference(java.nio.file.Path) will be stored there. Can be null.boolean updateReferenceArtifactVersion(Path pathModuleWorkspace, Reference reference, ArtifactVersion artifactVersion, ByReference<Reference> byReferenceReference)
pathModuleWorkspace - Path to the module within the workspace.reference - Reference to modify.artifactVersion - New ArtifactVersion.byReferenceReference - The new Reference as would be returned by
getListReference(java.nio.file.Path) will be stored there. Can be null.Copyright © 2015–2017 AZYVA INC.. All rights reserved.