Use Maven wrapper with GHA (#4934)

* Use Maven wrapper with GHA

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2025-07-28 16:37:15 +02:00
committed by GitHub
parent 04893a139a
commit 6f7d46caab
5 changed files with 431 additions and 10 deletions
+3 -3
View File
@@ -18,7 +18,7 @@ function mvnp() {
set -o pipefail # exit build with error when pipes fail
local reactor_size=$(find -name "pom.xml" | grep -vE '/src/|/target/' | wc -l)
local padding=$(bc -l <<< "scale=0;2*(l($reactor_size)/l(10)+1)")
local command=(mvn $@)
local command=(./mvnw $@)
exec "${command[@]}" 2>&1 | # execute, redirect stderr to stdout
tee "$BUILD_LOG" | # write output to log
stdbuf -oL grep -aE '^\[INFO\] Building .+ \[.+\]$' | # filter progress
@@ -30,7 +30,7 @@ function build_all() {
echo
echo "Building all projects"
echo
echo "+ mvn $ARGUMENTS"
echo "+ ./mvnw $ARGUMENTS"
echo
mvnp $ARGUMENTS
@@ -47,5 +47,5 @@ function build_all() {
exit $status
}
mvn -v
./mvnw -v
build_all
-7
View File
@@ -19,7 +19,6 @@ jobs:
fail-fast: false
matrix:
java: [ '21' ]
maven: [ '3.9.10' ]
os: [ 'ubuntu-24.04' ]
name: Build (Java ${{ matrix.java }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
@@ -52,12 +51,6 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.java }}
# pinning to SHA to mitigate possible supply chain attacks
- name: Set up Maven ${{ matrix.maven }}
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
with:
maven-version: ${{ matrix.maven }}
- name: Register Problem Matchers
if: ${{ matrix.java == '21' }}
id: problem_matchers