How to get a Wagon TransferListener wrapping the default Aether TransferListener

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get a Wagon TransferListener wrapping the default Aether TransferListener

Andreas Sewe-2
Hi,

I am writing a Maven plugin that needs a *Wagon* TransferListener
(org.apache.maven.wagon.events.TransferListener). To ensure a consistent
user experience, this Wagon TransferListener should behave exactly like
the (org.eclipse|org.sonatype).aether.transfer.TransferListener which
Maven presumably uses for its other downloads.

The question is thus how to obtain such an instance?

I wasn't able to simply get a Wagon TransferListener injected
(@Component). And while I can get an Aether RepositorySystemSession with
its associated Aether TransferListener injected, I couldn't find a
*public* Aether->Wagon adapter (the one in
maven-resolver-transport-wagon is not public API). And writing this
adapter myself feels kind of silly, as I am pretty sure this kind of
compatibility layer already exists somewhere.

Can you please help me figure out where?

Best wishes,

Andreas


signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to get a Wagon TransferListener wrapping the default Aether TransferListener

rfscholte
Sounds like something which has to be added to maven-artifact-transfer[1]

[1] https://maven.apache.org/shared/maven-artifact-transfer/

On Sat, 07 Oct 2017 22:29:26 +0200, Andreas Sewe  
<[hidden email]> wrote:

> Hi,
>
> I am writing a Maven plugin that needs a *Wagon* TransferListener
> (org.apache.maven.wagon.events.TransferListener). To ensure a consistent
> user experience, this Wagon TransferListener should behave exactly like
> the (org.eclipse|org.sonatype).aether.transfer.TransferListener which
> Maven presumably uses for its other downloads.
>
> The question is thus how to obtain such an instance?
>
> I wasn't able to simply get a Wagon TransferListener injected
> (@Component). And while I can get an Aether RepositorySystemSession with
> its associated Aether TransferListener injected, I couldn't find a
> *public* Aether->Wagon adapter (the one in
> maven-resolver-transport-wagon is not public API). And writing this
> adapter myself feels kind of silly, as I am pretty sure this kind of
> compatibility layer already exists somewhere.
>
> Can you please help me figure out where?
>
> Best wishes,
>
> Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to get a Wagon TransferListener wrapping the default Aether TransferListener

Andreas Sewe-2
Hi Robert,

> Sounds like something which has to be added to maven-artifact-transfer[1]

I created MSHARED-662 [2] to track this feature request.

I've also since I asked about this written my own adapter, which I would
be willing to share. Let's discuss this in JIRA.

Best wishes,

Andreas

> [1] https://maven.apache.org/shared/maven-artifact-transfer/

[2] <https://issues.apache.org/jira/browse/MSHARED-662>


signature.asc (836 bytes) Download Attachment