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.
use org.apache.maven.api.services.ModelBuilder instead
Collects settings that control building of effective models.
  • Constructor Details

    • DefaultModelBuildingRequest

      public DefaultModelBuildingRequest()
      Deprecated.
      Creates an empty request.
    • DefaultModelBuildingRequest

      public DefaultModelBuildingRequest(ModelBuildingRequest request)
      Deprecated.
      Creates a shallow copy of the specified request.
      Parameters:
      request - The request to copy, must not be null.
  • Method Details

    • getPomFile

      public File getPomFile()
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Gets the POM file of the project to build.
      Specified by:
      getPomFile in interface ModelBuildingRequest
      Returns:
      The POM file of the project or null if not applicable (i.e. when processing a POM from the repository).
    • setPomFile

      public DefaultModelBuildingRequest setPomFile(File pomFile)
      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, use ModelBuildingRequest.setModelSource(ModelSource) in combination with a FileModelSource instead.
      Specified by:
      setPomFile in interface ModelBuildingRequest
      Parameters:
      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.
      Returns:
      This request, never null.
    • getModelSource

      public ModelSource getModelSource()
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Gets the source of the POM to process.
      Specified by:
      getModelSource in interface ModelBuildingRequest
      Returns:
      The source of the POM or null if not set.
    • setModelSource

      public DefaultModelBuildingRequest setModelSource(ModelSource modelSource)
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Sets the source of the POM to process. Eventually, either ModelBuildingRequest.setModelSource(ModelSource) or ModelBuildingRequest.setPomFile(File) must be set.
      Specified by:
      setModelSource in interface ModelBuildingRequest
      Parameters:
      modelSource - The source of the POM to process, may be null.
      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 interface ModelBuildingRequest
      Returns:
      The level of validation to perform on processed models.
    • setValidationLevel

      public DefaultModelBuildingRequest setValidationLevel(int validationLevel)
      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 interface ModelBuildingRequest
      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 interface ModelBuildingRequest
      Returns:
      true if plugins should be processed, false otherwise.
    • setProcessPlugins

      public DefaultModelBuildingRequest setProcessPlugins(boolean processPlugins)
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Controls the processing of plugin executions and configurations.
      Specified by:
      setProcessPlugins in interface ModelBuildingRequest
      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 interface ModelBuildingRequest
      Returns:
      true if two-phase building is enabled, false if the model should be built in a single step.
    • setTwoPhaseBuilding

      public DefaultModelBuildingRequest setTwoPhaseBuilding(boolean twoPhaseBuilding)
      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 interface ModelBuildingRequest
      Parameters:
      twoPhaseBuilding - true to enable two-phase building, false if the model should be built 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 interface ModelBuildingRequest
      Returns:
      true if location tracking is enabled, false otherwise.
    • setLocationTracking

      public DefaultModelBuildingRequest setLocationTracking(boolean locationTracking)
      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 interface ModelBuildingRequest
      Parameters:
      locationTracking - true to enable location tracking, false to disable it.
      Returns:
      This request, never null.
    • getProfiles

      public List<org.apache.maven.model.Profile> getProfiles()
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Gets the external profiles that should be considered for model building.
      Specified by:
      getProfiles in interface ModelBuildingRequest
      Returns:
      The external profiles that should be considered for model building, never null.
    • setProfiles

      public DefaultModelBuildingRequest setProfiles(List<org.apache.maven.model.Profile> profiles)
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Sets the external profiles that should be considered for model building.
      Specified by:
      setProfiles in interface ModelBuildingRequest
      Parameters:
      profiles - The external profiles that should be considered for model building, may be null.
      Returns:
      This request, never null.
    • getActiveProfileIds

      public List<String> getActiveProfileIds()
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Gets the identifiers of those profiles that should be activated by explicit demand.
      Specified by:
      getActiveProfileIds in interface ModelBuildingRequest
      Returns:
      The identifiers of those profiles to activate, never null.
    • setActiveProfileIds

      public DefaultModelBuildingRequest setActiveProfileIds(List<String> activeProfileIds)
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Sets the identifiers of those profiles that should be activated by explicit demand.
      Specified by:
      setActiveProfileIds in interface ModelBuildingRequest
      Parameters:
      activeProfileIds - The identifiers of those profiles to activate, may be null.
      Returns:
      This request, never null.
    • getInactiveProfileIds

      public List<String> getInactiveProfileIds()
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Gets the identifiers of those profiles that should be deactivated by explicit demand.
      Specified by:
      getInactiveProfileIds in interface ModelBuildingRequest
      Returns:
      The identifiers of those profiles to deactivate, never null.
    • setInactiveProfileIds

      public DefaultModelBuildingRequest setInactiveProfileIds(List<String> inactiveProfileIds)
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Sets the identifiers of those profiles that should be deactivated by explicit demand.
      Specified by:
      setInactiveProfileIds in interface ModelBuildingRequest
      Parameters:
      inactiveProfileIds - The identifiers of those profiles to deactivate, may be null.
      Returns:
      This request, never null.
    • getSystemProperties

      public Properties 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 like System.getProperties() and environment variables.
      Specified by:
      getSystemProperties in interface ModelBuildingRequest
      Returns:
      The system properties, never null.
    • setSystemProperties

      public DefaultModelBuildingRequest setSystemProperties(Properties systemProperties)
      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 like System.getProperties() and environment variables.
      Specified by:
      setSystemProperties in interface ModelBuildingRequest
      Parameters:
      systemProperties - The system properties, may be null.
      Returns:
      This request, never null.
    • getUserProperties

      public Properties 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 interface ModelBuildingRequest
      Returns:
      The user properties, never null.
    • setUserProperties

      public DefaultModelBuildingRequest setUserProperties(Properties userProperties)
      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 interface ModelBuildingRequest
      Parameters:
      userProperties - The user properties, may be null.
      Returns:
      This request, never null.
    • getBuildStartTime

      public Date getBuildStartTime()
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Gets the start time of the build.
      Specified by:
      getBuildStartTime in interface ModelBuildingRequest
      Returns:
      The start time of the build or null if unknown.
    • setBuildStartTime

      public ModelBuildingRequest setBuildStartTime(Date buildStartTime)
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Sets the start time of the build.
      Specified by:
      setBuildStartTime in interface ModelBuildingRequest
      Parameters:
      buildStartTime - The start time of the build, may be null.
      Returns:
      This request, never null.
    • getModelResolver

      public ModelResolver 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 interface ModelBuildingRequest
      Returns:
      The model resolver or null if not set.
    • setModelResolver

      public DefaultModelBuildingRequest setModelResolver(ModelResolver modelResolver)
      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 interface ModelBuildingRequest
      Parameters:
      modelResolver - The model resolver to use, never null.
      Returns:
      This request, never null.
    • getModelBuildingListener

      public ModelBuildingListener getModelBuildingListener()
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Gets the model building listener to notify during the build process.
      Specified by:
      getModelBuildingListener in interface ModelBuildingRequest
      Returns:
      The model building listener to notify or null if none.
    • setModelBuildingListener

      public ModelBuildingRequest setModelBuildingListener(ModelBuildingListener modelBuildingListener)
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Sets the model building listener to notify during the build process.
      Specified by:
      setModelBuildingListener in interface ModelBuildingRequest
      Parameters:
      modelBuildingListener - The model building listener to notify, may be null.
      Returns:
      This request, never null.
    • getModelCache

      public ModelCache getModelCache()
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Gets the model cache to use for reuse of previously built models.
      Specified by:
      getModelCache in interface ModelBuildingRequest
      Returns:
      The model cache or null if not set.
    • setModelCache

      public DefaultModelBuildingRequest setModelCache(ModelCache modelCache)
      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 interface ModelBuildingRequest
      Parameters:
      modelCache - The model cache to use, may be null.
      Returns:
      This request, never null.
    • getRawModel

      public org.apache.maven.model.Model getRawModel()
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Gets the raw model to build. If not set, model source will be used to load raw model.
      Specified by:
      getRawModel in interface ModelBuildingRequest
      Returns:
      The raw model to build or null if not set.
    • setRawModel

      public ModelBuildingRequest setRawModel(org.apache.maven.model.Model rawModel)
      Deprecated.
      Description copied from interface: ModelBuildingRequest
      Set raw model.
      Specified by:
      setRawModel in interface ModelBuildingRequest
    • getWorkspaceModelResolver

      public WorkspaceModelResolver getWorkspaceModelResolver()
      Deprecated.
      Specified by:
      getWorkspaceModelResolver in interface ModelBuildingRequest
    • setWorkspaceModelResolver

      public ModelBuildingRequest setWorkspaceModelResolver(WorkspaceModelResolver workspaceResolver)
      Deprecated.
      Specified by:
      setWorkspaceModelResolver in interface ModelBuildingRequest