Skip to content

Commit f4c97ee

Browse files
authored
Merge branch 'main' into main
2 parents e0ad9d9 + 8dd40fa commit f4c97ee

File tree

9 files changed

+245
-186
lines changed

9 files changed

+245
-186
lines changed

.github/workflows/lint-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
name: Validate PR title
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: amannn/action-semantic-pull-request@24e6f016c1e110f5353026c0b6129a4118b9146c
21+
- uses: amannn/action-semantic-pull-request@e7d011b07ef37e089bea6539210f6a0d360d8af9
2222
env:
2323
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/merge.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
2525
- name: Set up JDK 17
26-
uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b
26+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165
2727
with:
2828
java-version: '17'
2929
distribution: 'temurin'
@@ -50,7 +50,7 @@ jobs:
5050
run: mvn --batch-mode --update-snapshots verify
5151

5252
- name: Upload coverage to Codecov
53-
uses: codecov/codecov-action@v5.4.3
53+
uses: codecov/codecov-action@v5.5.0
5454
with:
5555
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
5656
flags: unittests # optional

.github/workflows/pullrequest.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ jobs:
2222
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
2323

2424
- name: Set up JDK 11
25-
uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b
25+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165
2626
with:
2727
java-version: ${{ matrix.build.java }}
2828
distribution: 'temurin'
2929
cache: maven
3030

3131
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@6dee5bc9c165ca206a70f4e3d18271971cf6ff26
32+
uses: github/codeql-action/init@02ab253bd299d261d00cdf8a9bca38fea2697d50
3333
with:
3434
languages: java
3535

@@ -46,7 +46,7 @@ jobs:
4646

4747
- if: matrix.build.java == '17'
4848
name: Upload coverage to Codecov
49-
uses: codecov/codecov-action@v5.4.3
49+
uses: codecov/codecov-action@v5.5.0
5050
with:
5151
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
5252
flags: unittests # optional
@@ -55,4 +55,4 @@ jobs:
5555
verbose: true # optional (default = false)
5656

5757
- name: Perform CodeQL Analysis
58-
uses: github/codeql-action/analyze@6dee5bc9c165ca206a70f4e3d18271971cf6ff26
58+
uses: github/codeql-action/analyze@02ab253bd299d261d00cdf8a9bca38fea2697d50

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
4141

4242
- name: Set up JDK 17
43-
uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b
43+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165
4444
with:
4545
java-version: '17'
4646
distribution: 'temurin'

.github/workflows/static-code-scanning.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@6dee5bc9c165ca206a70f4e3d18271971cf6ff26
36+
uses: github/codeql-action/init@02ab253bd299d261d00cdf8a9bca38fea2697d50
3737
with:
3838
languages: java
3939

4040
- name: Autobuild
41-
uses: github/codeql-action/autobuild@6dee5bc9c165ca206a70f4e3d18271971cf6ff26
41+
uses: github/codeql-action/autobuild@02ab253bd299d261d00cdf8a9bca38fea2697d50
4242

4343
- name: Perform CodeQL Analysis
44-
uses: github/codeql-action/analyze@6dee5bc9c165ca206a70f4e3d18271971cf6ff26
44+
uses: github/codeql-action/analyze@02ab253bd299d261d00cdf8a9bca38fea2697d50
Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,2 @@
1-
# Licensed to the Apache Software Foundation (ASF) under one
2-
# or more contributor license agreements. See the NOTICE file
3-
# distributed with this work for additional information
4-
# regarding copyright ownership. The ASF licenses this file
5-
# to you under the Apache License, Version 2.0 (the
6-
# "License"); you may not use this file except in compliance
7-
# with the License. You may obtain a copy of the License at
8-
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
11-
# Unless required by applicable law or agreed to in writing,
12-
# software distributed under the License is distributed on an
13-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14-
# KIND, either express or implied. See the License for the
15-
# specific language governing permissions and limitations
16-
# under the License.
17-
wrapperVersion=3.3.2
181
distributionType=only-script
192
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip

mvnw

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# ----------------------------------------------------------------------------
2020

2121
# ----------------------------------------------------------------------------
22-
# Apache Maven Wrapper startup batch script, version 3.3.2
22+
# Apache Maven Wrapper startup batch script, version 3.3.3
2323
#
2424
# Optional ENV vars
2525
# -----------------
@@ -105,14 +105,17 @@ trim() {
105105
printf "%s" "${1}" | tr -d '[:space:]'
106106
}
107107

108+
scriptDir="$(dirname "$0")"
109+
scriptName="$(basename "$0")"
110+
108111
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
109112
while IFS="=" read -r key value; do
110113
case "${key-}" in
111114
distributionUrl) distributionUrl=$(trim "${value-}") ;;
112115
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
113116
esac
114-
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
115-
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
117+
done <"$scriptDir/.mvn/wrapper/maven-wrapper.properties"
118+
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
116119

117120
case "${distributionUrl##*/}" in
118121
maven-mvnd-*bin.*)
@@ -130,7 +133,7 @@ maven-mvnd-*bin.*)
130133
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip"
131134
;;
132135
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;;
133-
*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
136+
*) MVN_CMD="mvn${scriptName#mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
134137
esac
135138

136139
# apply MVNW_REPOURL and calculate MAVEN_HOME
@@ -227,7 +230,7 @@ if [ -n "${distributionSha256Sum-}" ]; then
227230
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
228231
exit 1
229232
elif command -v sha256sum >/dev/null; then
230-
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then
233+
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then
231234
distributionSha256Result=true
232235
fi
233236
elif command -v shasum >/dev/null; then
@@ -252,8 +255,41 @@ if command -v unzip >/dev/null; then
252255
else
253256
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar"
254257
fi
255-
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url"
256-
mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"
258+
259+
# Find the actual extracted directory name (handles snapshots where filename != directory name)
260+
actualDistributionDir=""
261+
262+
# First try the expected directory name (for regular distributions)
263+
if [ -d "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" ]; then
264+
if [ -f "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD" ]; then
265+
actualDistributionDir="$distributionUrlNameMain"
266+
fi
267+
fi
268+
269+
# If not found, search for any directory with the Maven executable (for snapshots)
270+
if [ -z "$actualDistributionDir" ]; then
271+
# enable globbing to iterate over items
272+
set +f
273+
for dir in "$TMP_DOWNLOAD_DIR"/*; do
274+
if [ -d "$dir" ]; then
275+
if [ -f "$dir/bin/$MVN_CMD" ]; then
276+
actualDistributionDir="$(basename "$dir")"
277+
break
278+
fi
279+
fi
280+
done
281+
set -f
282+
fi
283+
284+
if [ -z "$actualDistributionDir" ]; then
285+
verbose "Contents of $TMP_DOWNLOAD_DIR:"
286+
verbose "$(ls -la "$TMP_DOWNLOAD_DIR")"
287+
die "Could not find Maven distribution directory in extracted archive"
288+
fi
289+
290+
verbose "Found extracted Maven distribution directory: $actualDistributionDir"
291+
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url"
292+
mv -- "$TMP_DOWNLOAD_DIR/$actualDistributionDir" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"
257293

258294
clean || :
259295
exec_maven "$@"

0 commit comments

Comments
 (0)