lfreleng-actions/☕️ Build Maven Project
Setup Maven and build the Java project
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 8, 2026
- License
- None
Pinned Snippet
uses: lfreleng-actions/maven-build-action@c2ded37cb11ff1c2bb1eb7df7011906ddf97bd58 # v0.2.2tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| global-settings | Maven global settings file | no | — |
| path_prefix | Directory location containing project code | no | . |
| java-version | OpenJDK version | no | 21 |
| setup-java | Enable or disable Java setup | no | true |
| distribution | OpenJDK distribution | no | temurin |
| mvn-version | Maven version | no | 3.9.11 |
| mvn-params | Maven parameters to pass to the mvn command | no | — |
| mvn-phases | Comma separated list of phases to execute | no | clean deploy |
| mvn-opts | Maven options | no | -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r |
| mvn-pom-file | Path to pom.xml file | no | pom.xml |
| mvn-profiles | Comma-delimited list of profiles to activate | no | — |
| env-vars | Pass GitHub variables to be exported as environment variables via `toJSON(vars)` or specific variables encoded in JSON format | no | {} |
| env-secrets | Pass GitHub secrets to be exported as environment variables via `toJSON(secrets)` or specific secrets encoded in JSON format | no | {} |
| run-jacoco | Boolean defining whether JaCoCo should be run | no | true |
| artifact-upload | Upload the JaCoCo badges directory as a build artifact | no | true |
| artifact-name | Uploaded artifact name (default: maven-build-<job>) | no | "" |
Outputs
| name | description |
|---|---|
| m2repo_path | Absolute path to the Maven file deployment repository (m2repo) produced by the build, for downstream publish/stage actions |
| m2repo_exists | Whether the build produced the m2repo (true/false) |
| artifact_count | Number of jar/pom/war files found in the m2repo |
| coverage | JaCoCo line coverage % (empty when JaCoCo skipped) |
| branch_coverage | JaCoCo branch coverage percentage (empty when JaCoCo did not run) |
| artifact_name | Name of the uploaded JaCoCo badges artifact (empty when artifact upload is disabled) |