use of com.itemis.maven.plugins.unleash.ReleasePhase in project unleash-maven-plugin by shillner.
the class SetNextDevVersion method setParentVersion.
private void setParentVersion(MavenProject project, Document document) {
Parent parent = project.getModel().getParent();
if (parent != null) {
Map<ReleasePhase, ArtifactCoordinates> coordinatesByPhase = this.metadata.getArtifactCoordinatesByPhase(parent.getGroupId(), parent.getArtifactId());
ArtifactCoordinates oldCoordinates = coordinatesByPhase.get(ReleasePhase.RELEASE);
ArtifactCoordinates newCoordinates = coordinatesByPhase.get(ReleasePhase.POST_RELEASE);
// for it
if (newCoordinates != null) {
this.log.debug("\t\tUpdate of parent version of module '" + project.getGroupId() + ":" + project.getArtifact() + "' [" + oldCoordinates.getVersion() + " => " + newCoordinates.getVersion() + "]");
PomUtil.setParentVersion(project.getModel(), document, newCoordinates.getVersion());
}
}
}
use of com.itemis.maven.plugins.unleash.ReleasePhase in project unleash-maven-plugin by shillner.
the class SetReleaseVersions method setParentVersion.
private void setParentVersion(MavenProject project, Document document) {
Parent parent = project.getModel().getParent();
if (parent != null) {
Map<ReleasePhase, ArtifactCoordinates> coordinatesByPhase = this.metadata.getArtifactCoordinatesByPhase(parent.getGroupId(), parent.getArtifactId());
ArtifactCoordinates oldCoordinates = coordinatesByPhase.get(ReleasePhase.PRE_RELEASE);
ArtifactCoordinates newCoordinates = coordinatesByPhase.get(ReleasePhase.RELEASE);
// for it
if (newCoordinates != null) {
this.log.debug("\tUpdate of parent version of module '" + project.getGroupId() + ":" + project.getArtifact() + "' [" + oldCoordinates.getVersion() + " => " + newCoordinates.getVersion() + "]");
PomUtil.setParentVersion(project.getModel(), document, newCoordinates.getVersion());
}
}
}
use of com.itemis.maven.plugins.unleash.ReleasePhase in project unleash-maven-plugin by shillner.
the class SetReleaseVersions method setProjectVersion.
private void setProjectVersion(MavenProject project, Document document) {
Map<ReleasePhase, ArtifactCoordinates> coordinatesByPhase = this.metadata.getArtifactCoordinatesByPhase(project.getGroupId(), project.getArtifactId());
String oldVerion = coordinatesByPhase.get(ReleasePhase.PRE_RELEASE).getVersion();
String newVersion = coordinatesByPhase.get(ReleasePhase.RELEASE).getVersion();
this.log.debug("\tUpdate of module version '" + project.getGroupId() + ":" + project.getArtifact() + "' [" + oldVerion + " => " + newVersion + "]");
PomUtil.setProjectVersion(project.getModel(), document, newVersion);
}
use of com.itemis.maven.plugins.unleash.ReleasePhase in project unleash-maven-plugin by shillner.
the class TagScm method init.
private void init() {
this.scmProvider = this.scmProviderRegistry.getProvider();
Map<ReleasePhase, ArtifactCoordinates> coordinates = this.metadata.getArtifactCoordinatesByPhase(this.project.getGroupId(), this.project.getArtifactId());
ArtifactCoordinates postReleaseCoordinates = coordinates.get(ReleasePhase.RELEASE);
this.globalReleaseVersion = postReleaseCoordinates.getVersion();
this.cachedPOMs = Maps.newHashMap();
}
Aggregations