git-build-hook icon indicating copy to clipboard operation
git-build-hook copied to clipboard

Better error messages when declaring invalid configuration

Open rudikershaw opened this issue 1 year ago • 0 comments

In the following plugin declaration, the configure goal is used but no configuration is declared. This results in a NullPointerException. This is confusing, and does not provide the API user with any guidance on how to proceed.

<plugin>
    <groupId>com.rudikershaw.gitbuildhook</groupId>
    <artifactId>git-build-hook-maven-plugin</artifactId>
    <version>3.4.1</version>
    <executions>
        <execution>
            <goals>
                <goal>configure</goal>
            </goals>
        </execution>
    </executions>
</plugin>

The plugin should throw a MojoFailureException with a helpful message that instructs the API user to declare appropriate configuration for the goal.

rudikershaw avatar Jun 07 '23 09:06 rudikershaw