o Added API docs

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@811372 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-09-04 12:49:47 +00:00
parent fa1baac34b
commit 504fbed09e
2 changed files with 22 additions and 0 deletions

View File

@ -56,6 +56,11 @@ public class DefaultMavenExecutionRequestPopulator
public MavenExecutionRequest populateFromSettings( MavenExecutionRequest request, Settings settings )
throws MavenEmbedderException
{
if ( settings == null )
{
return request;
}
request.setOffline( settings.isOffline() );
request.setInteractiveMode( settings.isInteractiveMode() );

View File

@ -31,9 +31,26 @@ import org.apache.maven.settings.Settings;
public 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.
*
* @param request The execution request to populate, must not be {@code null}.
* @param settings The settings to copy into the execution request, may be {@code null}.
* @return The populated execution request, never {@code null}.
* @throws MavenEmbedderException If the execution request could not be populated.
*/
MavenExecutionRequest populateFromSettings( MavenExecutionRequest request, Settings settings )
throws MavenEmbedderException;
/**
* Injects default values like plugin groups or repositories into the specified execution request.
*
* @param request The execution request to populate, must not be {@code null}.
* @return The populated execution request, never {@code null}.
* @throws MavenEmbedderException If the execution request could not be populated.
*/
MavenExecutionRequest populateDefaults( MavenExecutionRequest request )
throws MavenEmbedderException;