From 82bc6a623fa268e3920ac2adc2aea3055e3e29c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Mon, 12 Aug 2024 17:32:26 +0200 Subject: [PATCH] Ignore unreleased for major updates when bump target Due to how maven versions work there are special qualifiers that are interpreted "lower" than the release version without a qualifier leading to unexpected updates. This adds the "lowest" qualifier (-alpha) so it gets excluded as well. --- .../java/org/eclipse/tycho/versionbump/UpdateTargetMojo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tycho-extras/tycho-version-bump-plugin/src/main/java/org/eclipse/tycho/versionbump/UpdateTargetMojo.java b/tycho-extras/tycho-version-bump-plugin/src/main/java/org/eclipse/tycho/versionbump/UpdateTargetMojo.java index 4c4e7ca996..d5c8a54212 100644 --- a/tycho-extras/tycho-version-bump-plugin/src/main/java/org/eclipse/tycho/versionbump/UpdateTargetMojo.java +++ b/tycho-extras/tycho-version-bump-plugin/src/main/java/org/eclipse/tycho/versionbump/UpdateTargetMojo.java @@ -143,7 +143,7 @@ protected void doUpdate() throws IOException, URISyntaxException, ParserConfigur if (!updateMajorVersion) { try { String[] strings = oldVersion.split("\\."); - mavenDependency.setVersion("[," + (Integer.parseInt(strings[0]) + 1) + ")"); + mavenDependency.setVersion("[," + (Integer.parseInt(strings[0]) + 1) + "-alpha)"); } catch (RuntimeException e) { getLog().warn("Can't check for update of " + mavenDependency + " because the version format is not parseable: " + e);