You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2026/09/03 20:41:03 UTC
(plc4x) branch develop updated: fix: Updated the scripts to work with Maven 4's updated output format.
This is an automated email from the ASF dual-hosted git repository.
chrisdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new 8d131158ed fix: Updated the scripts to work with Maven 4's updated output format.
8d131158ed is described below
commit 8d131158edfb6754215ea5bd4e8932288c0fdaca
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Sep 3 22:40:53 2026 +0200
fix: Updated the scripts to work with Maven 4's updated output format.
---
tools/release-1-create-branch.sh | 2 +-
tools/release-2-prepare-release.sh | 2 +-
tools/release-abort.sh | 2 +-
tools/validate-release.sh | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/release-1-create-branch.sh b/tools/release-1-create-branch.sh
index 9528213174..70867573d6 100755
--- a/tools/release-1-create-branch.sh
+++ b/tools/release-1-create-branch.sh
@@ -51,7 +51,7 @@ fi
# Maven 4 prefixes even quiet output with "[INFO] [stdout] ", so take the last token of the
# last line rather than the whole output.
-PROJECT_VERSION=$("$DIRECTORY/mvnw" -f "$DIRECTORY/pom.xml" -q -Dexec.executable=echo -Dexec.args="\${project.version}" --non-recursive exec:exec | tail -n 1 | awk '{print $NF}')
+PROJECT_VERSION=$("$DIRECTORY/mvnw" -f "$DIRECTORY/pom.xml" -q --non-recursive -Dexpression=project.version -DforceStdout help:evaluate | tail -n 1 | awk '{print $NF}')
if [[ ! "$PROJECT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)?$ ]]; then
echo "❌ Could not read a usable project version, got '$PROJECT_VERSION'."
echo " Everything below derives the branch and tag names from it, so aborting."
diff --git a/tools/release-2-prepare-release.sh b/tools/release-2-prepare-release.sh
index da9e3fbb1b..f431bbc60a 100755
--- a/tools/release-2-prepare-release.sh
+++ b/tools/release-2-prepare-release.sh
@@ -41,7 +41,7 @@ fi
# Maven 4 prefixes even quiet output with "[INFO] [stdout] ", so take the last token of the
# last line rather than the whole output.
-PROJECT_VERSION=$("$DIRECTORY"/mvnw -f "$DIRECTORY"/pom.xml -q -Dexec.executable=echo -Dexec.args="\${project.version}" --non-recursive exec:exec | tail -n 1 | awk '{print $NF}')
+PROJECT_VERSION=$("$DIRECTORY"/mvnw -f "$DIRECTORY"/pom.xml -q --non-recursive -Dexpression=project.version -DforceStdout help:evaluate | tail -n 1 | awk '{print $NF}')
if [[ ! "$PROJECT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)?$ ]]; then
echo "❌ Could not read a usable project version, got '$PROJECT_VERSION'."
echo " Everything below derives the branch and tag names from it, so aborting."
diff --git a/tools/release-abort.sh b/tools/release-abort.sh
index 82c1ea34b5..306f667772 100755
--- a/tools/release-abort.sh
+++ b/tools/release-abort.sh
@@ -31,7 +31,7 @@ DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# Maven 4 prefixes even quiet output with "[INFO] [stdout] ", so take the last token of the
# last line rather than the whole output.
-CURRENT_VERSION=$("$DIRECTORY/mvnw" -f "$DIRECTORY/pom.xml" -q -Dexec.executable=echo -Dexec.args="\${project.version}" --non-recursive exec:exec | tail -n 1 | awk '{print $NF}')
+CURRENT_VERSION=$("$DIRECTORY/mvnw" -f "$DIRECTORY/pom.xml" -q --non-recursive -Dexpression=project.version -DforceStdout help:evaluate | tail -n 1 | awk '{print $NF}')
# The version to go back to cannot be derived reliably: after "release:branch" the poms hold the
# next minor version, after "release:prepare" the next bugfix version, and in between the release
diff --git a/tools/validate-release.sh b/tools/validate-release.sh
index cb7ea4b27c..ece04d62c5 100755
--- a/tools/validate-release.sh
+++ b/tools/validate-release.sh
@@ -65,7 +65,7 @@ fi
# Maven 4 prefixes even quiet output with "[INFO] [stdout] ", so take the last token of the
# last line rather than the whole output.
-PROJECT_VERSION=$("$DIRECTORY/mvnw" -f "$DIRECTORY/pom.xml" -q -Dexec.executable=echo -Dexec.args="\${project.version}" --non-recursive exec:exec | tail -n 1 | awk '{print $NF}')
+PROJECT_VERSION=$("$DIRECTORY/mvnw" -f "$DIRECTORY/pom.xml" -q --non-recursive -Dexpression=project.version -DforceStdout help:evaluate | tail -n 1 | awk '{print $NF}')
if [[ -z "$PROJECT_VERSION" ]]; then
echo "❌ Could not determine the project version, aborting."
exit 1