diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index ac9db51..52b9712 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -20,13 +20,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 + - uses: actions/checkout@v3 with: - java-version: '17' - distribution: 'temurin' - cache: maven + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: 21 + distribution: 'adopt' # Alternative distribution options are available. - name: Cache SonarCloud packages uses: actions/cache@v4 @@ -43,7 +45,7 @@ jobs: restore-keys: ${{ runner.os }}-m2 - name: Build and analyze - uses: coactions/setup-xvfb@v1.0.1 + uses: coactions/setup-xvfb@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}