From 4b79f17ee0b5cf45c34158482c526a652085ac69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Lehmann-M=C3=B6rz?= Date: Mon, 2 Oct 2023 16:16:47 +0200 Subject: [PATCH] Retain .qualifier/-SNAPSHOT on version bump fix #2877 --- .../org/eclipse/tycho/versions/VersionBumpBuildListener.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tycho-versions-plugin/src/main/java/org/eclipse/tycho/versions/VersionBumpBuildListener.java b/tycho-versions-plugin/src/main/java/org/eclipse/tycho/versions/VersionBumpBuildListener.java index d54042ffcd..54a0d17d57 100644 --- a/tycho-versions-plugin/src/main/java/org/eclipse/tycho/versions/VersionBumpBuildListener.java +++ b/tycho-versions-plugin/src/main/java/org/eclipse/tycho/versions/VersionBumpBuildListener.java @@ -22,6 +22,7 @@ import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.codehaus.plexus.logging.Logger; +import org.eclipse.tycho.TychoConstants; import org.eclipse.tycho.build.BuildListener; import org.eclipse.tycho.core.exceptions.VersionBumpRequiredException; import org.eclipse.tycho.helper.ProjectHelper; @@ -78,9 +79,9 @@ public void buildEnded(MavenSession session) { String newVersion = suggestedVersion.map(String::valueOf) .orElseGet(() -> Versions.incrementVersion(currentVersion, VersionBumpMojo.getIncrement(session, project, projectHelper))); - boolean isSnapshot = currentVersion.endsWith(Versions.SUFFIX_SNAPSHOT); + boolean isSnapshot = currentVersion.endsWith(TychoConstants.SUFFIX_SNAPSHOT); if (isSnapshot) { - newVersion += Versions.SUFFIX_SNAPSHOT; + newVersion += TychoConstants.SUFFIX_SNAPSHOT; } logger.info(project.getId() + " requires a version bump from " + currentVersion + " => " + newVersion);