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()
ModelBuildingRequestgetPomFile in interface ModelBuildingRequestnull if not applicable (i.e. when processing a POM from the
repository).public DefaultModelBuildingRequest setPomFile(File pomFile)
ModelBuildingRequestModelBuildingRequest.setModelSource(ModelSource) in combination with a
FileModelSource instead.setPomFile in interface ModelBuildingRequestpomFile - 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()
ModelBuildingRequestgetModelSource in interface ModelBuildingRequestnull if not set.public DefaultModelBuildingRequest setModelSource(ModelSource modelSource)
ModelBuildingRequestModelBuildingRequest.setModelSource(ModelSource) or
ModelBuildingRequest.setPomFile(File) must be set.setModelSource in interface ModelBuildingRequestmodelSource - The source of the POM to process, may be null.null.public int getValidationLevel()
ModelBuildingRequestgetValidationLevel in interface ModelBuildingRequestpublic DefaultModelBuildingRequest setValidationLevel(int validationLevel)
ModelBuildingRequestModelBuildingRequest.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 ModelBuildingRequestvalidationLevel - The level of validation to perform on processed models.null.public boolean isProcessPlugins()
ModelBuildingRequestisProcessPlugins in interface ModelBuildingRequesttrue if plugins should be processed, false otherwise.public DefaultModelBuildingRequest setProcessPlugins(boolean processPlugins)
ModelBuildingRequestsetProcessPlugins in interface ModelBuildingRequestprocessPlugins - true to enable plugin processing, false otherwise.null.public boolean isTwoPhaseBuilding()
ModelBuildingRequestisTwoPhaseBuilding in interface ModelBuildingRequesttrue if two-phase building is enabled, false if the model should be build in a single
step.public DefaultModelBuildingRequest setTwoPhaseBuilding(boolean twoPhaseBuilding)
ModelBuildingRequestsetTwoPhaseBuilding in interface ModelBuildingRequesttwoPhaseBuilding - true to enable two-phase building, false if the model should be build in
a single step.null.public boolean isLocationTracking()
ModelBuildingRequestisLocationTracking in interface ModelBuildingRequesttrue if location tracking is enabled, false otherwise.public DefaultModelBuildingRequest setLocationTracking(boolean locationTracking)
ModelBuildingRequestsetLocationTracking in interface ModelBuildingRequestlocationTracking - true to enable location tracking, false to disable it.null.public List<Profile> getProfiles()
ModelBuildingRequestgetProfiles in interface ModelBuildingRequestnull.public DefaultModelBuildingRequest setProfiles(List<Profile> profiles)
ModelBuildingRequestsetProfiles in interface ModelBuildingRequestprofiles - The external profiles that should be considered for model building, may be null.null.public List<String> getActiveProfileIds()
ModelBuildingRequestgetActiveProfileIds in interface ModelBuildingRequestnull.public DefaultModelBuildingRequest setActiveProfileIds(List<String> activeProfileIds)
ModelBuildingRequestsetActiveProfileIds in interface ModelBuildingRequestactiveProfileIds - The identifiers of those profiles to activate, may be null.null.public List<String> getInactiveProfileIds()
ModelBuildingRequestgetInactiveProfileIds in interface ModelBuildingRequestnull.public DefaultModelBuildingRequest setInactiveProfileIds(List<String> inactiveProfileIds)
ModelBuildingRequestsetInactiveProfileIds in interface ModelBuildingRequestinactiveProfileIds - The identifiers of those profiles to deactivate, may be null.null.public Properties getSystemProperties()
ModelBuildingRequestSystem.getProperties() and environment variables.getSystemProperties in interface ModelBuildingRequestnull.public DefaultModelBuildingRequest setSystemProperties(Properties systemProperties)
ModelBuildingRequestSystem.getProperties() and environment variables.setSystemProperties in interface ModelBuildingRequestsystemProperties - The system properties, may be null.null.public Properties getUserProperties()
ModelBuildingRequest-Dkey=value parameter on the command
line.getUserProperties in interface ModelBuildingRequestnull.public DefaultModelBuildingRequest setUserProperties(Properties userProperties)
ModelBuildingRequest-Dkey=value parameter on the command
line.setUserProperties in interface ModelBuildingRequestuserProperties - The user properties, may be null.null.public Date getBuildStartTime()
ModelBuildingRequestgetBuildStartTime in interface ModelBuildingRequestnull if unknown.public ModelBuildingRequest setBuildStartTime(Date buildStartTime)
ModelBuildingRequestsetBuildStartTime in interface ModelBuildingRequestbuildStartTime - The start time of the build, may be null.null.public ModelResolver getModelResolver()
ModelBuildingRequestgetModelResolver in interface ModelBuildingRequestnull if not set.public DefaultModelBuildingRequest setModelResolver(ModelResolver modelResolver)
ModelBuildingRequestsetModelResolver in interface ModelBuildingRequestmodelResolver - The model resolver to use, may be null.null.public ModelBuildingListener getModelBuildingListener()
ModelBuildingRequestgetModelBuildingListener in interface ModelBuildingRequestnull if none.public ModelBuildingRequest setModelBuildingListener(ModelBuildingListener modelBuildingListener)
ModelBuildingRequestsetModelBuildingListener in interface ModelBuildingRequestmodelBuildingListener - The model building listener to notify, may be null.null.public ModelCache getModelCache()
ModelBuildingRequestgetModelCache in interface ModelBuildingRequestnull if not set.public DefaultModelBuildingRequest setModelCache(ModelCache modelCache)
ModelBuildingRequestsetModelCache in interface ModelBuildingRequestmodelCache - The model cache to use, may be null.null.Copyright © 2001-2014 The Apache Software Foundation. All Rights Reserved.