org.apache.maven.mae.MAEExecutionRequest Maven / Gradle / Ivy
The newest version!
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.mae;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.execution.ExecutionListener;
import org.apache.maven.execution.MavenExecutionRequest;
import org.apache.maven.model.Profile;
import org.apache.maven.project.ProjectBuildingRequest;
import org.apache.maven.settings.Mirror;
import org.apache.maven.settings.Proxy;
import org.apache.maven.settings.Server;
import org.apache.maven.settings.Settings;
import java.io.File;
import java.util.Date;
import java.util.List;
import java.util.Properties;
public interface MAEExecutionRequest
{
MAEExecutionRequest copyOf();
MavenExecutionRequest asMavenExecutionRequest();
MAEExecutionRequest setPasswordToEncrypt( final String password );
String getPasswordToEncyrpt();
MAEExecutionRequest setSettings( final Settings settings );
Settings getSettings();
// NOTE: Methods below are adapted from MavenExecutionRequest
// Base directory
MAEExecutionRequest setBaseDirectory( File basedir );
String getBaseDirectory();
// Timing (remove this)
MAEExecutionRequest setStartTime( Date start );
Date getStartTime();
// Goals
MAEExecutionRequest withPluginGoals( PluginGoal... goal );
MAEExecutionRequest withPluginGoal( PluginGoal goal );
MAEExecutionRequest setGoals( List goals );
List getGoals();
// Properties
/**
* Sets the system properties to use for interpolation and profile activation. The system properties are collected
* from the runtime environment like {@link System#getProperties()} and environment variables.
*
* @param systemProperties
* The system properties, may be {@code null}.
* @return This request, never {@code null}.
*/
MAEExecutionRequest setSystemProperties( Properties systemProperties );
MAEExecutionRequest setSystemProperty( String key, String value );
/**
* Gets the system properties to use for interpolation and profile activation. The system properties are collected
* from the runtime environment like {@link System#getProperties()} and environment variables.
*
* @return The system properties, never {@code null}.
*/
Properties getSystemProperties();
/**
* 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 {@code -Dkey=value} parameter on the command
* line.
*
* @param userProperties
* The user properties, may be {@code null}.
* @return This request, never {@code null}.
*/
MAEExecutionRequest setUserProperties( Properties userProperties );
MAEExecutionRequest setUserProperty( String key, String value );
/**
* 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 {@code -Dkey=value} parameter on the command
* line.
*
* @return The user properties, never {@code null}.
*/
Properties getUserProperties();
// Reactor
MAEExecutionRequest setReactorFailureBehavior( String failureBehavior );
String getReactorFailureBehavior();
MAEExecutionRequest setSelectedProjects( List projects );
List getSelectedProjects();
MAEExecutionRequest setResumeFrom( String project );
String getResumeFrom();
MAEExecutionRequest setMakeBehavior( String makeBehavior );
String getMakeBehavior();
MAEExecutionRequest setThreadCount( String threadCount );
String getThreadCount();
boolean isThreadConfigurationPresent();
MAEExecutionRequest setPerCoreThreadCount( boolean perCoreThreadCount );
boolean isPerCoreThreadCount();
// Recursive (really to just process the top-level POM)
MAEExecutionRequest setRecursive( boolean recursive );
boolean isRecursive();
MAEExecutionRequest setPom( File pom );
File getPom();
// Errors
MAEExecutionRequest setShowErrors( boolean showErrors );
boolean isShowErrors();
// Logging
MAEExecutionRequest setLoggingLevel( int loggingLevel );
int getLoggingLevel();
// Update snapshots
MAEExecutionRequest setUpdateSnapshots( boolean updateSnapshots );
boolean isUpdateSnapshots();
MAEExecutionRequest setNoSnapshotUpdates( boolean noSnapshotUpdates );
boolean isNoSnapshotUpdates();
// Checksum policy
MAEExecutionRequest setGlobalChecksumPolicy( String globalChecksumPolicy );
String getGlobalChecksumPolicy();
// Local repository
MAEExecutionRequest setLocalRepositoryPath( String localRepository );
MAEExecutionRequest setLocalRepositoryPath( File localRepository );
File getLocalRepositoryPath();
MAEExecutionRequest setLocalRepository( ArtifactRepository repository );
ArtifactRepository getLocalRepository();
// Interactive
MAEExecutionRequest setInteractiveMode( boolean interactive );
boolean isInteractiveMode();
// Offline
MAEExecutionRequest setOffline( boolean offline );
boolean isOffline();
// Profiles
List getProfiles();
MAEExecutionRequest addProfile( Profile profile );
MAEExecutionRequest setProfiles( List profiles );
MAEExecutionRequest addActiveProfile( String profile );
MAEExecutionRequest addActiveProfiles( List profiles );
MAEExecutionRequest setActiveProfiles( List profiles );
List getActiveProfiles();
MAEExecutionRequest addInactiveProfile( String profile );
MAEExecutionRequest addInactiveProfiles( List profiles );
MAEExecutionRequest setInactiveProfiles( List profiles );
List getInactiveProfiles();
// Proxies
List getProxies();
MAEExecutionRequest setProxies( List proxies );
MAEExecutionRequest addProxy( Proxy proxy );
// Servers
List getServers();
MAEExecutionRequest setServers( List servers );
MAEExecutionRequest addServer( Server server );
// Mirrors
List getMirrors();
MAEExecutionRequest setMirrors( List mirrors );
MAEExecutionRequest addMirror( Mirror mirror );
// Plugin groups
List getPluginGroups();
MAEExecutionRequest setPluginGroups( List pluginGroups );
MAEExecutionRequest addPluginGroup( String pluginGroup );
MAEExecutionRequest addPluginGroups( List pluginGroups );
boolean isProjectPresent();
MAEExecutionRequest setProjectPresent( boolean isProjectPresent );
File getUserSettingsFile();
MAEExecutionRequest setUserSettingsFile( File userSettingsFile );
File getGlobalSettingsFile();
MAEExecutionRequest setGlobalSettingsFile( File globalSettingsFile );
MAEExecutionRequest addRemoteRepository( ArtifactRepository repository );
MAEExecutionRequest addPluginArtifactRepository( ArtifactRepository repository );
/**
* Set a new list of remote repositories to use the execution request. This is necessary if you perform
* transformations on the remote repositories being used. For example if you replace existing repositories with
* mirrors then it's easier to just replace the whole list with a new list of transformed repositories.
*
* @param repositories
* @return
*/
MAEExecutionRequest setRemoteRepositories( List repositories );
List getRemoteRepositories();
MAEExecutionRequest setPluginArtifactRepositories( List repositories );
List getPluginArtifactRepositories();
File getUserToolchainsFile();
MAEExecutionRequest setUserToolchainsFile( File userToolchainsFile );
ExecutionListener getExecutionListener();
MAEExecutionRequest setExecutionListener( ExecutionListener executionListener );
ProjectBuildingRequest getProjectBuildingRequest();
}