Skip to content

Commit 14a0211

Browse files
Pin Maven to 3.9.16 in release workflow
Add a step to the release GitHub Actions workflow that downloads and installs Apache Maven 3.9.16, verifies the SHA-512 checksum, extracts it to /opt and appends its bin to GITHUB_PATH. This pins Maven because Maven 3.10+ breaks central-publishing-maven-plugin bundling (upstream bug). The step is placed before the POM version update in the release job to ensure a compatible Maven is used during release tasks.
1 parent 49a0616 commit 14a0211

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,16 @@ jobs:
158158
env:
159159
ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }}
160160

161+
- name: Pin Maven to 3.9.16
162+
# Maven 3.10+ breaks central-publishing-maven-plugin bundling (upstream bug)
163+
run: |
164+
MAVEN_VERSION=3.9.16
165+
curl -fsSL -o /tmp/maven.tar.gz "https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz"
166+
curl -fsSL -o /tmp/maven.tar.gz.sha512 "https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz.sha512"
167+
echo "$(cat /tmp/maven.tar.gz.sha512) /tmp/maven.tar.gz" | sha512sum -c -
168+
sudo tar -xzf /tmp/maven.tar.gz -C /opt
169+
echo "/opt/apache-maven-${MAVEN_VERSION}/bin" >> $GITHUB_PATH
170+
161171
- name: Update the POM version.
162172
run: mvn -B versions:set -DnewVersion="$RELEASE_VERSION" --file pom.xml -DskipTests
163173

0 commit comments

Comments
 (0)