Uploaded image for project: 'Maven Indexer'
  1. Maven Indexer
  2. MINDEXER-42

WagonHelper.getWagonResourceFetcher does not support HTTPS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.1.2
    • 4.1.3
    • 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 );
          }
      

      Attachments

        Activity

          People

            olamy Olivier Lamy
            jglick Jesse N. Glick
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: