git-build-hook
git-build-hook copied to clipboard
Better error messages when declaring invalid configuration
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.