From 97e9f53ac321e27b05330ba7a9c55d7b509a05af Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Wed, 5 Mar 2008 04:56:46 +0000 Subject: [PATCH] [MNG-2234] activate profiles that are not present in the settings so that they can be defined in the POM git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@633766 13f79535-47bb-0310-9956-ffa450edef68 --- .../execution/DefaultMavenExecutionRequestPopulator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java b/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java index 6f98f842a5..0ce2c6f8b2 100644 --- a/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java +++ b/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java @@ -247,12 +247,12 @@ public class DefaultMavenExecutionRequestPopulator List settingsProfiles = settings.getProfiles(); + List settingsActiveProfileIds = settings.getActiveProfiles(); + + profileManager.explicitlyActivate( settingsActiveProfileIds ); + if ( ( settingsProfiles != null ) && !settingsProfiles.isEmpty() ) { - List settingsActiveProfileIds = settings.getActiveProfiles(); - - profileManager.explicitlyActivate( settingsActiveProfileIds ); - for ( Iterator it = settings.getProfiles().iterator(); it.hasNext(); ) { org.apache.maven.settings.Profile rawProfile = (org.apache.maven.settings.Profile) it.next();