Return-Path: X-Original-To: apmail-maven-issues-archive@minotaur.apache.org Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 20F2018471 for ; Wed, 24 Feb 2016 21:27:22 +0000 (UTC) Received: (qmail 43798 invoked by uid 500); 24 Feb 2016 21:27:18 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 43650 invoked by uid 500); 24 Feb 2016 21:27:18 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 43517 invoked by uid 99); 24 Feb 2016 21:27:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2016 21:27:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5CB792C1F5D for ; Wed, 24 Feb 2016 21:27:18 +0000 (UTC) Date: Wed, 24 Feb 2016 21:27:18 +0000 (UTC) From: "Michael Osipov (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MNG-5977) Improve output readability of our MavenTransferListener implementations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MNG-5977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15163835#comment-15163835 ] Michael Osipov commented on MNG-5977: ------------------------------------- Another improvement has been added with [33442c212b5e5c29feb0101d70a625cea7845ea7|https://git-wip-us.apache.org/repos/asf?p=maven.git;a=commit;h=33442c212b5e5c29feb0101d70a625cea7845ea7]. > Improve output readability of our MavenTransferListener implementations > ----------------------------------------------------------------------- > > Key: MNG-5977 > URL: https://issues.apache.org/jira/browse/MNG-5977 > Project: Maven > Issue Type: Improvement > Components: Command Line, Embedding > Affects Versions: 3.3.9 > Reporter: Michael Osipov > Assignee: Michael Osipov > Fix For: 3.4.0 > > Attachments: current.zip, improved.zip, improved.zip > > > The current output of Downloading/Downladed/Uploading/Uploaded transfer notification has some flaws: > 1. It does not scale numbers between 1 and 1000 with appropriate units > 2. It should use correct size ({{kB}}, {{MB}}, {{GB}} and time units ({{s}}) but doesn't. (see https://en.wikipedia.org/wiki/Binary_prefix and https://en.wikipedia.org/wiki/Metric_prefix) > 3. When Aether downloads in parallel (which applies for non-POM files) the progress interleaves due to race conditions to {{System.out}} and you do not know to which resource a progress belongs to. > Let's use an improved version of MPIR {{DependenciesRenderer}}'s [{{FileDecimalFormat}}|https://github.com/apache/maven-plugins/blob/trunk/maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java#L1583] for it. > concrete examples: > before > {noformat}191/191 KB 27/48 KB 48/119 KB 80/87 KB 13/13 KB {noformat} > after: > {noformat}Progress (4): 500/800 B | 40/45 kB | 193 kB/315 kB | 1.3/9 MB | 12/30 MB{noformat} > if total size is unavailable or the file has already been downloaded but not removed from the list, the output will be: > {noformat}Progress (4): 800 B | 40/45 kB | 193 kB | 9 MB | 12 MB{noformat} > or in debug mode: > {noformat}Progress (5): xml-apis-1.3.04.jar () | maven-shared-utils-0.6.jar () | xercesImpl-2.9.1.jar () | commons-digester-1.6.jar () | maven-reporting-impl-2.3.jar (){noformat} > If the scale is between 1 and 10, one decimal position will be printed out. If it is between 10 and 1000, it will be an integer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)