Skip to content

Better error messages when declaring invalid configuration #49

@rudikershaw

Description

@rudikershaw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions