Skip to content

Commit 5742f6a

Browse files
wbornkaikreuzer
authored andcommitted
Use Maven wrapper with GHA
Signed-off-by: Wouter Born <github@maindrain.net>
1 parent 455017c commit 5742f6a

5 files changed

Lines changed: 430 additions & 9 deletions

File tree

.github/scripts/maven-build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function mvnp() {
1818
set -o pipefail # exit build with error when pipes fail
1919
local reactor_size=$(find -name "pom.xml" | grep -vE '/src/|/target/' | wc -l)
2020
local padding=$(bc -l <<< "scale=0;2*(l($reactor_size)/l(10)+1)")
21-
local command=(mvn $@)
21+
local command=(./mvnw $@)
2222
exec "${command[@]}" 2>&1 | # execute, redirect stderr to stdout
2323
tee "$BUILD_LOG" | # write output to log
2424
stdbuf -oL grep -aE '^\[INFO\] Building .+ \[.+\]$' | # filter progress
@@ -30,7 +30,7 @@ function build_all() {
3030
echo
3131
echo "Building all projects"
3232
echo
33-
echo "+ mvn $ARGUMENTS"
33+
echo "+ ./mvnw $ARGUMENTS"
3434
echo
3535

3636
mvnp $ARGUMENTS
@@ -47,5 +47,5 @@ function build_all() {
4747
exit $status
4848
}
4949

50-
mvn -v
50+
./mvnw -v
5151
build_all

.github/workflows/ci-build.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
java: [ '11' ]
22-
maven: [ '3.9.9' ]
2322
os: [ 'ubuntu-24.04' ]
2423
name: Build (Java ${{ matrix.java }}, ${{ matrix.os }})
2524
runs-on: ${{ matrix.os }}
@@ -50,11 +49,6 @@ jobs:
5049
distribution: 'temurin'
5150
java-version: ${{ matrix.java }}
5251

53-
- name: Set up Maven ${{ matrix.maven }}
54-
uses: stCarolas/setup-maven@v5
55-
with:
56-
maven-version: ${{ matrix.maven }}
57-
5852
- name: Build
5953
id: build
6054
run: './.github/scripts/maven-build'
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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
18+
distributionType=only-script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.10/apache-maven-3.9.10-bin.zip

mvnw

Lines changed: 259 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)