You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl Heinz Marbaise (JIRA)" <ji...@apache.org> on 2016/08/06 17:26:20 UTC

[jira] [Comment Edited] (MNG-6077) Options given in maven.config can not be overridden via command line

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

Karl Heinz Marbaise edited comment on MNG-6077 at 8/6/16 5:25 PM:
------------------------------------------------------------------

Currently overwriting the options via command line does not work cause the CLI parser (commons cli) only checks if there is an option in the command line which is the first one which is found. There seemed to be no possibility to say to find always the last one. For example:
This simple command line:
{code}
-X 1 -a -X 2
{code}
If you check with commons cli you will see only the argument {{1}} of the option {{-X}} and not the second {{2}} of the second {{-X}} option.



was (Author: khmarbaise):
Currently overridden the options via command line does not work cause the CLI parser (commons cli) only checks if there is an option in the command line which is the first one which is found. There seemed to be no possibility to say to find always the last one. For example:
This simple command line:
{code}
-X 1 -a -X 2
{code}
If you check with commons cli you will see only the argument {{1}} of the option {{-X}} and not the second {{2}} of the second {{-X}} option.


> Options given in maven.config can not be overridden via command line
> --------------------------------------------------------------------
>
>                 Key: MNG-6077
>                 URL: https://issues.apache.org/jira/browse/MNG-6077
>             Project: Maven
>          Issue Type: Improvement
>          Components: Command Line
>    Affects Versions: 3.3.9
>            Reporter: Karl Heinz Marbaise
>            Priority: Minor
>
> If you use the {{.mvn/maven.config}} and define for example {{-T 3}} in it you will always use it if you run Maven. There is no possibility to change this except to change the {{.mvn/maven.config}} file. The expected behaviour would be simply to define options on command line like:
> {code}
> mvn -T 1 clean package
> {code}
> and those options from command line should have precedence over them in the {{.mvn/maven.config}} file.
> With the change in MNG-6076 you can overwrite properties from command lie. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)