Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
4.1.2
-
None
-
Patch
Description
The intent of WagonHelper.getWagonResourceFetcher is to make it easy to use Wagon as a transport when available. In practice, it is useless since it cannot handle HTTPS connections.
The workaround is simple - construct a WagonFetcher directly with the desired scheme - but then the existing convenience methods should not be used. Recommend deprecating them, and optionally introducing a replacement
public WagonFetcher getWagonResourceFetcher( final TransferListener listener, final String protocol, final AuthenticationInfo authenticationInfo, final ProxyInfo proxyInfo ) throws ComponentLookupException { return new WagonFetcher( plexusContainer.lookup( Wagon.class, protocol ), listener, authenticationInfo, proxyInfo ); }
or
public WagonFetcher getWagonResourceFetcher( final TransferListener listener, final String indexUpdateUrl, final AuthenticationInfo authenticationInfo, final ProxyInfo proxyInfo ) throws ComponentLookupException { return new WagonFetcher( plexusContainer.lookup( Wagon.class, URI.create( indexUpdateUrl ).getScheme() ), listener, authenticationInfo, proxyInfo ); }