Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,7 @@ else if ( request.isUpdateSnapshots() )
}
session.setAuthenticationSelector( authSelector );

String transport = request.getUserProperties()
.getProperty( MAVEN_RESOLVER_TRANSPORT_KEY, MAVEN_RESOLVER_TRANSPORT_WAGON );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is a merged, final version of the properties and the actual source is irrelevant?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, this is "config" properties (merged plus added things). I think I understand from where "request.systemProperties" are sourced, but from where are "request.userProperties" sourced?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look into Maven CLI, that is the source for it. Commons CLI provides it and it is passed down the line.

Copy link
Copy Markdown
Member

@slawekjaranowski slawekjaranowski May 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

@cstamas cstamas May 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO this is correct change: we do want to allow setting transport in various ways, allowing the change to be "persistent". What we have on master works ONLY if you use -Dmaven.resolver.transport=xx on CLI and nothing else. This also allows CLI override (ie. you have it set in MAVEN_OPTS but you use -Dxxx on command line)

Object transport = configProps.getOrDefault( MAVEN_RESOLVER_TRANSPORT_KEY, MAVEN_RESOLVER_TRANSPORT_WAGON );
if ( MAVEN_RESOLVER_TRANSPORT_NATIVE.equals( transport ) )
{
// Make sure (whatever extra priority is set) that resolver native is selected
Expand Down