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

Obey generics in plugin collection parameters when populating them

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.3
    • Component/s: Plugins and Lifecycle
    • Labels:
      None

      Description

      Right now, when determining the target type for a collection item to convert POM configuration to, Maven/Plexus uses some heuristics based on the XML element name and the mojo package name and eventually falls back to String. The current approach requires plugin authors to either put their parameter bean classes into the same package as the mojo or requires users to explicitly use the implementation attribute in the POM. These troubles can be avoided if Maven would recognize the generic type of a parameter declaration List<Bean>, thereby aligning collections with arrays regarding the ease of configuration/use.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bentmann Benjamin Bentmann
                Reporter:
                bentmann Benjamin Bentmann
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: