Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.2.1
-
Fix Version/s: 2.2.1
-
Component/s: Artifacts and Repositories
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
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
- is related to
-
MNG-4254
Support selection of wagon implementation for a particular protocol
-
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.