Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error messages when declaring invalid configuration #49

Open
rudikershaw opened this issue Jun 7, 2023 · 0 comments
Open

Better error messages when declaring invalid configuration #49

rudikershaw opened this issue Jun 7, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@rudikershaw
Copy link
Owner

rudikershaw commented Jun 7, 2023

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 rudikershaw added enhancement New feature or request good first issue Good for newcomers labels Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant