Fix for profile deactivation.

Submitted By: David Bernhard
Issue id: MNG-3545


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@656405 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Paul Gier 2008-05-14 20:22:22 +00:00
parent e28b62cbe7
commit e4602cb85a
1 changed files with 11 additions and 3 deletions

View File

@ -219,12 +219,12 @@ public class DefaultProfileManager
{
shouldAdd = true;
}
else if ( !profileActivationContext.isExplicitlyInactive( profileId ) && isActive( profile, profileActivationContext ) )
else if ( isActive( profile, profileActivationContext ) )
{
shouldAdd = true;
}
if ( shouldAdd )
if ( !profileActivationContext.isExplicitlyInactive( profileId ) && shouldAdd )
{
if ( "pom".equals( profile.getSource() ) )
{
@ -241,10 +241,18 @@ public class DefaultProfileManager
{
List defaultIds = profileActivationContext.getActiveByDefaultProfileIds();
List deactivatedIds = profileActivationContext.getExplicitlyInactiveProfileIds();
for ( Iterator it = defaultIds.iterator(); it.hasNext(); )
{
String profileId = (String) it.next();
// If this profile was excluded, don't add it back in
// Fixes MNG-3545
if (deactivatedIds.contains(profileId))
{
continue;
}
Profile profile = (Profile) profilesById.get( profileId );
if ( profile != null )