You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Alix Lourme <al...@gmail.com> on 2016/10/15 17:07:39 UTC

Maven 3.4 : batch-mode for download progress disabling => impact on color logs feature ?

Hi Maven (Core) maintainers,

Currently the download progress for dependencies/plugins is displayed by
default :
-----------------------------------
Downloading: http://.../repository/org/foo/bar/x.y.z/bar-x.y.z.jar

4/2122 KB
8/2122 KB
-----------------------------------

The common fix is to use *batch-mode* option (MNG-5486
<https://issues.apache.org/jira/browse/MNG-5486>, disable maven download
progress indication
<https://stackoverflow.com/questions/21638697/disable-maven-download-progress-indication>
).
This configuration is perfect for CI usage, but has a (little) impact for
*human* execution ... for example on Maven Archetypes (even if usable with
-D parameters).
However I feel that many people (like me) generalise -B option (in *mvn.cmd*
/*mvn.sh, ...*) avoiding some kilometer of logs in a daily use.
This is perverse about the concept, and could do losing the great "future"
feature about logs colorization (MNG-3507
<https://issues.apache.org/jira/browse/MNG-3507>) because disabled in
batch-mode
<https://github.com/apache/maven/blob/master/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L480>
.

A good consensus (IMO) could be *activate the download progression only if
debug mode (-X) is enabled*.
Because the download information displayed in *batch-mode* option is enough
for a "default execution":
-----------------------------------
[INFO] Downloading: http://.../repository/org/foo/bar/x.y.z/bar-x.y.z.jar
[INFO] Downloaded: http://.../repository/org/foo/bar/x.y.z/bar-x.y.z.jar
(xx kB at yy kB/s)
-----------------------------------

I could try providing a PR (using MNG-5486
<https://issues.apache.org/jira/browse/MNG-5486> or new JIRA ?), but I
would have an acceptance (or not ^^) on this idea.

Thanks in advance.
Best regards.
-- 
Alix Lourme

Re: Maven 3.4 : batch-mode for download progress disabling => impact on color logs feature ?

Posted by Alix Lourme <al...@gmail.com>.
Hi Michael,

Thanks for the reply ... and ok, I understand the point of view.

Note that I have added several improvements to the progress meter in master.
>

Thanks for the information, I will look at MNG-5977
<https://issues.apache.org/jira/browse/MNG-5977> concretely.

Still keep in mind that an artifact is downloaded only once to the local
> cache.
>

Yes, agree.

Have a nice weekend.
Best regards.

2016-10-15 19:32 GMT+02:00 Michael Osipov <mi...@apache.org>:

> Am 2016-10-15 um 19:07 schrieb Alix Lourme:
>
>> Hi Maven (Core) maintainers,
>>
>> Currently the download progress for dependencies/plugins is displayed by
>> default :
>> -----------------------------------
>> Downloading: http://.../repository/org/foo/bar/x.y.z/bar-x.y.z.jar
>>
>> 4/2122 KB
>> 8/2122 KB
>> -----------------------------------
>>
>> The common fix is to use *batch-mode* option (MNG-5486
>> <https://issues.apache.org/jira/browse/MNG-5486>, disable maven download
>> progress indication
>> <https://stackoverflow.com/questions/21638697/disable-maven-
>> download-progress-indication>
>> ).
>> This configuration is perfect for CI usage, but has a (little) impact for
>> *human* execution ... for example on Maven Archetypes (even if usable with
>> -D parameters).
>> However I feel that many people (like me) generalise -B option (in
>> *mvn.cmd*
>> /*mvn.sh, ...*) avoiding some kilometer of logs in a daily use.
>> This is perverse about the concept, and could do losing the great "future"
>> feature about logs colorization (MNG-3507
>> <https://issues.apache.org/jira/browse/MNG-3507>) because disabled in
>> batch-mode
>> <https://github.com/apache/maven/blob/master/maven-embedder/
>> src/main/java/org/apache/maven/cli/MavenCli.java#L480>
>>
>
> I have already commented on the issue and the PR that there is batch mode.
> If people generalize that it either means that out docs are bad or people
> do not know what batch mode is: notty on stdout and stdin.
>
> A good consensus (IMO) could be *activate the download progression only if
>> debug mode (-X) is enabled*.
>> Because the download information displayed in *batch-mode* option is
>> enough
>> for a "default execution":
>> -----------------------------------
>> [INFO] Downloading: http://.../repository/org/foo/bar/x.y.z/bar-x.y.z.jar
>> [INFO] Downloaded: http://.../repository/org/foo/bar/x.y.z/bar-x.y.z.jar
>> (xx kB at yy kB/s)
>> -----------------------------------
>>
>
> For you, for others maybe don't. I wan't to see the progress how my Nexus
> instance performs or what download slows down my build. Many people will
> probably not enable -X to see it all which is extremely verbose.
>
> Note that I have added several improvements to the progress meter in
> master.
>
> I could try providing a PR (using MNG-5486
>> <https://issues.apache.org/jira/browse/MNG-5486> or new JIRA ?), but I
>> would have an acceptance (or not ^^) on this idea.
>>
>
> Maybe an idea might be to display GAV instead of the URL and display URL
> in -X only since the URL is only a technical detail. Though, it has to be
> evaluated wether the Aether callback does provide this information. I doubt
> that it does.
>
> Still keep in mind that an artifact is downloaded only once to the local
> cache.
>
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
Alix Lourme

Re: Maven 3.4 : batch-mode for download progress disabling => impact on color logs feature ?

Posted by Michael Osipov <mi...@apache.org>.
Am 2016-10-15 um 19:07 schrieb Alix Lourme:
> Hi Maven (Core) maintainers,
>
> Currently the download progress for dependencies/plugins is displayed by
> default :
> -----------------------------------
> Downloading: http://.../repository/org/foo/bar/x.y.z/bar-x.y.z.jar
>
> 4/2122 KB
> 8/2122 KB
> -----------------------------------
>
> The common fix is to use *batch-mode* option (MNG-5486
> <https://issues.apache.org/jira/browse/MNG-5486>, disable maven download
> progress indication
> <https://stackoverflow.com/questions/21638697/disable-maven-download-progress-indication>
> ).
> This configuration is perfect for CI usage, but has a (little) impact for
> *human* execution ... for example on Maven Archetypes (even if usable with
> -D parameters).
> However I feel that many people (like me) generalise -B option (in *mvn.cmd*
> /*mvn.sh, ...*) avoiding some kilometer of logs in a daily use.
> This is perverse about the concept, and could do losing the great "future"
> feature about logs colorization (MNG-3507
> <https://issues.apache.org/jira/browse/MNG-3507>) because disabled in
> batch-mode
> <https://github.com/apache/maven/blob/master/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L480>

I have already commented on the issue and the PR that there is batch 
mode. If people generalize that it either means that out docs are bad or 
people do not know what batch mode is: notty on stdout and stdin.

> A good consensus (IMO) could be *activate the download progression only if
> debug mode (-X) is enabled*.
> Because the download information displayed in *batch-mode* option is enough
> for a "default execution":
> -----------------------------------
> [INFO] Downloading: http://.../repository/org/foo/bar/x.y.z/bar-x.y.z.jar
> [INFO] Downloaded: http://.../repository/org/foo/bar/x.y.z/bar-x.y.z.jar
> (xx kB at yy kB/s)
> -----------------------------------

For you, for others maybe don't. I wan't to see the progress how my 
Nexus instance performs or what download slows down my build. Many 
people will probably not enable -X to see it all which is extremely verbose.

Note that I have added several improvements to the progress meter in master.

> I could try providing a PR (using MNG-5486
> <https://issues.apache.org/jira/browse/MNG-5486> or new JIRA ?), but I
> would have an acceptance (or not ^^) on this idea.

Maybe an idea might be to display GAV instead of the URL and display URL 
in -X only since the URL is only a technical detail. Though, it has to 
be evaluated wether the Aether callback does provide this information. I 
doubt that it does.

Still keep in mind that an artifact is downloaded only once to the local 
cache.

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org