maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From schu...@apache.org
Subject maven git commit: [MNG-5984] Maven core extension resolution ignores repositories from activeByDefault profiles in settings.xml
Date Fri, 26 Feb 2016 22:19:12 GMT
Repository: maven
Updated Branches:
  refs/heads/master 62374f51f -> 5a4d54810


[MNG-5984] Maven core extension resolution ignores repositories from activeByDefault profiles
in settings.xml

o Updated to make any repositories from settings available to the model resolver
  used to resolve core extensions.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/5a4d5481
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/5a4d5481
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/5a4d5481

Branch: refs/heads/master
Commit: 5a4d54810378e0abf28d7cc6768d74d4d3a5cc2b
Parents: 62374f5
Author: Christian Schulte <schulte@apache.org>
Authored: Fri Feb 26 22:57:45 2016 +0100
Committer: Christian Schulte <schulte@apache.org>
Committed: Fri Feb 26 22:57:45 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/maven/cli/MavenCli.java    | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/5a4d5481/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index 93af417..c5a2256 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -296,6 +296,7 @@ public class MavenCli
             populateRequest( cliRequest );
             encryption( cliRequest );
             repository( cliRequest );
+            profiles( cliRequest );
             return execute( cliRequest );
         }
         catch ( ExitException e )
@@ -670,6 +671,10 @@ public class MavenCli
 
                 request = executionRequestPopulator.populateDefaults( request );
 
+                profileSelector = container.lookup( ProfileSelector.class );
+
+                profiles( request );
+
                 BootstrapCoreExtensionManager resolver = container.lookup( BootstrapCoreExtensionManager.class
);
 
                 return Collections.unmodifiableList( resolver.loadCoreExtensions( request,
providedArtifacts,
@@ -866,9 +871,16 @@ public class MavenCli
         {
             cliRequest.request.setUseLegacyLocalRepository( true );
         }
+    }
 
-        // Adds repositories from settings profiles.
-        final MavenExecutionRequest request = cliRequest.getRequest();
+    private void profiles( final CliRequest request )
+    {
+        this.profiles( request.getRequest() );
+    }
+
+    private void profiles( final MavenExecutionRequest request )
+    {
+        // Adds repositories from profiles.
         final DefaultProfileActivationContext profileActivationContext = new DefaultProfileActivationContext();
         profileActivationContext.setActiveProfileIds( request.getActiveProfiles() );
         profileActivationContext.setInactiveProfileIds( request.getInactiveProfiles() );


Mime
View raw message