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

ASF GitHub Bot commented on MNG-7556:
-------------------------------------

michael-o commented on PR #810:
URL: https://github.com/apache/maven/pull/810#issuecomment-1295364458

   > > What about org.apache.maven.cli.MavenCli#populateProperties ? I thought 
this is to stop doing that?
   > 
   > Oh, this is against master, and am looking at 3.9.x.... my point was, will 
this stop injecting Maven user properties into Java System.properties?
   
   This will also be applied to 3.9.x. This PR does *not* change any behavior. 
This just clarifies that Maven CLI accepts user properties, system properties 
cannot be passed via CLI. Please must know that `mvn -Dfoo=bar` are *not* 
system properties.
   
   The promotion is a seperate issue which requires preparation with Maven 
Invoker first. I have discussed this with @slawekjaranowski already.




> Clean up notion between user properties and system properties
> -------------------------------------------------------------
>
>                 Key: MNG-7556
>                 URL: https://issues.apache.org/jira/browse/MNG-7556
>             Project: Maven
>          Issue Type: Task
>            Reporter: Michael Osipov
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 3.9.0-candidate, 4.0.0, 4.0.0-alpha-3
>
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to