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

Michael Osipov commented on MNG-7193:
-------------------------------------

No parsing, but supplying. You have {{MAVEN_OPTS}}, {{jvm.config}} (which is a 
horrible name by the way), CLI args, {{MAVEN_ARGS}}, {{maven.config}} (which is 
a horrible name by the way). If you do the order handling of those kind of 
input in the start script you have direct influence which is used first/last 
(override, etc). This gives you fully predictable results. Issues like MNG-5857 
would be solved by this. This is also related to this: 
https://cwiki.apache.org/confluence/display/MAVEN/Commandline+inheritance.

At the end this ticket and the wiki clearly define the order or opts and args 
for a fully reliable build which we don't have at the moment.

> 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
>            Priority: Major
>             Fix For: 4.0.x-candidate
>
>
> 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.3.4#803005)

Reply via email to