Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7478

Improve transport selection for resolver

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.9.0, 4.0.0-alpha-2, 4.0.0
    • Core
    • None

    Description

      The MNG-7454 included resolver native transport and wagon transport for resolver and retains Wagon as default transport. Also, change added setting for the transport by user using user properties. Still, as the selection logic relies on user properties, it makes it impossible to simply set "for good" the selection, as it works only if set on command line. Moreover, the default maven behavior is affected by this change (in case 3rd party transport is installed), as in this case user MUST provide "auto" setting, while before 3.9.0 this was NOT the case: transport just had to be installed and proper transport was selected based on priorities.

      Hence, following changes are proposed:

      • Instead of user properties, core should use config properties (config + system + user merged) instead, as this allows setting transport in places like MAVEN_OPTS etc.
      • Introduce "real" default setting (used when no user input regarding transport)

      The latter change needs a bit of explanation: currently, if no user input, the code selects "wagon" as default value, and sets Wagon priority to MAX, potentially inhibiting any other installed 3rd party transport. Hence, due this change, users installing 3rd party transport now MUST provide transport setting "auto", that is IMHO wrong (alters behavior unexpectedly, requires user interaction where that was not the case before).

      Hence, we need to introduce "default" case (no user input given), that ONLY modifies Wagon priority in such way it ensures it "wins" over HttpTransport, but DOES NOT inhibit any potentially installed 3rd party provider. The "wagon" and "native" settings are unchanged (making sure that selected is used and INHIBITS anything else), while "auto" mode differs from "default" mode that it does not tamper with priorities at all (so stock maven with auto mode would select native transport due their coded priorities).

      Attachments

        Issue Links

          Activity

            People

              cstamas Tamas Cservenak
              cstamas Tamas Cservenak
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: