Skip to content

offa/maven-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

  1. Git Checkout
  2. Java and Maven setup
  3. Run Maven Goal
  4. PMD analysis (optional)

Recommendation

Instead of using a tag or branch, pinning to a full-length commit is recommended. Dependabot helps to keep GH Actions up to date.

Examples

Minimal example:

# Replace '<commit>' with the commit of the latest release
- uses: offa/maven-action@<commit>
  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@<commit>
        with:
          java-version: ${{ matrix.java }}
          pmd: true

Usage

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

# Replace '<commit>' with the commit of the latest release
- uses: offa/maven-action@<commit>
  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

About

GitHub Action to build Maven projects with different Java JDK versions.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages