diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 701322e9..95cfe12e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,6 +59,17 @@ jobs: maven-build: ########################################################### runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental }} + strategy: + fail-fast: false + matrix: + include: + - maven_version: mwnw # as defined in .mvn/wrapper/maven-wrapper.properties + may_create_release: ${{ github.ref_name == 'main' }} + experimental: false + - maven_version: 3.6.3 # oldest supported Maven version + may_create_release: false + experimental: false # https://docs.github.com/en/actions/using-jobs/using-concurrency @@ -108,7 +119,7 @@ jobs: with: path: | ~/.m2/wrapper - key: ${{ runner.os }}-${{ runner.arch }}-mvn-binary-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} + key: ${{ runner.os }}-${{ runner.arch }}-mvn-binary-${{ matrix.maven_version }}-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }} - name: "Cache: Restore" @@ -135,9 +146,15 @@ jobs: mv -v ~/.m2/repository $RESTORED_REPO_PATH echo "RESTORED_REPO_PATH=$RESTORED_REPO_PATH" >> $GITHUB_ENV + - name: Set Maven version [${{ matrix.maven_version }}] + run: | + if [[ "${{ matrix.maven_version }}" != "mvnw" ]]; then + chmod u+x mvnw + ./mvnw -ntp wrapper:wrapper -Dmaven=${{ matrix.maven_version }} + fi - name: "Test with Maven 🔨" - if: ${{ github.ref_name != 'main' || env.ACT }} + if: ${{ !matrix.may_create_release || env.ACT }} env: GITHUB_USER: ${{ github.actor }} GITHUB_API_KEY: ${{ github.token }} @@ -147,7 +164,7 @@ jobs: - name: "Build with Maven 🔨" - if: ${{ github.ref_name == 'main' && !env.ACT }} + if: ${{ matrix.may_create_release && !env.ACT }} env: DEPLOY_SNAPSHOTS_TO_GITHUB_BRANCH: true GITHUB_USER: ${{ github.actor }} diff --git a/pom.xml b/pom.xml index 38cda981..832f8c1c 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ SPDX-ArtifactOfProjectHomePage: https://github.com/vegardit/vegardit-maven-parent check for new dependency/plugin updates using: - mvn -U versions:display-dependency-updates versions:display-plugin-updates + mvn -U -ntp versions:display-dependency-updates versions:display-plugin-updates plugin announcements: https://blogs.apache.org/maven/ -->