diff --git a/maven-project/src/main/java/org/apache/maven/profiles/build/DefaultProfileAdvisor.java b/maven-project/src/main/java/org/apache/maven/profiles/build/DefaultProfileAdvisor.java index 1d1433c625..1dc2e31e41 100644 --- a/maven-project/src/main/java/org/apache/maven/profiles/build/DefaultProfileAdvisor.java +++ b/maven-project/src/main/java/org/apache/maven/profiles/build/DefaultProfileAdvisor.java @@ -229,12 +229,15 @@ public class DefaultProfileAdvisor if ( root != null ) { - List active = root.getActiveProfiles(); + List active = root.getActiveProfiles(); if ( ( active != null ) && !active.isEmpty() ) { ProfileActivationContext ctx = profileManager.getProfileActivationContext(); - ctx.setExplicitlyActiveProfileIds( root.getActiveProfiles() ); + for ( String profileId : active ) + { + ctx.setActive( profileId ); + } } for ( Iterator it = root.getProfiles().iterator(); it.hasNext(); )