You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2021/12/23 11:22:00 UTC

[jira] [Closed] (MNG-7193) Introduce MAVEN_ARGS environment variable

     [ https://issues.apache.org/jira/browse/MNG-7193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov closed MNG-7193.
-------------------------------
    Fix Version/s: 4.0.0
                   4.0.0-alpha-1
                       (was: 4.0.x-candidate)
       Resolution: Fixed

Fixed with [6257b3314282f795ded9366a52eae627a4206395|https://gitbox.apache.org/repos/asf?p=maven.git&a=commit&h=6257b3314282f795ded9366a52eae627a4206395].

> Introduce MAVEN_ARGS environment variable
> -----------------------------------------
>
>                 Key: MNG-7193
>                 URL: https://issues.apache.org/jira/browse/MNG-7193
>             Project: Maven
>          Issue Type: New Feature
>          Components: Command Line
>    Affects Versions: 3.8.1
>            Reporter: Michael Osipov
>            Assignee: Michael Osipov
>            Priority: Major
>              Labels: must-be-in-4.0.0-alpha-1
>             Fix For: 4.0.0, 4.0.0-alpha-1
>
>
> Over the last couple of years people demanded to always pass arguments down to Maven without supplying it specifically or repeat for every project over and over again in {{maven.config}}. Arguments like {{-B}} or {{-V}}.
> A new environment variable {{MAVEN_ARGS}} can be passed *before* the actual CLI arguments.
> Ideal precedence:
> {{MAVEN_ARGS}} is overwritten by {{maven.config}} is overwritten by CLI arguments. General to specific. Unfortunately, since {{MAVEN_ARGS}} will be passed just like CLI arguments there is no way to detect that these arguments came either via CLI or {{MAVEN_ARGS}}
> One option would be to add separator token which would be dropped internally thus makes it possible to differentiate between both, e.g,, {{MAVEN_ARGS_START [ARGS...] MAVEN_ARGS_STOP}}. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)