Michael Osipov opened MNG-7556 and commented
For a very long time we have documented that the user can set system properties via mvn -Dfoo=bar, but actually those are user properties which are promoted to system properties and it some cases system properties cannot be modified after the JVM has been started. To properly set system properties there are basically two ways:
- use
MAVEN_OPTS environment variable
- use
.mvn/jvm.config file
A third option in the future we could introduce, like other Java tools, a -J-Dfoo=bar option with the restriction of the the paragraph above.
Issue Links:
-
MNG-7887 cannot inject ci-friendly revision/sha1/changelist properties via MAVEN_OPTS
("causes")
-
MNG-7782 System properties are no longer overridden with user properties with the same name
-
MSHARED-1132 Improved handling of system and user properties
Remote Links:
Backported to: 4.0.0-alpha-3, 3.9.0
Michael Osipov opened MNG-7556 and commented
For a very long time we have documented that the user can set system properties via
mvn -Dfoo=bar, but actually those are user properties which are promoted to system properties and it some cases system properties cannot be modified after the JVM has been started. To properly set system properties there are basically two ways:MAVEN_OPTSenvironment variable.mvn/jvm.configfileA third option in the future we could introduce, like other Java tools, a
-J-Dfoo=baroption with the restriction of the the paragraph above.Issue Links:
MNG-7887 cannot inject ci-friendly revision/sha1/changelist properties via MAVEN_OPTS
("causes")
MNG-7782 System properties are no longer overridden with user properties with the same name
MSHARED-1132 Improved handling of system and user properties
Remote Links:
Backported to: 4.0.0-alpha-3, 3.9.0