Package org.apache.maven.profiles
Class DefaultProfileManager
- java.lang.Object
-
- org.apache.maven.profiles.DefaultProfileManager
-
- All Implemented Interfaces:
ProfileManager
public class DefaultProfileManager extends java.lang.Object implements ProfileManager
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ListactivatedIdsprivate org.codehaus.plexus.PlexusContainercontainerprivate java.util.ListdeactivatedIdsprivate java.util.ListdefaultIdsprivate java.util.MapprofilesByIdprivate java.util.PropertiesrequestProperties
-
Constructor Summary
Constructors Constructor Description DefaultProfileManager(org.codehaus.plexus.PlexusContainer container)Deprecated.without passing in the system properties, the SystemPropertiesProfileActivator will not work correctly in embedded envirnments.DefaultProfileManager(org.codehaus.plexus.PlexusContainer container, java.util.Properties props)the properties passed to the profile manager are the props that are passed to maven, possibly containing profile activator propertiesDefaultProfileManager(org.codehaus.plexus.PlexusContainer container, Settings settings)Deprecated.without passing in the system properties, the SystemPropertiesProfileActivator will not work correctly in embedded envirnments.DefaultProfileManager(org.codehaus.plexus.PlexusContainer container, Settings settings, java.util.Properties props)the properties passed to the profile manager are the props that are passed to maven, possibly containing profile activator properties
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivateAsDefault(java.lang.String profileId)voidaddProfile(Profile profile)voidaddProfiles(java.util.List profiles)voidexplicitlyActivate(java.lang.String profileId)voidexplicitlyActivate(java.util.List profileIds)voidexplicitlyDeactivate(java.lang.String profileId)voidexplicitlyDeactivate(java.util.List profileIds)java.util.ListgetActiveProfiles()java.util.ListgetExplicitlyActivatedIds()java.util.ListgetExplicitlyDeactivatedIds()java.util.ListgetIdsActivatedByDefault()java.util.MapgetProfilesById()java.util.PropertiesgetRequestProperties()private booleanisActive(Profile profile)voidloadSettingsProfiles(Settings settings)
-
-
-
Field Detail
-
container
private org.codehaus.plexus.PlexusContainer container
-
activatedIds
private java.util.List activatedIds
-
deactivatedIds
private java.util.List deactivatedIds
-
defaultIds
private java.util.List defaultIds
-
profilesById
private java.util.Map profilesById
-
requestProperties
private java.util.Properties requestProperties
-
-
Constructor Detail
-
DefaultProfileManager
public DefaultProfileManager(org.codehaus.plexus.PlexusContainer container)
Deprecated.without passing in the system properties, the SystemPropertiesProfileActivator will not work correctly in embedded envirnments.
-
DefaultProfileManager
public DefaultProfileManager(org.codehaus.plexus.PlexusContainer container, java.util.Properties props)the properties passed to the profile manager are the props that are passed to maven, possibly containing profile activator properties
-
DefaultProfileManager
public DefaultProfileManager(org.codehaus.plexus.PlexusContainer container, Settings settings)Deprecated.without passing in the system properties, the SystemPropertiesProfileActivator will not work correctly in embedded envirnments.
-
DefaultProfileManager
public DefaultProfileManager(org.codehaus.plexus.PlexusContainer container, Settings settings, java.util.Properties props)the properties passed to the profile manager are the props that are passed to maven, possibly containing profile activator properties
-
-
Method Detail
-
getRequestProperties
public java.util.Properties getRequestProperties()
- Specified by:
getRequestPropertiesin interfaceProfileManager
-
getProfilesById
public java.util.Map getProfilesById()
- Specified by:
getProfilesByIdin interfaceProfileManager
-
addProfile
public void addProfile(Profile profile)
- Specified by:
addProfilein interfaceProfileManager
-
explicitlyActivate
public void explicitlyActivate(java.lang.String profileId)
- Specified by:
explicitlyActivatein interfaceProfileManager
-
explicitlyActivate
public void explicitlyActivate(java.util.List profileIds)
- Specified by:
explicitlyActivatein interfaceProfileManager
-
explicitlyDeactivate
public void explicitlyDeactivate(java.lang.String profileId)
- Specified by:
explicitlyDeactivatein interfaceProfileManager
-
explicitlyDeactivate
public void explicitlyDeactivate(java.util.List profileIds)
- Specified by:
explicitlyDeactivatein interfaceProfileManager
-
getActiveProfiles
public java.util.List getActiveProfiles() throws ProfileActivationException- Specified by:
getActiveProfilesin interfaceProfileManager- Throws:
ProfileActivationException
-
isActive
private boolean isActive(Profile profile) throws ProfileActivationException
- Throws:
ProfileActivationException
-
addProfiles
public void addProfiles(java.util.List profiles)
- Specified by:
addProfilesin interfaceProfileManager
-
activateAsDefault
public void activateAsDefault(java.lang.String profileId)
- Specified by:
activateAsDefaultin interfaceProfileManager
-
getExplicitlyActivatedIds
public java.util.List getExplicitlyActivatedIds()
- Specified by:
getExplicitlyActivatedIdsin interfaceProfileManager
-
getExplicitlyDeactivatedIds
public java.util.List getExplicitlyDeactivatedIds()
- Specified by:
getExplicitlyDeactivatedIdsin interfaceProfileManager
-
getIdsActivatedByDefault
public java.util.List getIdsActivatedByDefault()
- Specified by:
getIdsActivatedByDefaultin interfaceProfileManager
-
loadSettingsProfiles
public void loadSettingsProfiles(Settings settings)
- Specified by:
loadSettingsProfilesin interfaceProfileManager
-
-