Maven
  1. Maven
  2. MNG-4279

wagon provider selection should fail gracefully and use protocol for roleHint if protocol-provider roleHint isn't available.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.1
    • Labels:
      None

      Description

      Currently, if the server section of the settings.xml uses wagonProvider to set a provider suffix, that provider may apply to multiple different repository definitions.

      If the user specifies a repository with protocol == http and provider == httpclient for artifact resolution using a server id of 'foo', then configure a distribution repository with protocol == scp, the provider == httpclient will be applied to this distribution repo, and result in an error like this:

      Component descriptor cannot be found in the component repository: org.apache.maven.wagon.Wagonscp-httpclient.
      

      Obviously, this will never work. In these cases, ideally different server IDs should be used. However, if not then Maven should fallback gracefully to a roleHint of 'scp'.

        Issue Links

          Activity

          John Casey created issue -
          John Casey made changes -
          Field Original Value New Value
          Description Currently, if the server section of the settings.xml uses wagonProvider to set a provider suffix, that provider may apply to multiple different repository definitions.

          If the user specifies a repository with protocol == http and provider == httpclient for artifact resolution using a server id of 'foo', then configure a distribution repository with protocol == scp, the provider == httpclient will be applied to this distribution repo, and result in an error like this:

          {noformat}
          Component descriptor cannot be found in the component repository: org.apache.maven.wagon.Wagonscp-httpclient.
          {noformat}

          Obviously, this will never work. In these cases, ideally different server IDs should be used. However, if not then Maven should fallback gracefully to a roleHint of 'scp'.
          Assignee John Casey [ jdcasey ]
          Fix Version/s 2.2.1 [ 15328 ]
          Hide
          John Casey added a comment -

          added code to check that the protocol-provider hint exists before blindly passing it back. If it doesn't exist, simply fall back to the protocol as the hint.

          Show
          John Casey added a comment - added code to check that the protocol-provider hint exists before blindly passing it back. If it doesn't exist, simply fall back to the protocol as the hint.
          John Casey made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Benjamin Bentmann made changes -
          Link This issue is related to MNG-4254 [ MNG-4254 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
          Mark Thomas made changes -
          Workflow jira [ 12714611 ] Default workflow, editable Closed status [ 12754297 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
          Mark Thomas made changes -
          Workflow jira [ 12951138 ] Default workflow, editable Closed status [ 12987384 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          2h 48m 1 John Casey 03/Aug/09 18:16

            People

            • Assignee:
              John Casey
              Reporter:
              John Casey
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development