rfscholte commented on a change in pull request #351:
URL: https://github.com/apache/maven/pull/351#discussion_r429634094



##########
File path: maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
##########
@@ -1318,103 +1322,165 @@ private MavenExecutionRequest populateRequest( 
CliRequest cliRequest )
         return populateRequest( cliRequest, cliRequest.request );
     }
 
-    @SuppressWarnings( "checkstyle:methodlength" )
     private MavenExecutionRequest populateRequest( CliRequest cliRequest, 
MavenExecutionRequest request )
     {
+        slf4jLoggerFactory = LoggerFactory.getILoggerFactory();
         CommandLine commandLine = cliRequest.commandLine;
         String workingDirectory = cliRequest.workingDirectory;
         boolean quiet = cliRequest.quiet;
-        boolean showErrors = cliRequest.showErrors;
+        request.setShowErrors( cliRequest.showErrors ); // default: false
+        File baseDirectory = new File( workingDirectory, "" 
).getAbsoluteFile();
 
-        String[] deprecatedOptions = { "up", "npu", "cpu", "npr" };
-        for ( String deprecatedOption : deprecatedOptions )
-        {
-            if ( commandLine.hasOption( deprecatedOption ) )
-            {
-                slf4jLogger.warn( "Command line option -{} is deprecated and 
will be removed in future Maven versions.",
-                        deprecatedOption );
-            }
-        }
+        warnAboutDeprecatedOptionsUsed( commandLine );

Review comment:
       IMO the name is too long and too explicit. `handleDeprecatedOptions` 
should be sufficient and leaves enough room for changes, like breaking the 
build.




----------------------------------------------------------------
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:
[email protected]


Reply via email to