phillipuniverse / githook-maven-plugin

Maven plugin to install local git hooks
MIT License
28 stars 1 forks source link

Error in pom.xml #14

Open krishnapollu opened 4 years ago

krishnapollu commented 4 years ago

@phillipuniverse Plugin execution not covered by lifecycle configuration: io.github.phillipuniverse:githook-maven-plugin:1.0.5:install (execution: default, phase: initialize) on adding the below plugin

        <plugin>
            <groupId>io.github.phillipuniverse</groupId>
            <artifactId>githook-maven-plugin</artifactId>
            <version>1.0.5</version>
            <executions>
                <execution>
                    <goals>
                        <goal>install</goal>
                    </goals>
                    <configuration>
                        <hooks>
                            <pre-commit>
                                echo running validation build
                                exec mvn clean install
                            </pre-commit>
                        </hooks>
                    </configuration>
                </execution>
            </executions>
        </plugin>
krishnapollu commented 4 years ago

Worked after adding below lines `pre-commit-hook

install`
phillipuniverse commented 4 years ago

@krishnapollu what version of Maven were you on (mvn -v)? I want to look into this a bit more and potentially update the readme.

Also, generally speaking I would not recommend binding to install as you have less guarantees for the commit hook to run. For instance, if someone runs mvn package then the commit hook would not be executed.

ceheckel commented 3 years ago

I don't have mvn installed globally on my machine, but from Eclipse -> Window -> Preferences -> Maven -> Installation I see 3.6.1 / 1.13.0.20190716-1623 (EMBEDDED)