[MNG-3732] [regression] project.getActiveProfiles() has not the same behaviour

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@745259 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-02-17 21:21:35 +00:00
parent 7ed4efcec0
commit 29df2bf1bf
1 changed files with 5 additions and 2 deletions

View File

@ -229,12 +229,15 @@ public class DefaultProfileAdvisor
if ( root != null ) if ( root != null )
{ {
List active = root.getActiveProfiles(); List<String> active = root.getActiveProfiles();
if ( ( active != null ) && !active.isEmpty() ) if ( ( active != null ) && !active.isEmpty() )
{ {
ProfileActivationContext ctx = profileManager.getProfileActivationContext(); ProfileActivationContext ctx = profileManager.getProfileActivationContext();
ctx.setExplicitlyActiveProfileIds( root.getActiveProfiles() ); for ( String profileId : active )
{
ctx.setActive( profileId );
}
} }
for ( Iterator it = root.getProfiles().iterator(); it.hasNext(); ) for ( Iterator it = root.getProfiles().iterator(); it.hasNext(); )