
io.github.pepperkit.githooks.PrintHooksMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of git-hooks-maven-plugin Show documentation
Show all versions of git-hooks-maven-plugin Show documentation
Maven plugin, which enables control on git hooks via easy configuration.
The newest version!
/*
* Copyright (C) 2021 PepperKit
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
package io.github.pepperkit.githooks;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
/**
* Prints all or specific hooks installed at the moment, to make sure that the plugin was configured correctly.
*/
@Mojo(name = "printHooks")
public class PrintHooksMojo extends AbstractMojo {
/**
* The name of the hook to be validated. If not provided, all the hooks will be validated.
*/
@Parameter(property = "hookName")
public String hookName;
GitHooksManager gitHooksManager = new GitHooksManager(this);
@Override
public void execute() throws MojoExecutionException {
GitHooksActionProcessor.processHooks(gitHooksManager::printHook, hookName, getLog());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy