mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
Use Maven wrapper with GHA (#4934)
* Use Maven wrapper with GHA Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user