[ https://issues.apache.org/jira/browse/MNG-5857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17652053#comment-17652053 ]
ASF GitHub Bot commented on MNG-5857: ------------------------------------- michael-o commented on PR #936: URL: https://github.com/apache/maven/pull/936#issuecomment-1365400128 This does not work due to: ``` /* Although this looks wrong in terms of order Commons CLI stores the value of options in * an array and when a value is potentionally overriden it is added to the array. The single * arg option value is retrieved and instead of returning values[values.length-1] it returns * values[0] which means that the original value instead of the overridden one is returned * (first wins). With properties values are truely overriden since at the end a map is used * to merge which means last wins. * * TODO Report this behavioral bug with Commons CLI */ ``` > Arguments from command line should override those in .mvn/maven.config > ---------------------------------------------------------------------- > > Key: MNG-5857 > URL: https://issues.apache.org/jira/browse/MNG-5857 > Project: Maven > Issue Type: Bug > Reporter: Dave Syer > Assignee: Michael Osipov > Priority: Major > Fix For: waiting-for-feedback > > > Because of the way the command line args are added at the *start* of the list > here: > [MavenCli#410|https://gitbox.apache.org/repos/asf?p=maven.git;a=blob;f=maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java;h=4d142ee4c9a7f4f1c6311fcc87aacb59ba14fc23;hb=HEAD#l410], > they get overwritten by the settings in .mvn/maven.config. I would have > thought this should be the other way round. -- This message was sent by Atlassian Jira (v8.20.10#820010)