Package org.apache.maven.model.building
Class DefaultModelBuildingRequest
java.lang.Object
org.apache.maven.model.building.DefaultModelBuildingRequest
- All Implemented Interfaces:
ModelBuildingRequest
@Deprecated(since="4.0.0")
public class DefaultModelBuildingRequest
extends Object
implements ModelBuildingRequest
Deprecated.
Collects settings that control building of effective models.
-
Field Summary
Fields inherited from interface org.apache.maven.model.building.ModelBuildingRequest
VALIDATION_LEVEL_MAVEN_2_0, VALIDATION_LEVEL_MAVEN_3_0, VALIDATION_LEVEL_MAVEN_3_1, VALIDATION_LEVEL_MAVEN_4_0, VALIDATION_LEVEL_MINIMAL, VALIDATION_LEVEL_STRICT
-
Constructor Summary
ConstructorDescriptionDeprecated.Creates an empty request.Deprecated.Creates a shallow copy of the specified request. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Gets the identifiers of those profiles that should be activated by explicit demand.Deprecated.Gets the start time of the build.Deprecated.Gets the file model to build (with profile activation).Deprecated.Gets the identifiers of those profiles that should be deactivated by explicit demand.Deprecated.Gets the model building listener to notify during the build process.Deprecated.Gets the model cache to use for reuse of previously built models.Deprecated.Gets the model resolver to use for resolution of mixins or parents that are not locally reachable from the project directory.Deprecated.Gets the source of the POM to process.Deprecated.Deprecated.Gets the POM file of the project to build.Deprecated.Gets the external profiles that should be considered for model building.Deprecated.Deprecated.Deprecated.Gets the system properties to use for interpolation and profile activation.Deprecated.Deprecated.Gets the user properties to use for interpolation and profile activation.int
Deprecated.Gets the level of validation to perform on processed models.Deprecated.boolean
Deprecated.Indicates whether the model should track the line/column number of the model source from which it was parsed.boolean
Deprecated.Indicates whether plugin executions and configurations should be processed.boolean
Deprecated.Indicates whether the model building should happen in two phases.setActiveProfileIds
(List<String> activeProfileIds) Deprecated.Sets the identifiers of those profiles that should be activated by explicit demand.setBuildStartTime
(Date buildStartTime) Deprecated.Sets the start time of the build.setFileModel
(Model fileModel) Deprecated.Set the file model with profile activationsetInactiveProfileIds
(List<String> inactiveProfileIds) Deprecated.Sets the identifiers of those profiles that should be deactivated by explicit demand.setLocationTracking
(boolean locationTracking) Deprecated.Enables/disables the tracking of line/column numbers for the model source being parsed.setModelBuildingListener
(ModelBuildingListener modelBuildingListener) Deprecated.Sets the model building listener to notify during the build process.setModelCache
(ModelCache modelCache) Deprecated.Sets the model cache to use for reuse of previously built models.setModelResolver
(ModelResolver modelResolver) Deprecated.Sets the model resolver to use for resolution of mixins or parents that are not locally reachable from the project directory.setModelSource
(ModelSource modelSource) Deprecated.Sets the source of the POM to process.setPomFile
(File pomFile) Deprecated.setPomPath
(Path pomPath) Deprecated.Sets the POM file of the project to build.setProcessPlugins
(boolean processPlugins) Deprecated.Controls the processing of plugin executions and configurations.setProfiles
(List<Profile> profiles) Deprecated.Sets the external profiles that should be considered for model building.setRawModel
(Model rawModel) Deprecated.setRootDirectory
(Path rootDirectory) Deprecated.setSystemProperties
(Properties systemProperties) Deprecated.Sets the system properties to use for interpolation and profile activation.setTransformerContextBuilder
(TransformerContextBuilder contextBuilder) Deprecated.setTwoPhaseBuilding
(boolean twoPhaseBuilding) Deprecated.Enables/disables two-phase building.setUserProperties
(Properties userProperties) Deprecated.Sets the user properties to use for interpolation and profile activation.setValidationLevel
(int validationLevel) Deprecated.Sets the level of validation to perform on processed models.setWorkspaceModelResolver
(WorkspaceModelResolver workspaceResolver) Deprecated.
-
Constructor Details
-
DefaultModelBuildingRequest
public DefaultModelBuildingRequest()Deprecated.Creates an empty request. -
DefaultModelBuildingRequest
Deprecated.Creates a shallow copy of the specified request.- Parameters:
request
- The request to copy, must not benull
.
-
-
Method Details
-
getPomFile
Deprecated.Description copied from interface:ModelBuildingRequest
Gets the POM file of the project to build.- Specified by:
getPomFile
in interfaceModelBuildingRequest
- Returns:
- The POM file of the project or
null
if not applicable (i.e. when processing a POM from the repository).
-
getPomPath
Deprecated.Description copied from interface:ModelBuildingRequest
Gets the POM file of the project to build.- Specified by:
getPomPath
in interfaceModelBuildingRequest
- Returns:
- The POM file of the project or
null
if not applicable (i.e. when processing a POM from the repository).
-
setPomFile
Deprecated.Description copied from interface:ModelBuildingRequest
Sets the POM file of the project to build. Note that providing the path to a POM file via this method will make the model builder operate in project mode. This mode is meant for effective models that are employed during the build process of a local project. Hence the effective model will support the notion of a project directory. To build the model for a POM from the repository, useModelBuildingRequest.setModelSource(ModelSource)
in combination with aFileModelSource
instead.- Specified by:
setPomFile
in interfaceModelBuildingRequest
- Parameters:
pomFile
- The POM file of the project to build the effective model for, may benull
to build the model of some POM from the repository.- Returns:
- This request, never
null
.
-
setPomPath
Deprecated.Description copied from interface:ModelBuildingRequest
Sets the POM file of the project to build. Note that providing the path to a POM file via this method will make the model builder operate in project mode. This mode is meant for effective models that are employed during the build process of a local project. Hence the effective model will support the notion of a project directory. To build the model for a POM from the repository, useModelBuildingRequest.setModelSource(ModelSource)
in combination with aFileModelSource
instead.- Specified by:
setPomPath
in interfaceModelBuildingRequest
- Parameters:
pomPath
- The POM file of the project to build the effective model for, may benull
to build the model of some POM from the repository.- Returns:
- This request, never
null
.
-
getModelSource
Deprecated.Description copied from interface:ModelBuildingRequest
Gets the source of the POM to process.- Specified by:
getModelSource
in interfaceModelBuildingRequest
- Returns:
- The source of the POM or
null
if not set.
-
setModelSource
Deprecated.Description copied from interface:ModelBuildingRequest
Sets the source of the POM to process. Eventually, eitherModelBuildingRequest.setModelSource(ModelSource)
orModelBuildingRequest.setPomPath(Path)
must be set.- Specified by:
setModelSource
in interfaceModelBuildingRequest
- Parameters:
modelSource
- The source of the POM to process, may benull
.- Returns:
- This request, never
null
.
-
getValidationLevel
public int getValidationLevel()Deprecated.Description copied from interface:ModelBuildingRequest
Gets the level of validation to perform on processed models.- Specified by:
getValidationLevel
in interfaceModelBuildingRequest
- Returns:
- The level of validation to perform on processed models.
-
setValidationLevel
Deprecated.Description copied from interface:ModelBuildingRequest
Sets the level of validation to perform on processed models. For building of projects,ModelBuildingRequest.VALIDATION_LEVEL_STRICT
should be used to ensure proper building. For the mere retrieval 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.- Specified by:
setValidationLevel
in interfaceModelBuildingRequest
- Parameters:
validationLevel
- The level of validation to perform on processed models.- Returns:
- This request, never
null
.
-
isProcessPlugins
public boolean isProcessPlugins()Deprecated.Description copied from interface:ModelBuildingRequest
Indicates whether plugin executions and configurations should be processed. If enabled, lifecycle-induced plugin executions will be injected into the model and common plugin configuration will be propagated to individual executions.- Specified by:
isProcessPlugins
in interfaceModelBuildingRequest
- Returns:
true
if plugins should be processed,false
otherwise.
-
setProcessPlugins
Deprecated.Description copied from interface:ModelBuildingRequest
Controls the processing of plugin executions and configurations.- Specified by:
setProcessPlugins
in interfaceModelBuildingRequest
- Parameters:
processPlugins
-true
to enable plugin processing,false
otherwise.- Returns:
- This request, never
null
.
-
isTwoPhaseBuilding
public boolean isTwoPhaseBuilding()Deprecated.Description copied from interface:ModelBuildingRequest
Indicates whether the model building should happen in two phases. If enabled, the initial invocation of the model builder will only produce an interim result which may be used to analyze inter-model dependencies before the final invocation of the model builder is performed.- Specified by:
isTwoPhaseBuilding
in interfaceModelBuildingRequest
- Returns:
true
if two-phase building is enabled,false
if the model should be build in a single step.
-
setTwoPhaseBuilding
Deprecated.Description copied from interface:ModelBuildingRequest
Enables/disables two-phase building. If enabled, the initial invocation of the model builder will only produce an interim result which may be used to analyze inter-model dependencies before the final invocation of the model builder is performed.- Specified by:
setTwoPhaseBuilding
in interfaceModelBuildingRequest
- Parameters:
twoPhaseBuilding
-true
to enable two-phase building,false
if the model should be build in a single step.- Returns:
- This request, never
null
.
-
isLocationTracking
public boolean isLocationTracking()Deprecated.Description copied from interface:ModelBuildingRequest
Indicates whether the model should track the line/column number of the model source from which it was parsed.- Specified by:
isLocationTracking
in interfaceModelBuildingRequest
- Returns:
true
if location tracking is enabled,false
otherwise.
-
setLocationTracking
Deprecated.Description copied from interface:ModelBuildingRequest
Enables/disables the tracking of line/column numbers for the model source being parsed. By default, input locations are not tracked.- Specified by:
setLocationTracking
in interfaceModelBuildingRequest
- Parameters:
locationTracking
-true
to enable location tracking,false
to disable it.- Returns:
- This request, never
null
.
-
getProfiles
Deprecated.Description copied from interface:ModelBuildingRequest
Gets the external profiles that should be considered for model building.- Specified by:
getProfiles
in interfaceModelBuildingRequest
- Returns:
- The external profiles that should be considered for model building, never
null
.
-
setProfiles
Deprecated.Description copied from interface:ModelBuildingRequest
Sets the external profiles that should be considered for model building.- Specified by:
setProfiles
in interfaceModelBuildingRequest
- Parameters:
profiles
- The external profiles that should be considered for model building, may benull
.- Returns:
- This request, never
null
.
-
getActiveProfileIds
Deprecated.Description copied from interface:ModelBuildingRequest
Gets the identifiers of those profiles that should be activated by explicit demand.- Specified by:
getActiveProfileIds
in interfaceModelBuildingRequest
- Returns:
- The identifiers of those profiles to activate, never
null
.
-
setActiveProfileIds
Deprecated.Description copied from interface:ModelBuildingRequest
Sets the identifiers of those profiles that should be activated by explicit demand.- Specified by:
setActiveProfileIds
in interfaceModelBuildingRequest
- Parameters:
activeProfileIds
- The identifiers of those profiles to activate, may benull
.- Returns:
- This request, never
null
.
-
getInactiveProfileIds
Deprecated.Description copied from interface:ModelBuildingRequest
Gets the identifiers of those profiles that should be deactivated by explicit demand.- Specified by:
getInactiveProfileIds
in interfaceModelBuildingRequest
- Returns:
- The identifiers of those profiles to deactivate, never
null
.
-
setInactiveProfileIds
Deprecated.Description copied from interface:ModelBuildingRequest
Sets the identifiers of those profiles that should be deactivated by explicit demand.- Specified by:
setInactiveProfileIds
in interfaceModelBuildingRequest
- Parameters:
inactiveProfileIds
- The identifiers of those profiles to deactivate, may benull
.- Returns:
- This request, never
null
.
-
getSystemProperties
Deprecated.Description copied from interface:ModelBuildingRequest
Gets the system properties to use for interpolation and profile activation. The system properties are collected from the runtime environment likeSystem.getProperties()
and environment variables.- Specified by:
getSystemProperties
in interfaceModelBuildingRequest
- Returns:
- The system properties, never
null
.
-
setSystemProperties
Deprecated.Description copied from interface:ModelBuildingRequest
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.- Specified by:
setSystemProperties
in interfaceModelBuildingRequest
- Parameters:
systemProperties
- The system properties, may benull
.- Returns:
- This request, never
null
.
-
getUserProperties
Deprecated.Description copied from interface:ModelBuildingRequest
Gets 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=value
parameter on the command line.- Specified by:
getUserProperties
in interfaceModelBuildingRequest
- Returns:
- The user properties, never
null
.
-
setUserProperties
Deprecated.Description copied from interface:ModelBuildingRequest
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=value
parameter on the command line.- Specified by:
setUserProperties
in interfaceModelBuildingRequest
- Parameters:
userProperties
- The user properties, may benull
.- Returns:
- This request, never
null
.
-
getBuildStartTime
Deprecated.Description copied from interface:ModelBuildingRequest
Gets the start time of the build.- Specified by:
getBuildStartTime
in interfaceModelBuildingRequest
- Returns:
- The start time of the build or
null
if unknown.
-
setBuildStartTime
Deprecated.Description copied from interface:ModelBuildingRequest
Sets the start time of the build.- Specified by:
setBuildStartTime
in interfaceModelBuildingRequest
- Parameters:
buildStartTime
- The start time of the build, may benull
.- Returns:
- This request, never
null
.
-
getModelResolver
Deprecated.Description copied from interface:ModelBuildingRequest
Gets the model resolver to use for resolution of mixins or parents that are not locally reachable from the project directory.- Specified by:
getModelResolver
in interfaceModelBuildingRequest
- Returns:
- The model resolver or
null
if not set.
-
setModelResolver
Deprecated.Description copied from interface:ModelBuildingRequest
Sets the model resolver to use for resolution of mixins or parents that are not locally reachable from the project directory.- Specified by:
setModelResolver
in interfaceModelBuildingRequest
- Parameters:
modelResolver
- The model resolver to use, nevernull
.- Returns:
- This request, never
null
.
-
getModelBuildingListener
Deprecated.Description copied from interface:ModelBuildingRequest
Gets the model building listener to notify during the build process.- Specified by:
getModelBuildingListener
in interfaceModelBuildingRequest
- Returns:
- The model building listener to notify or
null
if none.
-
setModelBuildingListener
Deprecated.Description copied from interface:ModelBuildingRequest
Sets the model building listener to notify during the build process.- Specified by:
setModelBuildingListener
in interfaceModelBuildingRequest
- Parameters:
modelBuildingListener
- The model building listener to notify, may benull
.- Returns:
- This request, never
null
.
-
getModelCache
Deprecated.Description copied from interface:ModelBuildingRequest
Gets the model cache to use for reuse of previously built models.- Specified by:
getModelCache
in interfaceModelBuildingRequest
- Returns:
- The model cache or
null
if not set.
-
setModelCache
Deprecated.Description copied from interface:ModelBuildingRequest
Sets the model cache to use for reuse of previously built models. This is an optional component that serves performance optimizations.- Specified by:
setModelCache
in interfaceModelBuildingRequest
- Parameters:
modelCache
- The model cache to use, may benull
.- Returns:
- This request, never
null
.
-
getFileModel
Deprecated.Description copied from interface:ModelBuildingRequest
Gets the file model to build (with profile activation). If not set, model source will be used to load file model.- Specified by:
getFileModel
in interfaceModelBuildingRequest
- Returns:
- The file model to build or
null
if not set.
-
setFileModel
Deprecated.Description copied from interface:ModelBuildingRequest
Set the file model with profile activation- Specified by:
setFileModel
in interfaceModelBuildingRequest
- Returns:
- This request, never
null
.
-
getRawModel
Deprecated.- Specified by:
getRawModel
in interfaceModelBuildingRequest
-
setRawModel
Deprecated.- Specified by:
setRawModel
in interfaceModelBuildingRequest
-
getWorkspaceModelResolver
Deprecated.- Specified by:
getWorkspaceModelResolver
in interfaceModelBuildingRequest
-
setWorkspaceModelResolver
Deprecated.- Specified by:
setWorkspaceModelResolver
in interfaceModelBuildingRequest
-
getTransformerContextBuilder
Deprecated.- Specified by:
getTransformerContextBuilder
in interfaceModelBuildingRequest
-
setTransformerContextBuilder
Deprecated.- Specified by:
setTransformerContextBuilder
in interfaceModelBuildingRequest
-
getRootDirectory
Deprecated.- Specified by:
getRootDirectory
in interfaceModelBuildingRequest
-
setRootDirectory
Deprecated.- Specified by:
setRootDirectory
in interfaceModelBuildingRequest
-
ModelBuilder
instead