HubSpot / prettier-maven-plugin

Apache License 2.0
116 stars 23 forks source link

Is it possible to register git hook automatically? #14

Closed GoldSubmarine closed 4 years ago

GoldSubmarine commented 4 years ago

thanks for your great work

I want a feature like husky, Is it possible?

I alse found another maven plugin provided such a function. git-code-format-maven-plugin

jhaber commented 4 years ago

Sorry for the delayed response. Are you looking to use this plugin with husky, or were you thinking it would reimplement that sort of functionality?

GoldSubmarine commented 4 years ago

I hope it will automatically register git hook for me, now i am using exec-maven-plugin, with the following config

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>${exec-maven-plugin.version}</version>
    <executions>
        <execution>
            <id>config git hooks</id>
            <phase>initialize</phase>
            <goals>
                <goal>exec</goal>
            </goals>
            <configuration>
                <executable>git</executable>
                <commandlineArgs>config core.hooksPath hooks</commandlineArgs>
            </configuration>
        </execution>
    </executions>
</plugin>