[MNG-6605] Unable to suppress download/upload messages (in interactive mode)

This closes #239
This commit is contained in:
Raymond Auge 2019-03-27 20:47:58 -04:00 committed by Michael Osipov
parent a7acfe75b1
commit 95401cf7a6
2 changed files with 4 additions and 1 deletions

View File

@ -101,6 +101,8 @@ public class CLIManager
public static final String BUILDER = "b"; public static final String BUILDER = "b";
public static final String NO_TRANSFER_PROGRESS = "ntp";
protected Options options; protected Options options;
@SuppressWarnings( { "static-access", "checkstyle:linelength" } ) @SuppressWarnings( { "static-access", "checkstyle:linelength" } )
@ -140,6 +142,7 @@ public class CLIManager
options.addOption( OptionBuilder.withLongOpt( "threads" ).hasArg().withDescription( "Thread count, for instance 2.0C where C is core multiplied" ).create( THREADS ) ); options.addOption( OptionBuilder.withLongOpt( "threads" ).hasArg().withDescription( "Thread count, for instance 2.0C where C is core multiplied" ).create( THREADS ) );
options.addOption( OptionBuilder.withLongOpt( "legacy-local-repository" ).withDescription( "Use Maven 2 Legacy Local Repository behaviour, ie no use of _remote.repositories. Can also be activated by using -Dmaven.legacyLocalRepo=true" ).create( LEGACY_LOCAL_REPOSITORY ) ); options.addOption( OptionBuilder.withLongOpt( "legacy-local-repository" ).withDescription( "Use Maven 2 Legacy Local Repository behaviour, ie no use of _remote.repositories. Can also be activated by using -Dmaven.legacyLocalRepo=true" ).create( LEGACY_LOCAL_REPOSITORY ) );
options.addOption( OptionBuilder.withLongOpt( "builder" ).hasArg().withDescription( "The id of the build strategy to use" ).create( BUILDER ) ); options.addOption( OptionBuilder.withLongOpt( "builder" ).hasArg().withDescription( "The id of the build strategy to use" ).create( BUILDER ) );
options.addOption( OptionBuilder.withLongOpt( "no-transfer-progress" ).withDescription( "Do not display transfer progress when downloading or uploading" ).create( NO_TRANSFER_PROGRESS ) );
// Adding this back in for compatibility with the verifier that hard codes this option. // Adding this back in for compatibility with the verifier that hard codes this option.
options.addOption( OptionBuilder.withLongOpt( "no-plugin-registry" ).withDescription( "Ineffective, only kept for backward compatibility" ).create( "npr" ) ); options.addOption( OptionBuilder.withLongOpt( "no-plugin-registry" ).withDescription( "Ineffective, only kept for backward compatibility" ).create( "npr" ) );

View File

@ -1426,7 +1426,7 @@ public class MavenCli
TransferListener transferListener; TransferListener transferListener;
if ( quiet ) if ( quiet || cliRequest.commandLine.hasOption( CLIManager.NO_TRANSFER_PROGRESS ) )
{ {
transferListener = new QuietMavenTransferListener(); transferListener = new QuietMavenTransferListener();
} }