Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] Proxy integration inside Eclipse

Andreas Sewe wrote:

AFAIK, you need to do this programmatically, as Aether doesn't know
anything about the way how Eclipse handles proxies.

Correct.

There is a
ProxySelector interface [1], however, so I would suggest writing an
Adapter from Eclipse's IProxyService to Aether's ProxySelector.

Yup.

However, keep in mind that Aether then gets an up-to-date view of
Eclipse's proxy configuration, which may change over time (although I
don't know how often Aether actually queries the ProxySelector; probably
Benjamin knows).

The primary need for the ProxySelector is to determine a proxy for repositories declared in artifact descriptors (POMs). So in a context using the maven-aether-provider, the ProxySelector can get called whenever readArtifactDescriptor() is invoked, directly or indirectly (e.g. during transitive dependency collection).

RemoteRepository instances that the application passes into the various *Request objects already have their required proxy (if any) assigned. Aether 0.9.0.M4 introduced a new util method newResolutionRepositories() to help users apply their current ProxySelector when building the effective RemoteRepository instance. But in general, the ProxySelector is irrelevant once a RemoteRepository instance is set up.


Benjamin



Back to the top