Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.8.1
-
None
Description
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.
Attachments
Issue Links
- is depended upon by
-
MNG-5857 Arguments from command line should override those in .mvn/maven.config
- Closed
-
MNG-6241 colour output cannot be disabled from settings.xml or MAVEN_OPTS
- Closed
- is duplicated by
-
MNG-7523 Back port MAVEN_ARGS to Apache Maven 3.9.0
- Closed
- is related to
-
MWRAPPER-45 Migrate/Sync startup scripts with Maven 4
- Open
- supercedes
-
MNG-6241 colour output cannot be disabled from settings.xml or MAVEN_OPTS
- Closed
-
MNG-7031 Unable to use -Dstyle.color with MAVEN_OPTS & JAVA_TOOL_OPTIONS
- Closed
-
MNG-7153 Maven cmd does errors out when "MAVEN_OPTS=-V"
- Closed
- links to