pre-commit-maven
pre-commit-maven copied to clipboard
maven hooks for pre-commit.
pre-commit-maven
Some out-of-the-box hooks for pre-commit.
See also: https://github.com/pre-commit/pre-commit
Using pre-commit-maven with pre-commit
Add this to your .pre-commit-config.yaml
repos:
- repo: https://github.com/ejba/pre-commit-maven
rev: v0.3.3
hooks:
- id: maven
args: ['clean compile']
- id: maven-spotless-apply
# - id: ...
Hooks available
maven
Runs arbitrary maven commands. args: ['clean compile verify'].
maven-compile
Runs compile build lifecycle.
maven-test
Runs test build lifecycle.
maven-checkstyle
Runs checkstyle:check.
maven-spotless-check
Runs spotless:check.
maven-spotless-apply
Runs spotless:apply.