Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 1.37 KB

README.md

File metadata and controls

62 lines (46 loc) · 1.37 KB

maven-action

ci GitHub release License

GitHub Action for Maven based projects.

It checks out the repository, sets up Java, runs Maven and optional analysis.

Example

Minimal example:

- uses: offa/maven-action@main
  with:
    java-version: '21'

Builds JDK 17 and 21 and executes a PMD analysis:

# […]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [ 17, 21 ]
    name: jdk-${{ matrix.java }}
    steps:
      - name: Build
        uses: offa/maven-action@main
        with:
          java-version: ${{ matrix.java }}
          pmd: true

Usage

java-version is required, all other settings are optional with defaults

- uses: offa/maven-action@main
  with:
    # Java version to use (required) - whole or semver Java version
    java-version: # Required

    # Path to pom.xml file or directory containing one
    pom: 'pom.xml'

    # Maven goal to execute
    goal: 'verify'

    # Execute PMD goal (runs after 'goal')
    pmd: false

    # Skips JavaDoc generation
    skip-javadoc: true