From fc8c8dfb448d0ac4b6276d87f3713cc2040b5438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Lehmann-M=C3=B6rz?= Date: Mon, 2 Oct 2023 15:59:56 +0200 Subject: [PATCH] Retain .qualifier/-SNAPSHOT on version bump fix #2877 --- .../java/org/eclipse/tycho/pomless/AbstractTychoMapping.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tycho-extras/tycho-pomless/src/main/java/org/eclipse/tycho/pomless/AbstractTychoMapping.java b/tycho-extras/tycho-pomless/src/main/java/org/eclipse/tycho/pomless/AbstractTychoMapping.java index f778f8afa2..551022463f 100644 --- a/tycho-extras/tycho-pomless/src/main/java/org/eclipse/tycho/pomless/AbstractTychoMapping.java +++ b/tycho-extras/tycho-pomless/src/main/java/org/eclipse/tycho/pomless/AbstractTychoMapping.java @@ -66,6 +66,7 @@ public abstract class AbstractTychoMapping implements Mapping, ModelReader { protected static final String TYCHO_POMLESS_AGGREGATOR_NAMES_PROPERTY = "tycho.pomless.aggregator.names"; private static final String PARENT_POM_DEFAULT_VALUE = System.getProperty(TYCHO_POMLESS_PARENT_PROPERTY, ".."); + private static final String QUALIFIER_SUFFIX = ".qualifier"; private static final String MODEL_PARENT = "TychoMapping.model.parent"; @Requirement @@ -343,12 +344,12 @@ private static void setLocation(Model model, Path modelSource) { protected String getPomVersion(String pdeVersion) { String pomVersion = pdeVersion; - if (pdeVersion.endsWith(TychoConstants.QUALIFIER_SUFFIX)) { + if (pdeVersion.endsWith(QUALIFIER_SUFFIX)) { String unqualifiedVersion = pdeVersion.substring(0, pdeVersion.length() - QUALIFIER_SUFFIX.length()); if (isExtensionMode() && snapshotFormat != null) { return unqualifiedVersion + snapshotFormat; } - return unqualifiedVersion + TychoConstants.SNAPSHOT_SUFFIX; + return unqualifiedVersion + "-SNAPSHOT"; } return pomVersion; }