You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Hans Dockter <ma...@dockter.biz> on 2009/01/13 12:38:45 UTC
Transfer Listener
For Gradle, we try to implement download progress reporting. The way
we do this now, is to add a TransferListener to each of the
repositories.
If the TransferListener receives the TRANSFER_STARTED event, we print
something like: Starting to download <url>. For the succeeding
TRANSFER_PROGRESS we print dots. All this works fine, except then when
transitive dependencies are downloaded, we get more than one
TRANSFER_STARTED event (It seems every resolver in the chain is
sending one). This clutters obviously our output. I wouldn't like to
add state to the listeners. I know that the
DefaultRepositoryCacheManager works with a DownloadListener. But it
can only have one and access to it is rather hidden.
Any idea how we can solve this problem without adding state to our
TransferListener?
- Hans
--
Hans Dockter
Gradle Project lead
http://www.gradle.org
Re: Transfer Listener
Posted by Hans Dockter <ma...@dockter.biz>.
On Jan 13, 2009, at 12:38 PM, Hans Dockter wrote:
> For Gradle, we try to implement download progress reporting. The way
> we do this now, is to add a TransferListener to each of the
> repositories.
>
> If the TransferListener receives the TRANSFER_STARTED event, we
> print something like: Starting to download <url>. For the succeeding
> TRANSFER_PROGRESS we print dots. All this works fine, except then
> when transitive dependencies are downloaded, we get more than one
> TRANSFER_STARTED event (It seems every resolver in the chain is
> sending one). This clutters obviously our output.
I have discovered that this is a bug on my side. I have added the same
listener multiple times to the same resolver.
- Hans
--
Hans Dockter
Gradle Project lead
http://www.gradle.org