Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Incomplete
-
None
-
None
-
None
Description
When defining a mojo, metadata generated by the @goal javadoc annotation associates the mojo with a goal in a 1:1 relationship. For a current project, it would be very helpful if that could be a 1:n relationship whereby a mojo could be called for any goal not otherwise defined – a wildcard goal.
Particular use case is the goal acts as a selector for doing something important but that would otherwise require an additional -D parameter. This is important for cli invocation.
Implementation should scan all goals for a plugin before falling back to a wildcard mojo, if one exists. It would be undefined or illegal to have more than one wildcard mojo.
I doubt I'll get time to work on this, but I'll submit a patch if I do.