mirror of https://github.com/apache/maven.git
o Fixed explicit profile deactivation
git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@777246 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
40f654d529
commit
503cc60cc5
|
@ -715,6 +715,7 @@ public class DefaultMavenExecutionRequest
|
|||
projectBuildingConfiguration.setExecutionProperties( getProperties() );
|
||||
projectBuildingConfiguration.setRemoteRepositories( getRemoteRepositories() );
|
||||
projectBuildingConfiguration.setActiveProfileIds( getActiveProfiles() );
|
||||
projectBuildingConfiguration.setInactiveProfileIds( getInactiveProfiles() );
|
||||
projectBuildingConfiguration.setProfiles( getProfiles() );
|
||||
projectBuildingConfiguration.setProcessPlugins( true );
|
||||
}
|
||||
|
|
|
@ -120,10 +120,8 @@ public class DefaultMavenProjectBuilder
|
|||
|
||||
ProfileActivationContext profileActivationContext = new ProfileActivationContext( configuration.getExecutionProperties(), true );
|
||||
profileActivationContext.setExplicitlyActiveProfileIds( configuration.getActiveProfileIds() );
|
||||
if (configuration.getExecutionProperties() != null )
|
||||
{
|
||||
profileActivationContext.getExecutionProperties().putAll( configuration.getExecutionProperties() );
|
||||
}
|
||||
profileActivationContext.setExplicitlyInactiveProfileIds( configuration.getInactiveProfileIds() );
|
||||
|
||||
ProfileManager profileManager = new DefaultProfileManager( profileActivationContext );
|
||||
|
||||
try
|
||||
|
@ -483,7 +481,7 @@ public class DefaultMavenProjectBuilder
|
|||
|
||||
if ( validationResult.getMessageCount() > 0 )
|
||||
{
|
||||
for ( String s : (List<String>) validationResult.getMessages() )
|
||||
for ( String s : validationResult.getMessages() )
|
||||
{
|
||||
logger.error( s );
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ public class DefaultProjectBuilderConfiguration
|
|||
|
||||
private List<String> activeProfileIds;
|
||||
|
||||
private List<String> inactiveProfileIds;
|
||||
|
||||
private List<Profile> profiles;
|
||||
|
||||
public MavenProject getTopLevelProjectFromReactor()
|
||||
|
@ -121,6 +123,16 @@ public class DefaultProjectBuilderConfiguration
|
|||
this.activeProfileIds = activeProfileIds;
|
||||
}
|
||||
|
||||
public List<String> getInactiveProfileIds()
|
||||
{
|
||||
return inactiveProfileIds;
|
||||
}
|
||||
|
||||
public void setInactiveProfileIds( List<String> inactiveProfileIds )
|
||||
{
|
||||
this.inactiveProfileIds = inactiveProfileIds;
|
||||
}
|
||||
|
||||
public void setProfiles( List<Profile> profiles )
|
||||
{
|
||||
this.profiles = profiles;
|
||||
|
|
|
@ -37,6 +37,10 @@ public interface ProjectBuilderConfiguration
|
|||
void setActiveProfileIds( List<String> activeProfileIds );
|
||||
|
||||
List<String> getActiveProfileIds();
|
||||
|
||||
void setInactiveProfileIds( List<String> inactiveProfileIds );
|
||||
|
||||
List<String> getInactiveProfileIds();
|
||||
|
||||
/**
|
||||
* Add a {@link org.apache.maven.model.Profile} that has come from an external source. This may be from a custom configuration
|
||||
|
|
Loading…
Reference in New Issue