michael-o commented on a change in pull request #429: URL: https://github.com/apache/maven/pull/429#discussion_r567249412
########## File path: maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java ########## @@ -1507,41 +1506,41 @@ else if ( projectAction.startsWith( "+" ) ) } // Visible for testing - static ProfileActivation determineProfileActivation( final CommandLine commandLine ) + static void performProfileActivation( final CommandLine commandLine, + final ProfileActivation profileActivation ) { - final ProfileActivation result = new ProfileActivation(); - if ( commandLine.hasOption( CLIManager.ACTIVATE_PROFILES ) ) { - String[] profileOptionValues = commandLine.getOptionValues( CLIManager.ACTIVATE_PROFILES ); - if ( profileOptionValues != null ) + final String[] optionValues = commandLine.getOptionValues( CLIManager.ACTIVATE_PROFILES ); + + if ( optionValues == null ) { - for ( String profileOptionValue : profileOptionValues ) - { - StringTokenizer profileTokens = new StringTokenizer( profileOptionValue, "," ); + return; + } - while ( profileTokens.hasMoreTokens() ) + for ( final String optionValue : optionValues ) + { + for ( String token : optionValue.split( "," ) ) + { + String profileId = token.trim(); + boolean active = true; + if ( profileId.charAt( 0 ) == '-' || profileId.charAt( 0 ) == '!' ) Review comment: Agreed, this would need to reviewed later! ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org