Github user slachiewicz commented on a diff in the pull request:

    https://github.com/apache/maven/pull/153#discussion_r167400525
  
    --- Diff: maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java 
---
    @@ -1620,14 +1620,18 @@ static void populateProperties( CommandLine 
commandLine, Properties systemProper
     
             if ( commandLine.hasOption( CLIManager.SET_SYSTEM_PROPERTY ) )
             {
    -            String[] defStrs = commandLine.getOptionValues( 
CLIManager.SET_SYSTEM_PROPERTY );
    -            
    -            if ( defStrs != null )
    +            Properties lineOptionProperties = 
commandLine.getOptionProperties( CLIManager.SET_SYSTEM_PROPERTY );
    +
    +            for ( String defStr : 
lineOptionProperties.stringPropertyNames( ) )
                 {
    -                for ( String defStr : defStrs )
    -                {
    -                    setCliProperty( defStr, userProperties );
    -                }
    +                String optValue = lineOptionProperties.getProperty( defStr 
);
    +                userProperties.setProperty( defStr, optValue );
    +
    +                // 
----------------------------------------------------------------------
    +                // I'm leaving the setting of system properties here as 
not to break
    +                // the SystemPropertyProfileActivator. This won't harm 
embedding. jvz.
    +                // 
----------------------------------------------------------------------
    +               System.setProperty( defStr, optValue );
    --- End diff --
    
    System properties will stay, new commons-cli just simplified setCliProperty.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to