Package org.apache.maven.project
Class DefaultProjectBuildingRequest
java.lang.Object
org.apache.maven.project.DefaultProjectBuildingRequest
- All Implemented Interfaces:
ProjectBuildingRequest
DefaultProjectBuildingRequest
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.maven.project.ProjectBuildingRequest
ProjectBuildingRequest.RepositoryMerging
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProfile
(Profile profile) Add aProfile
that has come from an external source.Gets the start time of the build.Deprecated.Gets the merge mode used to combine repositories declared in the POM with the repositories specified in this requestorg.eclipse.aether.RepositorySystemSession
Gets the system properties to use for interpolation and profile activation.Gets the user properties to use for interpolation and profile activation.int
Gets the level of validation to perform on processed models.boolean
boolean
boolean
Deprecated.This got added when implementing MNG-2199 and is no longer used.void
setActiveProfileIds
(List<String> activeProfileIds) Set any active profiles that theProjectBuilder
should consider while constructing aMavenProject
.void
setBuildStartInstant
(Instant buildStartTime) Sets the start time of the build.void
setBuildStartTime
(Date buildStartTime) Deprecated.void
setInactiveProfileIds
(List<String> inactiveProfileIds) setLocalRepository
(ArtifactRepository localRepository) setPluginArtifactRepositories
(List<ArtifactRepository> pluginArtifactRepositories) setProcessPlugins
(boolean processPlugins) void
setProfiles
(List<Profile> profiles) void
setProject
(MavenProject mavenProject) setRemoteRepositories
(List<ArtifactRepository> remoteRepositories) setRepositoryMerging
(ProjectBuildingRequest.RepositoryMerging repositoryMerging) Sets the merge mode used to combine repositories declared in the POM with the repositories specified in this request.setRepositorySession
(org.eclipse.aether.RepositorySystemSession repositorySession) setResolveDependencies
(boolean resolveDependencies) setResolveVersionRanges
(boolean value) Deprecated.This got added when implementing MNG-2199 and is no longer used.setSystemProperties
(Properties systemProperties) Sets the system properties to use for interpolation and profile activation.setUserProperties
(Properties userProperties) Sets the user properties to use for interpolation and profile activation.setValidationLevel
(int validationLevel) Controls the level of validation to perform on processed models.
-
Constructor Details
-
DefaultProjectBuildingRequest
public DefaultProjectBuildingRequest() -
DefaultProjectBuildingRequest
-
-
Method Details
-
getProject
- Specified by:
getProject
in interfaceProjectBuildingRequest
-
setProject
- Specified by:
setProject
in interfaceProjectBuildingRequest
-
setLocalRepository
- Specified by:
setLocalRepository
in interfaceProjectBuildingRequest
-
getLocalRepository
- Specified by:
getLocalRepository
in interfaceProjectBuildingRequest
-
getRemoteRepositories
- Specified by:
getRemoteRepositories
in interfaceProjectBuildingRequest
-
setRemoteRepositories
- Specified by:
setRemoteRepositories
in interfaceProjectBuildingRequest
-
getPluginArtifactRepositories
- Specified by:
getPluginArtifactRepositories
in interfaceProjectBuildingRequest
-
setPluginArtifactRepositories
public ProjectBuildingRequest setPluginArtifactRepositories(List<ArtifactRepository> pluginArtifactRepositories) - Specified by:
setPluginArtifactRepositories
in interfaceProjectBuildingRequest
-
getSystemProperties
Description copied from interface:ProjectBuildingRequest
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 interfaceProjectBuildingRequest
- Returns:
- The system properties, never
null
.
-
setSystemProperties
Description copied from interface:ProjectBuildingRequest
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 interfaceProjectBuildingRequest
- Parameters:
systemProperties
- The system properties, may benull
.- Returns:
- This request, never
null
.
-
getUserProperties
Description copied from interface:ProjectBuildingRequest
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 interfaceProjectBuildingRequest
- Returns:
- The user properties, never
null
.
-
setUserProperties
Description copied from interface:ProjectBuildingRequest
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 interfaceProjectBuildingRequest
- Parameters:
userProperties
- The user properties, may benull
.- Returns:
- This request, never
null
.
-
isProcessPlugins
public boolean isProcessPlugins()- Specified by:
isProcessPlugins
in interfaceProjectBuildingRequest
-
setProcessPlugins
- Specified by:
setProcessPlugins
in interfaceProjectBuildingRequest
-
setResolveDependencies
- Specified by:
setResolveDependencies
in interfaceProjectBuildingRequest
-
isResolveDependencies
public boolean isResolveDependencies()- Specified by:
isResolveDependencies
in interfaceProjectBuildingRequest
-
setResolveVersionRanges
Deprecated.This got added when implementing MNG-2199 and is no longer used. Commit 6cf9320942c34bc68205425ab696b1712ace9ba4 updated the way 'MavenProject' objects are initialized.- Specified by:
setResolveVersionRanges
in interfaceProjectBuildingRequest
- Since:
- 3.2.2
-
isResolveVersionRanges
Deprecated.This got added when implementing MNG-2199 and is no longer used. Commit 6cf9320942c34bc68205425ab696b1712ace9ba4 updated the way 'MavenProject' objects are initialized.- Specified by:
isResolveVersionRanges
in interfaceProjectBuildingRequest
- Since:
- 3.2.2
-
setValidationLevel
Description copied from interface:ProjectBuildingRequest
Controls the level of validation to perform on processed models. By default, models are validated in strict mode.- Specified by:
setValidationLevel
in interfaceProjectBuildingRequest
- Parameters:
validationLevel
- The level of validation to perform on processed models, e.g.ModelBuildingRequest.VALIDATION_LEVEL_STRICT
.- Returns:
- This configuration, never
null
.
-
getValidationLevel
public int getValidationLevel()Description copied from interface:ProjectBuildingRequest
Gets the level of validation to perform on processed models.- Specified by:
getValidationLevel
in interfaceProjectBuildingRequest
- Returns:
- The level of validation to perform on processed models.
-
getActiveProfileIds
- Specified by:
getActiveProfileIds
in interfaceProjectBuildingRequest
-
setActiveProfileIds
Description copied from interface:ProjectBuildingRequest
Set any active profiles that theProjectBuilder
should consider while constructing aMavenProject
.- Specified by:
setActiveProfileIds
in interfaceProjectBuildingRequest
-
getInactiveProfileIds
- Specified by:
getInactiveProfileIds
in interfaceProjectBuildingRequest
-
setInactiveProfileIds
- Specified by:
setInactiveProfileIds
in interfaceProjectBuildingRequest
-
setProfiles
- Specified by:
setProfiles
in interfaceProjectBuildingRequest
-
addProfile
Description copied from interface:ProjectBuildingRequest
Add aProfile
that has come from an external source. This may be from a custom configuration like the MavenCLI settings.xml file, or from a custom dialog in an IDE integration like M2Eclipse.- Specified by:
addProfile
in interfaceProjectBuildingRequest
-
getProfiles
- Specified by:
getProfiles
in interfaceProjectBuildingRequest
-
getBuildStartTime
Deprecated.Description copied from interface:ProjectBuildingRequest
Gets the start time of the build.- Specified by:
getBuildStartTime
in interfaceProjectBuildingRequest
- Returns:
- The start time of the build or
null
if unknown.
-
setBuildStartTime
Deprecated.Description copied from interface:ProjectBuildingRequest
Sets the start time of the build.- Specified by:
setBuildStartTime
in interfaceProjectBuildingRequest
- Parameters:
buildStartTime
- The start time of the build, may benull
.
-
getBuildStartInstant
Description copied from interface:ProjectBuildingRequest
Gets the start time of the build.- Specified by:
getBuildStartInstant
in interfaceProjectBuildingRequest
- Returns:
- The start time of the build or
null
if unknown.
-
setBuildStartInstant
Description copied from interface:ProjectBuildingRequest
Sets the start time of the build.- Specified by:
setBuildStartInstant
in interfaceProjectBuildingRequest
- Parameters:
buildStartTime
- The start time of the build, may benull
.
-
getRepositorySession
public org.eclipse.aether.RepositorySystemSession getRepositorySession()- Specified by:
getRepositorySession
in interfaceProjectBuildingRequest
-
setRepositorySession
public DefaultProjectBuildingRequest setRepositorySession(org.eclipse.aether.RepositorySystemSession repositorySession) - Specified by:
setRepositorySession
in interfaceProjectBuildingRequest
-
setRepositoryMerging
public DefaultProjectBuildingRequest setRepositoryMerging(ProjectBuildingRequest.RepositoryMerging repositoryMerging) Description copied from interface:ProjectBuildingRequest
Sets the merge mode used to combine repositories declared in the POM with the repositories specified in this request.- Specified by:
setRepositoryMerging
in interfaceProjectBuildingRequest
- Parameters:
repositoryMerging
- The repository merge mode, must not benull
.- Returns:
- This request for chaining, never
null
. - See Also:
-
getRepositoryMerging
Description copied from interface:ProjectBuildingRequest
Gets the merge mode used to combine repositories declared in the POM with the repositories specified in this request- Specified by:
getRepositoryMerging
in interfaceProjectBuildingRequest
- Returns:
- The merge mode, never
null
.
-