Skip to content

[MNG-7133] Allow to inline collection/array items within plugin root configuration #8316

@jira-importer

Description

@jira-importer

Slawomir Jaranowski opened MNG-7133 and commented

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);
    }
}

Affects: 3.6.3

Issue Links:

  • MNGSITE-445 Document "inlined collections" approach for plugin configuration

  • MNG-5033 Allow to inline collection/array items within plugin configuration

Remote Links:

0 votes, 5 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions