public class DefaultModelBuildingRequest extends Object implements ModelBuildingRequest
VALIDATION_LEVEL_MAVEN_2_0, VALIDATION_LEVEL_MAVEN_3_0, VALIDATION_LEVEL_MAVEN_3_1, VALIDATION_LEVEL_MINIMAL, VALIDATION_LEVEL_STRICT
Constructor and Description |
---|
DefaultModelBuildingRequest()
Creates an empty request.
|
DefaultModelBuildingRequest(ModelBuildingRequest request)
Creates a shallow copy of the specified request.
|
Modifier and Type | Method and Description |
---|---|
List<String> |
getActiveProfileIds()
Gets the identifiers of those profiles that should be activated by explicit demand.
|
Date |
getBuildStartTime()
Gets the start time of the build.
|
List<String> |
getInactiveProfileIds()
Gets the identifiers of those profiles that should be deactivated by explicit demand.
|
ModelBuildingListener |
getModelBuildingListener()
Gets the model building listener to notify during the build process.
|
ModelCache |
getModelCache()
Gets the model cache to use for reuse of previously built models.
|
ModelResolver |
getModelResolver()
Gets the model resolver to use for resolution of mixins or parents that are not locally reachable from the
project directory.
|
ModelSource |
getModelSource()
Gets the source of the POM to process.
|
File |
getPomFile()
Gets the POM file of the project to build.
|
List<Profile> |
getProfiles()
Gets the external profiles that should be considered for model building.
|
Properties |
getSystemProperties()
Gets the system properties to use for interpolation and profile activation.
|
Properties |
getUserProperties()
Gets the user properties to use for interpolation and profile activation.
|
int |
getValidationLevel()
Gets the level of validation to perform on processed models.
|
boolean |
isLocationTracking()
Indicates whether the model should track the line/column number of the model source from which it was parsed.
|
boolean |
isProcessPlugins()
Indicates whether plugin executions and configurations should be processed.
|
boolean |
isTwoPhaseBuilding()
Indicates whether the model building should happen in two phases.
|
DefaultModelBuildingRequest |
setActiveProfileIds(List<String> activeProfileIds)
Sets the identifiers of those profiles that should be activated by explicit demand.
|
ModelBuildingRequest |
setBuildStartTime(Date buildStartTime)
Sets the start time of the build.
|
DefaultModelBuildingRequest |
setInactiveProfileIds(List<String> inactiveProfileIds)
Sets the identifiers of those profiles that should be deactivated by explicit demand.
|
DefaultModelBuildingRequest |
setLocationTracking(boolean locationTracking)
Enables/disables the tracking of line/column numbers for the model source being parsed.
|
ModelBuildingRequest |
setModelBuildingListener(ModelBuildingListener modelBuildingListener)
Sets the model building listener to notify during the build process.
|
DefaultModelBuildingRequest |
setModelCache(ModelCache modelCache)
Sets the model cache to use for reuse of previously built models.
|
DefaultModelBuildingRequest |
setModelResolver(ModelResolver modelResolver)
Sets the model resolver to use for resolution of mixins or parents that are not locally reachable from the
project directory.
|
DefaultModelBuildingRequest |
setModelSource(ModelSource modelSource)
Sets the source of the POM to process.
|
DefaultModelBuildingRequest |
setPomFile(File pomFile)
Sets the POM file of the project to build.
|
DefaultModelBuildingRequest |
setProcessPlugins(boolean processPlugins)
Controls the processing of plugin executions and configurations.
|
DefaultModelBuildingRequest |
setProfiles(List<Profile> profiles)
Sets the external profiles that should be considered for model building.
|
DefaultModelBuildingRequest |
setSystemProperties(Properties systemProperties)
Sets the system properties to use for interpolation and profile activation.
|
DefaultModelBuildingRequest |
setTwoPhaseBuilding(boolean twoPhaseBuilding)
Enables/disables two-phase building.
|
DefaultModelBuildingRequest |
setUserProperties(Properties userProperties)
Sets the user properties to use for interpolation and profile activation.
|
DefaultModelBuildingRequest |
setValidationLevel(int validationLevel)
Sets the level of validation to perform on processed models.
|
public DefaultModelBuildingRequest()
public DefaultModelBuildingRequest(ModelBuildingRequest request)
request
- The request to copy, must not be null
.public File getPomFile()
ModelBuildingRequest
getPomFile
in interface ModelBuildingRequest
null
if not applicable (i.e. when processing a POM from the
repository).public DefaultModelBuildingRequest setPomFile(File pomFile)
ModelBuildingRequest
ModelBuildingRequest.setModelSource(ModelSource)
in combination with a
FileModelSource
instead.setPomFile
in interface ModelBuildingRequest
pomFile
- The POM file of the project to build the effective model for, may be null
to build the
model of some POM from the repository.null
.public ModelSource getModelSource()
ModelBuildingRequest
getModelSource
in interface ModelBuildingRequest
null
if not set.public DefaultModelBuildingRequest setModelSource(ModelSource modelSource)
ModelBuildingRequest
ModelBuildingRequest.setModelSource(ModelSource)
or
ModelBuildingRequest.setPomFile(File)
must be set.setModelSource
in interface ModelBuildingRequest
modelSource
- The source of the POM to process, may be null
.null
.public int getValidationLevel()
ModelBuildingRequest
getValidationLevel
in interface ModelBuildingRequest
public DefaultModelBuildingRequest setValidationLevel(int validationLevel)
ModelBuildingRequest
ModelBuildingRequest.VALIDATION_LEVEL_STRICT
should be used to ensure proper building. For the mere retrievel of dependencies
during artifact resolution, ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL
should be used to account for models of poor
quality. By default, models are validated in strict mode.setValidationLevel
in interface ModelBuildingRequest
validationLevel
- The level of validation to perform on processed models.null
.public boolean isProcessPlugins()
ModelBuildingRequest
isProcessPlugins
in interface ModelBuildingRequest
true
if plugins should be processed, false
otherwise.public DefaultModelBuildingRequest setProcessPlugins(boolean processPlugins)
ModelBuildingRequest
setProcessPlugins
in interface ModelBuildingRequest
processPlugins
- true
to enable plugin processing, false
otherwise.null
.public boolean isTwoPhaseBuilding()
ModelBuildingRequest
isTwoPhaseBuilding
in interface ModelBuildingRequest
true
if two-phase building is enabled, false
if the model should be build in a single
step.public DefaultModelBuildingRequest setTwoPhaseBuilding(boolean twoPhaseBuilding)
ModelBuildingRequest
setTwoPhaseBuilding
in interface ModelBuildingRequest
twoPhaseBuilding
- true
to enable two-phase building, false
if the model should be build in
a single step.null
.public boolean isLocationTracking()
ModelBuildingRequest
isLocationTracking
in interface ModelBuildingRequest
true
if location tracking is enabled, false
otherwise.public DefaultModelBuildingRequest setLocationTracking(boolean locationTracking)
ModelBuildingRequest
setLocationTracking
in interface ModelBuildingRequest
locationTracking
- true
to enable location tracking, false
to disable it.null
.public List<Profile> getProfiles()
ModelBuildingRequest
getProfiles
in interface ModelBuildingRequest
null
.public DefaultModelBuildingRequest setProfiles(List<Profile> profiles)
ModelBuildingRequest
setProfiles
in interface ModelBuildingRequest
profiles
- The external profiles that should be considered for model building, may be null
.null
.public List<String> getActiveProfileIds()
ModelBuildingRequest
getActiveProfileIds
in interface ModelBuildingRequest
null
.public DefaultModelBuildingRequest setActiveProfileIds(List<String> activeProfileIds)
ModelBuildingRequest
setActiveProfileIds
in interface ModelBuildingRequest
activeProfileIds
- The identifiers of those profiles to activate, may be null
.null
.public List<String> getInactiveProfileIds()
ModelBuildingRequest
getInactiveProfileIds
in interface ModelBuildingRequest
null
.public DefaultModelBuildingRequest setInactiveProfileIds(List<String> inactiveProfileIds)
ModelBuildingRequest
setInactiveProfileIds
in interface ModelBuildingRequest
inactiveProfileIds
- The identifiers of those profiles to deactivate, may be null
.null
.public Properties getSystemProperties()
ModelBuildingRequest
System.getProperties()
and environment variables.getSystemProperties
in interface ModelBuildingRequest
null
.public DefaultModelBuildingRequest setSystemProperties(Properties systemProperties)
ModelBuildingRequest
System.getProperties()
and environment variables.setSystemProperties
in interface ModelBuildingRequest
systemProperties
- The system properties, may be null
.null
.public Properties getUserProperties()
ModelBuildingRequest
-Dkey=value
parameter on the command
line.getUserProperties
in interface ModelBuildingRequest
null
.public DefaultModelBuildingRequest setUserProperties(Properties userProperties)
ModelBuildingRequest
-Dkey=value
parameter on the command
line.setUserProperties
in interface ModelBuildingRequest
userProperties
- The user properties, may be null
.null
.public Date getBuildStartTime()
ModelBuildingRequest
getBuildStartTime
in interface ModelBuildingRequest
null
if unknown.public ModelBuildingRequest setBuildStartTime(Date buildStartTime)
ModelBuildingRequest
setBuildStartTime
in interface ModelBuildingRequest
buildStartTime
- The start time of the build, may be null
.null
.public ModelResolver getModelResolver()
ModelBuildingRequest
getModelResolver
in interface ModelBuildingRequest
null
if not set.public DefaultModelBuildingRequest setModelResolver(ModelResolver modelResolver)
ModelBuildingRequest
setModelResolver
in interface ModelBuildingRequest
modelResolver
- The model resolver to use, may be null
.null
.public ModelBuildingListener getModelBuildingListener()
ModelBuildingRequest
getModelBuildingListener
in interface ModelBuildingRequest
null
if none.public ModelBuildingRequest setModelBuildingListener(ModelBuildingListener modelBuildingListener)
ModelBuildingRequest
setModelBuildingListener
in interface ModelBuildingRequest
modelBuildingListener
- The model building listener to notify, may be null
.null
.public ModelCache getModelCache()
ModelBuildingRequest
getModelCache
in interface ModelBuildingRequest
null
if not set.public DefaultModelBuildingRequest setModelCache(ModelCache modelCache)
ModelBuildingRequest
setModelCache
in interface ModelBuildingRequest
modelCache
- The model cache to use, may be null
.null
.Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.