Skip to content

Update version in Maven usage snippet #2699

Update version in Maven usage snippet

Update version in Maven usage snippet #2699

Workflow file for this run

name: Maven CI
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions: { }
jobs:
test:
name: Test
strategy:
matrix:
java-version: [ 17, 21, 25 ]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout Repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # tag=v6.0.1
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # tag=v5.1.0
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
cache: maven
- name: Test
run: mvn -B --no-transfer-progress clean verify
# Publishing coverage to Codacy is only possible for builds of push events.
# PRs from forks do not get access to repository secrets.
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
- name: Publish test coverage
if: ${{ github.event_name != 'pull_request' && github.repository_owner == 'CycloneDX' && matrix.java-version == '25' }}
uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # tag=v1.3.0
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
language: Java
coverage-reports: target/site/jacoco/jacoco.xml
- name: Upload PR test coverage report
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # tag=v6.0.0
with:
name: pr-test-coverage-report-java-${{ matrix.java-version }}
path: target/site/jacoco/jacoco.xml