Package org.apache.maven.execution
Class SettingsAdapter
- java.lang.Object
-
- org.apache.maven.settings.TrackableBase
-
- org.apache.maven.settings.Settings
-
- org.apache.maven.execution.SettingsAdapter
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
class SettingsAdapter extends Settings
Adapt aMavenExecutionRequestto aSettingsobject for use in the Maven core. We want to make sure that what is ask for in the execution request overrides what is in the settings. The CLI feeds into an execution request so if a particular value is present in the execution request then we will take that over the value coming from the user settings.
-
-
Field Summary
Fields Modifier and Type Field Description private MavenExecutionRequestrequestprivate RuntimeInforuntimeInfo-
Fields inherited from class org.apache.maven.settings.TrackableBase
GLOBAL_LEVEL, USER_LEVEL
-
-
Constructor Summary
Constructors Constructor Description SettingsAdapter(MavenExecutionRequest request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>getActiveProfiles()Method getActiveProfiles.java.lang.StringgetLocalRepository()Get the local repository.
Default value is:${user.home}/.m2/repositoryjava.util.List<Mirror>getMirrors()Method getMirrors.java.util.List<java.lang.String>getPluginGroups()Method getPluginGroups.java.util.List<Profile>getProfiles()Method getProfiles.java.util.List<Proxy>getProxies()Method getProxies.java.util.List<Server>getServers()Method getServers.booleanisInteractiveMode()Get whether Maven should attempt to interact with the user for input.booleanisOffline()Get indicate whether maven should operate in offline mode full-time.-
Methods inherited from class org.apache.maven.settings.Settings
addActiveProfile, addMirror, addPluginGroup, addProfile, addProxy, addServer, clone, flushActiveProxy, flushProfileMap, getActiveProxy, getInteractiveMode, getMirrorOf, getModelEncoding, getProfilesAsMap, getServer, isUsePluginRegistry, removeActiveProfile, removeMirror, removePluginGroup, removeProfile, removeProxy, removeServer, setActiveProfiles, setInteractiveMode, setLocalRepository, setMirrors, setModelEncoding, setOffline, setPluginGroups, setProfiles, setProxies, setServers, setUsePluginRegistry
-
Methods inherited from class org.apache.maven.settings.TrackableBase
getSourceLevel, setSourceLevel
-
-
-
-
Field Detail
-
request
private MavenExecutionRequest request
-
runtimeInfo
private RuntimeInfo runtimeInfo
-
-
Constructor Detail
-
SettingsAdapter
SettingsAdapter(MavenExecutionRequest request)
-
-
Method Detail
-
getLocalRepository
public java.lang.String getLocalRepository()
Description copied from class:SettingsGet the local repository.
Default value is:${user.home}/.m2/repository- Overrides:
getLocalRepositoryin classSettings- Returns:
- String
-
isInteractiveMode
public boolean isInteractiveMode()
Description copied from class:SettingsGet whether Maven should attempt to interact with the user for input.- Overrides:
isInteractiveModein classSettings- Returns:
- boolean
-
isOffline
public boolean isOffline()
Description copied from class:SettingsGet indicate whether maven should operate in offline mode full-time.
-
getProxies
public java.util.List<Proxy> getProxies()
Description copied from class:SettingsMethod getProxies.- Overrides:
getProxiesin classSettings- Returns:
- List
-
getServers
public java.util.List<Server> getServers()
Description copied from class:SettingsMethod getServers.- Overrides:
getServersin classSettings- Returns:
- List
-
getMirrors
public java.util.List<Mirror> getMirrors()
Description copied from class:SettingsMethod getMirrors.- Overrides:
getMirrorsin classSettings- Returns:
- List
-
getProfiles
public java.util.List<Profile> getProfiles()
Description copied from class:SettingsMethod getProfiles.- Overrides:
getProfilesin classSettings- Returns:
- List
-
getActiveProfiles
public java.util.List<java.lang.String> getActiveProfiles()
Description copied from class:SettingsMethod getActiveProfiles.- Overrides:
getActiveProfilesin classSettings- Returns:
- List
-
getPluginGroups
public java.util.List<java.lang.String> getPluginGroups()
Description copied from class:SettingsMethod getPluginGroups.- Overrides:
getPluginGroupsin classSettings- Returns:
- List
-
-