Package org.apache.maven.execution
Class DefaultMavenExecutionRequestPopulator
java.lang.Object
org.apache.maven.execution.DefaultMavenExecutionRequestPopulator
- All Implemented Interfaces:
MavenExecutionRequestPopulator
@Named
public class DefaultMavenExecutionRequestPopulator
extends Object
implements MavenExecutionRequestPopulator
Assists in populating an execution request for invocation of Maven.
-
Constructor Summary
ConstructorDescriptionDefaultMavenExecutionRequestPopulator
(MavenRepositorySystem repositorySystem) -
Method Summary
Modifier and TypeMethodDescriptionpopulateDefaults
(MavenExecutionRequest request) Injects default values like plugin groups or repositories into the specified execution request.populateFromSettings
(MavenExecutionRequest request, Settings settings) Deprecated.populateFromToolchains
(MavenExecutionRequest request, PersistedToolchains toolchains) Copies the values from the given toolchains into the specified execution request.
-
Constructor Details
-
DefaultMavenExecutionRequestPopulator
-
-
Method Details
-
populateFromToolchains
public MavenExecutionRequest populateFromToolchains(MavenExecutionRequest request, PersistedToolchains toolchains) throws MavenExecutionRequestPopulationException Description copied from interface:MavenExecutionRequestPopulator
Copies the values from the given toolchains into the specified execution request. This method will replace any existing values in the execution request that are controlled by the toolchains. Hence, it is expected that this method is called on a new/empty execution request before the caller mutates it to fit its needs.- Specified by:
populateFromToolchains
in interfaceMavenExecutionRequestPopulator
- Parameters:
request
- The execution request to populate, must not benull
.toolchains
- The toolchains to copy into the execution request, may benull
.- Returns:
- The populated execution request, never
null
. - Throws:
MavenExecutionRequestPopulationException
- If the execution request could not be populated.
-
populateDefaults
public MavenExecutionRequest populateDefaults(MavenExecutionRequest request) throws MavenExecutionRequestPopulationException Description copied from interface:MavenExecutionRequestPopulator
Injects default values like plugin groups or repositories into the specified execution request.- Specified by:
populateDefaults
in interfaceMavenExecutionRequestPopulator
- Parameters:
request
- The execution request to populate, must not benull
.- Returns:
- The populated execution request, never
null
. - Throws:
MavenExecutionRequestPopulationException
- If the execution request could not be populated.
-
populateFromSettings
@Deprecated public MavenExecutionRequest populateFromSettings(MavenExecutionRequest request, Settings settings) throws MavenExecutionRequestPopulationException Deprecated.Description copied from interface:MavenExecutionRequestPopulator
Copies the values from the given settings into the specified execution request. This method will replace any existing values in the execution request that are controlled by the settings. Hence, it is expected that this method is called on a new/empty execution request before the caller mutates it to fit its needs.- Specified by:
populateFromSettings
in interfaceMavenExecutionRequestPopulator
- Parameters:
request
- The execution request to populate, must not benull
.settings
- The settings to copy into the execution request, may benull
.- Returns:
- The populated execution request, never
null
. - Throws:
MavenExecutionRequestPopulationException
- If the execution request could not be populated.
-