JHusky
Modern native Git hooks made easy for java environments
JHusky improves your commits and more
Install
Include it to your project as a plugin
<build>
<plugins>
<plugin>
<groupId>io.github.dathingroupId>
<artifactId>jhuskyartifactId>
<version>1.0.2version>
plugin>
plugins>
build>
Usage
Run install goal once per machine:
mvn jhusky:install -Ddirectory=.husky
Add a hook:
mvn jhusky:add -DhookPath=.husky/pre-commit -Dcommand="mvn clean test"
git add .husky/pre-commit
Make a commit:
git commit -m "Keep calm and commit"
# `mvn clean test` will run
Hooks list
- Check the list with all hooks
Uninstall
If you didn't like it you can just run uninstall goal and remove the plugin
mvn jhusky:uninstall -Ddirectory=.husky
Inspiration
JHusky is a Java version based on Husky for those who don't want/can't use node to setup git hooks in an intuitive and easy way