Skip to content

DescribeMojo.lookupPluginDescriptor() error message references null mojo fields #386

Description

@elharo

In src/main/java/org/apache/maven/plugins/help/DescribeMojo.java:333-338:

throw new MojoExecutionException(
"Error retrieving plugin descriptor for:" + LS + LS + "groupId: \x27" + groupId + "\x27" + LS
+ "artifactId: \x27" + artifactId + "\x27" + LS + "version: \x27" + version + "\x27" + LS + LS, e);

When the plugin was specified by prefix (e.g., -Dplugin=help), the mojo fields groupId, artifactId, version are all null. The method parameter PluginInfo pi contains the actual values but the error message ignores them. Output shows groupId: \x27null\x27 etc. — misleading and unhelpful for debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions