Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNG-5486 hiding transfer logs #28

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ public class CLIManager

public static final String THREADS = "T";

public static final String QUIET_TRANSFER_LOGS = "qtl";

public static final String LEGACY_LOCAL_REPOSITORY = "llr";

public static final String BUILDER = "b";
Expand Down Expand Up @@ -137,6 +139,7 @@ public CLIManager()
options.addOption( OptionBuilder.withLongOpt( "encrypt-master-password" ).hasOptionalArg().withDescription( "Encrypt master security password" ).create( ENCRYPT_MASTER_PASSWORD ) );
options.addOption( OptionBuilder.withLongOpt( "encrypt-password" ).hasOptionalArg().withDescription( "Encrypt server password" ).create( ENCRYPT_PASSWORD ) );
options.addOption( OptionBuilder.withLongOpt( "threads" ).hasArg().withDescription( "Thread count, for instance 2.0C where C is core multiplied" ).create( THREADS ) );
options.addOption( OptionBuilder.withLongOpt( "quiet_transfer_logs" ).withDescription( "quiets transfer logs, for example: downloading, uploading, bytes downloaded, etc.." ).create( QUIET_TRANSFER_LOGS) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"quiet-transfer-logs", for consistency with other options, please

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 ) );

Expand All @@ -154,7 +157,6 @@ public CommandLine parse( String[] args )
String[] cleanArgs = cleanArgs( args );

CommandLineParser parser = new GnuParser();

return parser.parse( options, cleanArgs );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ else if ( profileAction.startsWith( "+" ) )

TransferListener transferListener;

if ( quiet )
if ( quiet || cliRequest.commandLine.hasOption(CLIManager.QUIET_TRANSFER_LOGS) )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you try this with current HEAD, Checkstyle will remember you our key coding convention, with spaces around parenthesis :)

{
transferListener = new QuietMavenTransferListener();
}
Expand Down