Stop re-applying profiles to models that have already had profiles applied.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@497556 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2007-01-18 20:07:23 +00:00
parent 3e3b0fd239
commit 87226eab2e
1 changed files with 1 additions and 23 deletions

View File

@ -885,29 +885,7 @@ public class DefaultMavenProjectBuilder
{ {
Model model = project.getModel(); Model model = project.getModel();
List explicitlyActive; List activeProfiles = project.getActiveProfiles();
List explicitlyInactive;
if ( profileMgr != null )
{
explicitlyActive = profileMgr.getExplicitlyActivatedIds();
explicitlyInactive = profileMgr.getExplicitlyDeactivatedIds();
}
else
{
explicitlyActive = Collections.EMPTY_LIST;
explicitlyInactive = Collections.EMPTY_LIST;
}
List active = profileAdvisor.applyActivatedProfiles( model, projectDir, explicitlyActive, explicitlyInactive );
LinkedHashSet activated = new LinkedHashSet();
activated.addAll( project.getActiveProfiles() );
activated.addAll( active );
List activeProfiles = new ArrayList( activated );
project.setActiveProfiles( activeProfiles );
// TODO: Clean this up...we're using this to 'jump' the interpolation step for model properties not expressed in XML. // TODO: Clean this up...we're using this to 'jump' the interpolation step for model properties not expressed in XML.
// [BP] - Can this above comment be explained? // [BP] - Can this above comment be explained?