apache / apache/maven-help-plugin

DescribeMojo.lookupPluginDescriptor() error message references null mojo fields

Open Beginner friendly
#386 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
29
Forks
42
Avg merge
1d 12h
Merged PRs (30d)
6

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/main/java/org/apache/maven/plugins/help/DescribeMojo.java:333-338 and trace the PluginInfo parameter used by lookupPluginDescriptor(). Reproduce the prefix form with -Dplugin=help, then verify the error output reports the actual plugin coordinates rather than null mojo fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.