MartinKanters commented on a change in pull request #351:
URL: https://github.com/apache/maven/pull/351#discussion_r491362566
##########
File path: maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
##########
@@ -1331,103 +1335,172 @@ 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 )
+ handleDeprecatedOptions( commandLine );
+
+ disableOnPresentOption( commandLine, CLIManager.BATCH_MODE,
request::setInteractiveMode );
+ enableOnPresentOption( commandLine,
CLIManager.SUPRESS_SNAPSHOT_UPDATES, request::setNoSnapshotUpdates );
Review comment:
The old functionality sets the `noSnapshotUpdates` to false (or true if
the option is there).
Because we do not set it now, it would become implicitly false (because it's
a primitive boolean). Did you consider setting the default value explicitly?
----------------------------------------------------------------
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]