Class DefaultProfileActivationContext
java.lang.Object
org.apache.maven.impl.model.DefaultProfileActivationContext
- All Implemented Interfaces:
org.apache.maven.api.services.model.ProfileActivationContext
public class DefaultProfileActivationContext
extends Object
implements org.apache.maven.api.services.model.ProfileActivationContext
Describes the environmental context used to determine the activation status of profiles.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultProfileActivationContext(org.apache.maven.api.services.model.PathTranslator pathTranslator, org.apache.maven.api.services.model.RootLocator rootLocator, org.apache.maven.api.services.Interpolator interpolator) DefaultProfileActivationContext(org.apache.maven.api.services.model.PathTranslator pathTranslator, org.apache.maven.api.services.model.RootLocator rootLocator, org.apache.maven.api.services.Interpolator interpolator, List<String> activeProfileIds, List<String> inactiveProfileIds, Map<String, String> systemProperties, Map<String, String> userProperties, org.apache.maven.api.model.Model model) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetModelProperty(String key) getSystemProperty(String key) getUserProperty(String key) interpolatePath(String path) booleanisProfileActive(String profileId) booleanisProfileInactive(String profileId) setModel(org.apache.maven.api.model.Model model) setSystemProperties(Map<String, String> systemProperties) Sets the system properties to use for interpolation and profile activation.setUserProperties(Map<String, String> userProperties) Sets the user properties to use for interpolation and profile activation.
-
Constructor Details
-
DefaultProfileActivationContext
public DefaultProfileActivationContext(org.apache.maven.api.services.model.PathTranslator pathTranslator, org.apache.maven.api.services.model.RootLocator rootLocator, org.apache.maven.api.services.Interpolator interpolator) -
DefaultProfileActivationContext
public DefaultProfileActivationContext(org.apache.maven.api.services.model.PathTranslator pathTranslator, org.apache.maven.api.services.model.RootLocator rootLocator, org.apache.maven.api.services.Interpolator interpolator, List<String> activeProfileIds, List<String> inactiveProfileIds, Map<String, String> systemProperties, Map<String, String> userProperties, org.apache.maven.api.model.Model model)
-
-
Method Details
-
isProfileActive
- Specified by:
isProfileActivein interfaceorg.apache.maven.api.services.model.ProfileActivationContext
-
isProfileInactive
- Specified by:
isProfileInactivein interfaceorg.apache.maven.api.services.model.ProfileActivationContext
-
getSystemProperty
-
setSystemProperties
Sets the system properties to use for interpolation and profile activation. The system properties are collected from the runtime environment likeSystem.getProperties()and environment variables.- Parameters:
systemProperties- The system properties, may benull.- Returns:
- This context, never
null.
-
getUserProperty
-
setUserProperties
Sets the user properties to use for interpolation and profile activation. The user properties have been configured directly by the user on his discretion, e.g. via the-Dkey=valueparameter on the command line.- Parameters:
userProperties- The user properties, may benull.- Returns:
- This context, never
null.
-
getModelArtifactId
- Specified by:
getModelArtifactIdin interfaceorg.apache.maven.api.services.model.ProfileActivationContext
-
getModelPackaging
- Specified by:
getModelPackagingin interfaceorg.apache.maven.api.services.model.ProfileActivationContext
-
getModelProperty
-
getModelBaseDirectory
- Specified by:
getModelBaseDirectoryin interfaceorg.apache.maven.api.services.model.ProfileActivationContext
-
doGetModelBaseDirectory
-
getModelRootDirectory
- Specified by:
getModelRootDirectoryin interfaceorg.apache.maven.api.services.model.ProfileActivationContext
-
setModel
-
interpolatePath
-
exists
public boolean exists(String path, boolean enableGlob) throws org.apache.maven.api.services.ModelBuilderException - Specified by:
existsin interfaceorg.apache.maven.api.services.model.ProfileActivationContext- Throws:
org.apache.maven.api.services.ModelBuilderException
-