[ https://issues.apache.org/jira/browse/MNG-6069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16359447#comment-16359447 ]
ASF GitHub Bot commented on MNG-6069: ------------------------------------- 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. > Migrate to non deprecated parts of Commons CLI > ---------------------------------------------- > > Key: MNG-6069 > URL: https://issues.apache.org/jira/browse/MNG-6069 > Project: Maven > Issue Type: Improvement > Components: Embedding > Affects Versions: 3.3.9, 3.5.0-alpha-1, 3.5.0-beta-1, 3.5.0 > Reporter: Karl Heinz Marbaise > Assignee: Karl Heinz Marbaise > Priority: Minor > Fix For: 3.5.x-candidate > > > At the moment all parts of {{OptionBuilder...}} are marked deprecated in > {{CLIManager}}. They should be migrated to: > {code:java} > Option.builder( HELP ).longOpt( "help" ).desc( "Display help information" > ).build() > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)