[ 
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

        

Reply via email to