You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/12/08 00:00:00 UTC
[jira] [Commented] (MNG-7133) Allow to inline collection/array items within plugin root configuration
[ https://issues.apache.org/jira/browse/MNG-7133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17644554#comment-17644554 ]
ASF GitHub Bot commented on MNG-7133:
-------------------------------------
slawekjaranowski closed pull request #464: [MNG-7133] Allow to inline collection/array items within plugin root configuration
URL: https://github.com/apache/maven/pull/464
> Allow to inline collection/array items within plugin root configuration
> -----------------------------------------------------------------------
>
> Key: MNG-7133
> URL: https://issues.apache.org/jira/browse/MNG-7133
> Project: Maven
> Issue Type: Improvement
> Components: Plugins and Lifecycle
> Affects Versions: 3.6.3
> Reporter: Slawomir Jaranowski
> Priority: Major
>
> Currently we can have plugin configurations like:
> {code:xml}
> <configuration>
> <listParam>
> <listParam>Foo*</listParam>
> <listParam>Bar*</listParam>
> </listParam>
> <configuration>
> {code}
> But when we have plugin configuration like:
> {code:xml}
> <configuration>
> <listParam>Foo*</listParam>
> <listParam>Bar*</listParam>
> <configuration>
> {code}
> and add method {{addListParam}} to Plugin mojo class this is not working.
> {{addListParam}} method on plugin level is *called only once*
> Plugin code:
> {code:java}
> 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);
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)