Package org.apache.maven.model.profile
Class DefaultProfileSelector
- java.lang.Object
-
- org.apache.maven.model.profile.DefaultProfileSelector
-
- All Implemented Interfaces:
ProfileSelector
@Named @Singleton public class DefaultProfileSelector extends java.lang.Object implements ProfileSelector
Calculates the active profiles among a given collection of profiles.- Author:
- Benjamin Bentmann
-
-
Constructor Summary
Constructors Constructor Description DefaultProfileSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultProfileSelectoraddProfileActivator(ProfileActivator profileActivator)java.util.List<org.apache.maven.model.Profile>getActiveProfiles(java.util.Collection<org.apache.maven.model.Profile> profiles, ProfileActivationContext context, ModelProblemCollector problems)Determines the profiles which are active in the specified activation context.
-
-
-
Method Detail
-
addProfileActivator
public DefaultProfileSelector addProfileActivator(ProfileActivator profileActivator)
-
getActiveProfiles
public java.util.List<org.apache.maven.model.Profile> getActiveProfiles(java.util.Collection<org.apache.maven.model.Profile> profiles, ProfileActivationContext context, ModelProblemCollector problems)Description copied from interface:ProfileSelectorDetermines the profiles which are active in the specified activation context. Active profiles will eventually be injected into the model.- Specified by:
getActiveProfilesin interfaceProfileSelector- Parameters:
profiles- The profiles whose activation status should be determined, must not benull.context- The environmental context used to determine the activation status of a profile, must not benull.problems- The container used to collect problems that were encountered, must not benull.- Returns:
- The profiles that have been activated, never
null.
-
-