[ 
https://issues.apache.org/jira/browse/MNG-8542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17921370#comment-17921370
 ] 

Christoph Läubrich commented on MNG-8542:
-----------------------------------------

I now debugged it again and it seems that -DmyPropert="a, b, c" results in a 
list:
{code:java}
 ["a", " b", " c"]{code}
so it is not trimmed here and i falsely assumed it didn't worked at all but in 
fact only the values where not recognized by my mojo due to the trailing white 
space!

> Supporting List<String> for parameters given on commandline
> -----------------------------------------------------------
>
>                 Key: MNG-8542
>                 URL: https://issues.apache.org/jira/browse/MNG-8542
>             Project: Maven
>          Issue Type: Improvement
>            Reporter: Christoph Läubrich
>            Priority: Major
>
> for CLI invocation it is currently not possible to pass parameters as 
> property that are lists.
> This often leads to mojos that need to define (and handle) two types of 
> parameter one for a CLI invocation and one for more structured use in pom.xml
>  
> It would be good to have an exception for the rule that one can't pass 
> collections as properties for List<String>/Collection<String>/... by assume 
> that these are a comma separated list if given as a property.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to