You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by cs...@apache.org on 2022/05/13 06:39:30 UTC

[maven] 01/01: [MNG-7478] Transport selection should use config properties

This is an automated email from the ASF dual-hosted git repository.

cstamas pushed a commit to branch mng-7475-transport-selection
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 09c7adf6906ce71553fc8409b9920f10defb4b64
Author: Tamas Cservenak <ta...@cservenak.net>
AuthorDate: Fri May 13 08:33:51 2022 +0200

    [MNG-7478] Transport selection should use config properties
    
    Instead of user properties, as this allows making "permanent" the
    selection by using MAVEN_OPTS and other places as well. Currently
    only via command line works.
---
 .../maven/internal/aether/DefaultRepositorySystemSessionFactory.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java b/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
index 323dfe87e..6ff7f2ca6 100644
--- a/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
+++ b/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
@@ -261,8 +261,8 @@ public class DefaultRepositorySystemSessionFactory
         }
         session.setAuthenticationSelector( authSelector );
 
-        String transport = request.getUserProperties()
-                .getProperty( MAVEN_RESOLVER_TRANSPORT_KEY, MAVEN_RESOLVER_TRANSPORT_WAGON );
+        Object transport = session.getConfigProperties()
+                .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