use of com.itemis.maven.aether.ArtifactCoordinates in project unleash-maven-plugin by shillner.
the class DetectReleaseArtifacts method wasFixedVersion.
private boolean wasFixedVersion(MavenProject p) {
Map<ReleasePhase, ArtifactCoordinates> coordinatesByPhase = this.metadata.getArtifactCoordinatesByPhase(p.getGroupId(), p.getArtifactId());
String preReleaseVersion = coordinatesByPhase.get(ReleasePhase.PRE_RELEASE).getVersion();
String releaseVersion = coordinatesByPhase.get(ReleasePhase.RELEASE).getVersion();
if (Objects.equal(preReleaseVersion, releaseVersion)) {
return true;
}
return false;
}
use of com.itemis.maven.aether.ArtifactCoordinates in project unleash-maven-plugin by shillner.
the class SetNextDevVersion 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.RELEASE).getVersion();
String newVersion = coordinatesByPhase.get(ReleasePhase.POST_RELEASE).getVersion();
this.log.debug("\t\tUpdate of module version '" + project.getGroupId() + ":" + project.getArtifact() + "' [" + oldVerion + " => " + newVersion + "] Version Upgrade Strategy: " + this.versionUpgradeStrategy.name());
PomUtil.setProjectVersion(project.getModel(), document, newVersion);
}
use of com.itemis.maven.aether.ArtifactCoordinates 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.aether.ArtifactCoordinates 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.aether.ArtifactCoordinates 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);
}
Aggregations