Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5130

Allow mojo to bind to wildcard goal

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • None
    • None
    • Plugin API
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            topping Brian Topping
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: