- All Implemented Interfaces:
- org.azyva.dragom.model.plugin.ModulePlugin, org.azyva.dragom.model.plugin.NodePlugin, org.azyva.dragom.model.plugin.SelectStaticVersionPlugin
public class PhaseSelectStaticVersionPluginImpl
extends SelectStaticVersionPluginBaseImpl
implements org.azyva.dragom.model.plugin.SelectStaticVersionPlugin
Factory for SelectStaticVersionPlugin that implements a strategy for a development
workflow that uses development phases.
The idea is as follows. When a (development) project starts, a new dynamic
Version specific to the project is created and used throughout the development
effort. Assume that dynamic version is D/develop-myproject.
The ArtifactVersion within that Version is variable and contains a suffix
specific to the current development phase. Assume that the initial development
phase is iteration01, so that the ArtifactVersion is
develop-myproject-iteration01-SNAPSHOT. During that phase artifacts having that
ArtifactVersion are therefore created (by continuous integration builds).
At some point development for that project proceeds to a new phase
iteration02. Release and this SelectStaticVersionPlugin are used to
freeze the previous phase iteration01 before making that transition. This
plugin is therefore invoked with the runtime property CURRENT_PHASE set to the
current phase iteration01 so that a new static Version
S/develop-myproject-iteration01 is created.
During the creation of that Version, Release attempts to adjust the
ArtifactVersion within the module. But the ArtifactVersionMapperPlugin is
expected to be configured in such a way that the ArtifactVersion corresponding
to the new static Version is so that no adjustment is required. Here we
actually map a dynamic ArtifactVersion to the new static Version, which is
generally considered incorrect. But since static Version's representing phases
are not released versions, using a static ArtifactVersion is not appropriate.
We use a dynamic ArtifactVersion instead, which happens to not really violate
any important release engineering rules. Specifically the important rule that a
static ArtifactVersion correspond to a static Version remains respected.
In order to continue development in the new phase iteration02,
SwitchToDynamicVersion and the NewDynamicVersionPhasePlugin sibling are used to
change the ArtifactVersion to develop-myproject-iteration02-SNAPSHOT (while
keeping the same dynamic Version D/develop-myproject). See
PhaseSelectDynamicVersionPluginImpl for more information.
- Author:
- David Raymond