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 01ebfe7baa..d54042ffcd 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 @@ -78,6 +78,10 @@ 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); + if (isSnapshot) { + newVersion += Versions.SUFFIX_SNAPSHOT; + } logger.info(project.getId() + " requires a version bump from " + currentVersion + " => " + newVersion); engine.setProjects(metadataReader.getProjects()); diff --git a/tycho-versions-plugin/src/main/java/org/eclipse/tycho/versions/engine/Versions.java b/tycho-versions-plugin/src/main/java/org/eclipse/tycho/versions/engine/Versions.java index 9fd6d01405..5bb105cbcf 100644 --- a/tycho-versions-plugin/src/main/java/org/eclipse/tycho/versions/engine/Versions.java +++ b/tycho-versions-plugin/src/main/java/org/eclipse/tycho/versions/engine/Versions.java @@ -17,9 +17,9 @@ import org.osgi.framework.Version; public class Versions { - private static final String SUFFIX_QUALIFIER = ".qualifier"; + public static final String SUFFIX_QUALIFIER = ".qualifier"; - private static final String SUFFIX_SNAPSHOT = "-SNAPSHOT"; + public static final String SUFFIX_SNAPSHOT = "-SNAPSHOT"; public static String toCanonicalVersion(String version) { if (version == null) {