[ 
https://issues.apache.org/jira/browse/MNG-7941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet updated MNG-7941:
---------------------------------
    Fix Version/s: 4.0.0-alpha-11
                       (was: 4.0.0-alpha-10)

> Meaning of -ntp CLI Option vs. --batch-mode
> -------------------------------------------
>
>                 Key: MNG-7941
>                 URL: https://issues.apache.org/jira/browse/MNG-7941
>             Project: Maven
>          Issue Type: Improvement
>    Affects Versions: 3.9.5, 4.0.0-alpha-8
>            Reporter: Karl Heinz Marbaise
>            Priority: Minor
>             Fix For: 4.0.0, 4.0.0-alpha-11
>
>
> If you run a maven build while not downloaded all deps or even not downloaded 
> any dependency at all you will see something like this on the console:
> {code}
> Downloading from nexus: 
> http://localhost:8081/nexus/content/groups/public/org/apache/apache/31/apache-31.pom
> Progress (1): 7.9/24 kB
> Progress (1): 24 kB    
> ...
> Downloading from nexus: 
> http://localhost:8081/nexus/content/groups/public/org/eclipse/jetty/jetty-security/9.4.46.v20220331/jetty-security-9.4.46.v20220331.jar
> Progress (3): 106/733 kB | 73/225 kB | 73/184 kB
> Progress (3): 139/733 kB | 73/225 kB | 73/184 kB
> Progress (3): 139/733 kB | 106/225 kB | 73/184 kB
> Progress (3): 172/733 kB | 106/225 kB | 73/184 kB
> Progress (3): 172/733 kB | 106/225 kB | 106/184 kB
> Progress (3): 204/733 kB | 106/225 kB | 106/184 kB
> Progress (3): 204/733 kB | 139/225 kB | 106/184 kB
> Progress (3): 204/733 kB | 139/225 kB | 139/184 kB
> Progress (3): 237/733 kB | 139/225 kB | 139/184 kB
> Progress (3): 237/733 kB | 172/225 kB | 139/184 kB
> Progress (3): 237/733 kB | 172/225 kB | 172/184 kB
> Progress (3): 237/733 kB | 172/225 kB | 184 kB    
> Progress (3): 270/733 kB | 172/225 kB | 184 kB
> Progress (3): 270/733 kB | 204/225 kB | 184 kB
> Progress (3): 270/733 kB | 225 kB | 184 kB    
> Progress (4): 270/733 kB | 225 kB | 184 kB | 7.9/147 kB
> Progress (4): 303/733 kB | 225 kB | 184 kB | 7.9/147 kB
> ...                   
> {code}
> So far as usual..
> What you can do to prevent the long outputs is just use: {{--batch-mode}} 
> which prevents the output of the progress and the result looks like this:
> {code}
> [INFO] Downloaded from nexus: 
> http://localhost:8081/nexus/content/groups/public/org/apache/maven/doxia/doxia-module-twiki/1.11.1/doxia-module-twiki-1.11.1.jar
>  (73 kB at 1.4 MB/s)
> [INFO] Downloading from nexus: 
> http://localhost:8081/nexus/content/groups/public/org/eclipse/jetty/jetty-security/9.4.46.v20220331/jetty-security-9.4.46.v20220331.jar
> [INFO] Downloaded from nexus: 
> http://localhost:8081/nexus/content/groups/public/org/eclipse/jetty/jetty-io/9.4.46.v20220331/jetty-io-9.4.46.v20220331.jar
>  (184 kB at 3.4 MB/s)
> [INFO] Downloading from nexus: 
> http://localhost:8081/nexus/content/groups/public/org/eclipse/jetty/jetty-util-ajax/9.4.46.v20220331/jetty-util-ajax-9.4.46.v20220331.jar
> ...
> {code}
> So finally you can use {{-no-transfer-progress}} (or {{-ntp}}) and the output 
> looks like this:
> {code}
> [INFO] 
> [INFO] --- site:3.12.1:attach-descriptor (attach-descriptor) @ 
> maven-dependency-plugin ---
> [INFO] Skipping because packaging 'maven-plugin' is not pom.
> [INFO] 
> [INFO] --- install:3.1.1:install (default-install) @ maven-dependency-plugin 
> ---
> ..
> {code}
> So based on the naming of {{\-\-no-transfer-progress}} which is a bit 
> misleading because the transfer progress output has already been supressed by 
> using {{--batch-mode}}. 
> For Maven 4 we could think about a more cleaner way:
> * {{--batch-mode}} will not change anything
> * {{--no-transfer-progress}} will prevent the output of {{Progress (3): 
> 237/733 kB | 172/225 kB | 172/184 kB}} (which will really represent the 
> function related to the name).
> * {{--no-download-output}} could suppress the output as of using {{-ntp}} in 
> Maven 3.X
> That would be a bit more consistent



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to