Discussion:
Maven 3.4 : batch-mode for download progress disabling => impact on color logs feature ?
Alix Lourme
2016-10-15 17:07:39 UTC
Permalink
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
Michael Osipov
2016-10-15 17:32:31 UTC
Permalink
Post by Alix Lourme
Hi Maven (Core) maintainers,
Currently the download progress for dependencies/plugins is displayed by
-----------------------------------
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.
Post by Alix Lourme
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
-----------------------------------
[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.
Post by Alix Lourme
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-***@maven.apache.org
For additional commands, e-mail: dev-***@maven.apache.org
Alix Lourme
2016-10-15 17:56:57 UTC
Permalink
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
Post by Michael Osipov
cache.
Yes, agree.

Have a nice weekend.
Best regards.
Post by Michael Osipov
Post by Alix Lourme
Hi Maven (Core) maintainers,
Currently the download progress for dependencies/plugins is displayed by
-----------------------------------
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
Post by Alix Lourme
debug mode (-X) is enabled*.
Because the download information displayed in *batch-mode* option is enough
-----------------------------------
[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
Post by Alix Lourme
<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
---------------------------------------------------------------------
--
Alix Lourme
Loading...