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

Allow to inline collection/array items within plugin root configuration

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.6.3
    • None
    • Plugins and Lifecycle
    • None

    Description

      Currently we can have plugin configurations like:

      <configuration>
        <listParam>
          <listParam>Foo*</listParam>
          <listParam>Bar*</listParam>
        </listParam>
      <configuration>
      

      But when we have plugin configuration like:

      <configuration>
        <listParam>Foo*</listParam>
        <listParam>Bar*</listParam>
      <configuration>
      

      and add method addListParam to Plugin mojo class this is not working.

      addListParam method on plugin level is called only once

      Plugin code:

      public class MyMojo extends AbstractMojo {
          
          @Parameter
          private List<String> listParam;
      
          /**
          * special method called when inline collection in configuration is used.
          */
          public void addListParam(String value) {
              listParam.add(value);
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sjaranowski Slawomir Jaranowski
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: