From 6d43f2a65edb536ff896fe487027b71c79243c8d Mon Sep 17 00:00:00 2001 From: Tobias Schneider Date: Mon, 2 Dec 2024 11:49:41 +0100 Subject: [PATCH] Update maven wrapper to version 4.0.0-rc-1 that needs jdk 17 closes #4 0 --- .github/workflows/benchmark.yml | 2 +- .github/workflows/build.yml | 9 +++++---- .github/workflows/release-trigger.yml | 10 ++++++++-- .github/workflows/release.yml | 9 +++++++-- .mvn/wrapper/maven-wrapper.properties | 2 +- .tool-versions | 2 +- 6 files changed, 23 insertions(+), 11 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e642119d0..7593bb5a2 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -23,7 +23,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '11' + java-version: '17' cache: 'maven' - name: Build run: ./mvnw clean verify -Dtests.groups=BenchmarkTest diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 804443105..fe24ad3a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,8 @@ jobs: name: build and analyse strategy: matrix: - java: [ '11', '17', '21', '22', '23' ] + java-compile: [ '11', '17', '21', '22', '23' ] + java-runtime: [ '17', '17', '21', '22', '23' ] os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] runs-on: ${{ matrix.os }} steps: @@ -25,14 +26,14 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up JDK ${{ matrix.java }} + - name: Set up JDK ${{ matrix.java-runtime }} uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: ${{ matrix.java }} + java-version: ${{ matrix.java-runtime }} cache: 'maven' - name: Build - run: ./mvnw -Pcoverage clean verify + run: ./mvnw -Pcoverage clean verify -Djava.version=${{ matrix.java-runtime }} - name: Analyse with SonarCloud if: ${{ github.repository == 'focus-shift/jollyday' && matrix.java == 21 && matrix.os == 'ubuntu-latest' && (github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')) }} run: > diff --git a/.github/workflows/release-trigger.yml b/.github/workflows/release-trigger.yml index 1e082b34d..69a6e4281 100644 --- a/.github/workflows/release-trigger.yml +++ b/.github/workflows/release-trigger.yml @@ -26,20 +26,24 @@ jobs: - uses: actions/checkout@v4 with: persist-credentials: false - - name: Set up JDK 11 + + - name: Set up JDK 17 as runtime uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 11 + java-version: 17 cache: 'maven' + - name: Build run: ./mvnw clean verify + - name: Create Release Notes uses: docker://decathlon/release-notes-generator-action:3.1.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} OUTPUT_FOLDER: .chglog/ FILENAME: ${{ github.event.inputs.releaseVersion }} + - name: Setup git user uses: fregante/setup-git-user@v2 - name: Commit Release Notes @@ -51,6 +55,7 @@ jobs: with: github_token: ${{ secrets.AM_PAT }} branch: ${{ github.ref }} + - name: Set release version run: ./mvnw versions:set -DnewVersion=${{ github.event.inputs.releaseVersion }} - name: Commit release version @@ -62,6 +67,7 @@ jobs: with: github_token: ${{ secrets.AM_PAT }} branch: ${{ github.ref }} + - name: Set new snapshot version run: ./mvnw versions:set -DnewVersion=${{ github.event.inputs.nextVersion }} - name: Commit new snapshot version diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f92dcdcae..bb613ba66 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,28 +13,33 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up JDK 11 + + - name: Set up JDK 17 uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 11 + java-version: 17 cache: 'maven' server-id: 'ossrh' server-username: OSSRH_USERNAME server-password: OSSRH_PASSWORD gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} gpg-passphrase: GPG_PASSPHRASE + - name: Tests with Maven run: ./mvnw clean verify + - name: Build with Maven run: ./mvnw -Prelease -Drelease deploy env: OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + - name: Extract release tag id: vars run: echo "version=${GITHUB_REF#refs/*/v}" >> $GITHUB_OUTPUT + - name: Create Release uses: softprops/action-gh-release@v2 env: diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index d58dfb70b..38bc9cfca 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -16,4 +16,4 @@ # under the License. wrapperVersion=3.3.2 distributionType=only-script -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/4.0.0-rc-1/apache-maven-4.0.0-rc-1-bin.zip diff --git a/.tool-versions b/.tool-versions index 9387c3f17..a02b0e173 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -java temurin-11.0.23+9 +java temurin-17.0.13+11