[
https://issues.apache.org/jira/browse/MNG-7478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guillaume Nodet updated MNG-7478:
---------------------------------
Fix Version/s: 4.0.0-alpha-2
> Improve transport selection for resolver
> ----------------------------------------
>
> Key: MNG-7478
> URL: https://issues.apache.org/jira/browse/MNG-7478
> Project: Maven
> Issue Type: Improvement
> Components: Core
> Reporter: Tamas Cservenak
> Assignee: Tamas Cservenak
> Priority: Major
> Fix For: 3.9.0, 4.0.0-alpha-1, 4.0.0-alpha-2, 4.0.0
>
>
> 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).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)