You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dimitry Voytenko (JIRA)" <ji...@codehaus.org> on 2010/05/18 07:24:12 UTC
[jira] Created: (MNG-4678) CLI: AbstractConsoleDownloadMonitor,
BatchModeDownloadMonitor output download progress to STDOUT
CLI: AbstractConsoleDownloadMonitor, BatchModeDownloadMonitor output download progress to STDOUT
------------------------------------------------------------------------------------------------
Key: MNG-4678
URL: http://jira.codehaus.org/browse/MNG-4678
Project: Maven 2 & 3
Issue Type: Bug
Components: Command Line
Affects Versions: 2.2.1
Reporter: Dimitry Voytenko
The code looks about like this:
public void transferInitiated( TransferEvent transferEvent )
{
String message = transferEvent.getRequestType() == TransferEvent.REQUEST_PUT ? "Uploading" : "Downloading";
String url = transferEvent.getWagon().getRepository().getUrl();
// TODO: can't use getLogger() because this isn't currently instantiated as a component
System.out.println( message + ": " + url + "/" + transferEvent.getResource().getName() );
}
Not sure why Log instance cannot be obtained here, but this really messes up any code that would need to filter STDOUT.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-4678) CLI: AbstractConsoleDownloadMonitor,
BatchModeDownloadMonitor output download progress to STDOUT
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=221651#action_221651 ]
Benjamin Bentmann commented on MNG-4678:
----------------------------------------
Aha, so what you're actually asking for is to disable the progress when quiet mode is enabled.
> CLI: AbstractConsoleDownloadMonitor, BatchModeDownloadMonitor output download progress to STDOUT
> ------------------------------------------------------------------------------------------------
>
> Key: MNG-4678
> URL: http://jira.codehaus.org/browse/MNG-4678
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Command Line
> Affects Versions: 2.2.1
> Reporter: Dimitry Voytenko
>
> The code looks about like this:
> public void transferInitiated( TransferEvent transferEvent )
> {
> String message = transferEvent.getRequestType() == TransferEvent.REQUEST_PUT ? "Uploading" : "Downloading";
> String url = transferEvent.getWagon().getRepository().getUrl();
> // TODO: can't use getLogger() because this isn't currently instantiated as a component
> System.out.println( message + ": " + url + "/" + transferEvent.getResource().getName() );
> }
> Not sure why Log instance cannot be obtained here, but this really messes up any code that would need to filter STDOUT.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-4678) CLI: AbstractConsoleDownloadMonitor,
BatchModeDownloadMonitor output download progress to STDOUT
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=221644#action_221644 ]
Benjamin Bentmann commented on MNG-4678:
----------------------------------------
I can't quite follow, what would be the difference to your filtering if the progress went to the Logger (which eventually just prints to STDOUT) instead?
> CLI: AbstractConsoleDownloadMonitor, BatchModeDownloadMonitor output download progress to STDOUT
> ------------------------------------------------------------------------------------------------
>
> Key: MNG-4678
> URL: http://jira.codehaus.org/browse/MNG-4678
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Command Line
> Affects Versions: 2.2.1
> Reporter: Dimitry Voytenko
>
> The code looks about like this:
> public void transferInitiated( TransferEvent transferEvent )
> {
> String message = transferEvent.getRequestType() == TransferEvent.REQUEST_PUT ? "Uploading" : "Downloading";
> String url = transferEvent.getWagon().getRepository().getUrl();
> // TODO: can't use getLogger() because this isn't currently instantiated as a component
> System.out.println( message + ": " + url + "/" + transferEvent.getResource().getName() );
> }
> Not sure why Log instance cannot be obtained here, but this really messes up any code that would need to filter STDOUT.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-4678) CLI: AbstractConsoleDownloadMonitor,
BatchModeDownloadMonitor output download progress to STDOUT
Posted by "Dimitry Voytenko (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=221659#action_221659 ]
Dimitry Voytenko commented on MNG-4678:
---------------------------------------
Yes, either disable it in quite mode or batch mode - I'll adjust.
> CLI: AbstractConsoleDownloadMonitor, BatchModeDownloadMonitor output download progress to STDOUT
> ------------------------------------------------------------------------------------------------
>
> Key: MNG-4678
> URL: http://jira.codehaus.org/browse/MNG-4678
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Command Line
> Affects Versions: 2.2.1
> Reporter: Dimitry Voytenko
>
> The code looks about like this:
> public void transferInitiated( TransferEvent transferEvent )
> {
> String message = transferEvent.getRequestType() == TransferEvent.REQUEST_PUT ? "Uploading" : "Downloading";
> String url = transferEvent.getWagon().getRepository().getUrl();
> // TODO: can't use getLogger() because this isn't currently instantiated as a component
> System.out.println( message + ": " + url + "/" + transferEvent.getResource().getName() );
> }
> Not sure why Log instance cannot be obtained here, but this really messes up any code that would need to filter STDOUT.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (MNG-4678) CLI: AbstractConsoleDownloadMonitor,
BatchModeDownloadMonitor output download progress to STDOUT
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann closed MNG-4678.
----------------------------------
Resolution: Fixed
Fix Version/s: 3.0-beta-2
Assignee: Benjamin Bentmann
Made transfer progress output respect quiet mode in [r947404|http://svn.apache.org/viewvc?view=revision&revision=947404].
> CLI: AbstractConsoleDownloadMonitor, BatchModeDownloadMonitor output download progress to STDOUT
> ------------------------------------------------------------------------------------------------
>
> Key: MNG-4678
> URL: http://jira.codehaus.org/browse/MNG-4678
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Command Line
> Affects Versions: 2.2.1
> Reporter: Dimitry Voytenko
> Assignee: Benjamin Bentmann
> Fix For: 3.0-beta-2
>
>
> The code looks about like this:
> public void transferInitiated( TransferEvent transferEvent )
> {
> String message = transferEvent.getRequestType() == TransferEvent.REQUEST_PUT ? "Uploading" : "Downloading";
> String url = transferEvent.getWagon().getRepository().getUrl();
> // TODO: can't use getLogger() because this isn't currently instantiated as a component
> System.out.println( message + ": " + url + "/" + transferEvent.getResource().getName() );
> }
> Not sure why Log instance cannot be obtained here, but this really messes up any code that would need to filter STDOUT.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-4678) CLI: AbstractConsoleDownloadMonitor,
BatchModeDownloadMonitor output download progress to STDOUT
Posted by "Dimitry Voytenko (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=221642#action_221642 ]
Dimitry Voytenko commented on MNG-4678:
---------------------------------------
By filtering STDOUT I mean loading output in environment variables, etc.
I do use "-batch" - that's why I registered this issue. Maven CLI used BatchModeDownloadMonitor in this mode, which still outputs progress into stdout:
http://svn.apache.org/repos/asf/maven/maven-2/tags/maven-2.2.1/maven-core/src/main/java/org/apache/maven/cli/BatchModeDownloadMonitor.java
{code}
public void transferInitiated( TransferEvent transferEvent )
{
String message = transferEvent.getRequestType() == TransferEvent.REQUEST_PUT ? "Uploading" : "Downloading";
String url = transferEvent.getWagon().getRepository().getUrl();
out.println( message + ": " + url + "/" + transferEvent.getResource().getName() );
}
{code}
> CLI: AbstractConsoleDownloadMonitor, BatchModeDownloadMonitor output download progress to STDOUT
> ------------------------------------------------------------------------------------------------
>
> Key: MNG-4678
> URL: http://jira.codehaus.org/browse/MNG-4678
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Command Line
> Affects Versions: 2.2.1
> Reporter: Dimitry Voytenko
>
> The code looks about like this:
> public void transferInitiated( TransferEvent transferEvent )
> {
> String message = transferEvent.getRequestType() == TransferEvent.REQUEST_PUT ? "Uploading" : "Downloading";
> String url = transferEvent.getWagon().getRepository().getUrl();
> // TODO: can't use getLogger() because this isn't currently instantiated as a component
> System.out.println( message + ": " + url + "/" + transferEvent.getResource().getName() );
> }
> Not sure why Log instance cannot be obtained here, but this really messes up any code that would need to filter STDOUT.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-4678) CLI: AbstractConsoleDownloadMonitor,
BatchModeDownloadMonitor output download progress to STDOUT
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=221610#action_221610 ]
Benjamin Bentmann commented on MNG-4678:
----------------------------------------
What does "filter STDOUT" exactly mean? For usage in batch scenarios, one can add {{-batch}} to the Maven CLI and disable progress output. stdout is intentionally used by the CLI for the progress monitor because the logger does not support "\r".
> CLI: AbstractConsoleDownloadMonitor, BatchModeDownloadMonitor output download progress to STDOUT
> ------------------------------------------------------------------------------------------------
>
> Key: MNG-4678
> URL: http://jira.codehaus.org/browse/MNG-4678
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Command Line
> Affects Versions: 2.2.1
> Reporter: Dimitry Voytenko
>
> The code looks about like this:
> public void transferInitiated( TransferEvent transferEvent )
> {
> String message = transferEvent.getRequestType() == TransferEvent.REQUEST_PUT ? "Uploading" : "Downloading";
> String url = transferEvent.getWagon().getRepository().getUrl();
> // TODO: can't use getLogger() because this isn't currently instantiated as a component
> System.out.println( message + ": " + url + "/" + transferEvent.getResource().getName() );
> }
> Not sure why Log instance cannot be obtained here, but this really messes up any code that would need to filter STDOUT.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-4678) CLI: AbstractConsoleDownloadMonitor,
BatchModeDownloadMonitor output download progress to STDOUT
Posted by "Dimitry Voytenko (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=221647#action_221647 ]
Dimitry Voytenko commented on MNG-4678:
---------------------------------------
I can switch off most of logger messages by running "mvn -q ...". That option does nothing to the text pushed straight into System.out, of course. Currently, "Downloading: ...." is the only thing that keeps printing from time to time to stdout.
> CLI: AbstractConsoleDownloadMonitor, BatchModeDownloadMonitor output download progress to STDOUT
> ------------------------------------------------------------------------------------------------
>
> Key: MNG-4678
> URL: http://jira.codehaus.org/browse/MNG-4678
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Command Line
> Affects Versions: 2.2.1
> Reporter: Dimitry Voytenko
>
> The code looks about like this:
> public void transferInitiated( TransferEvent transferEvent )
> {
> String message = transferEvent.getRequestType() == TransferEvent.REQUEST_PUT ? "Uploading" : "Downloading";
> String url = transferEvent.getWagon().getRepository().getUrl();
> // TODO: can't use getLogger() because this isn't currently instantiated as a component
> System.out.println( message + ": " + url + "/" + transferEvent.getResource().getName() );
> }
> Not sure why Log instance cannot be obtained here, but this really messes up any code that would need to filter STDOUT.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira