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 aMavenExecutionRequest
to aSettings
object 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 MavenExecutionRequest
request
private RuntimeInfo
runtimeInfo
-
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.String
getLocalRepository()
Get the local repository.
Default value is:${user.home}/.m2/repository
java.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.boolean
isInteractiveMode()
Get whether Maven should attempt to interact with the user for input.boolean
isOffline()
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:Settings
Get the local repository.
Default value is:${user.home}/.m2/repository
- Overrides:
getLocalRepository
in classSettings
- Returns:
- String
-
isInteractiveMode
public boolean isInteractiveMode()
Description copied from class:Settings
Get whether Maven should attempt to interact with the user for input.- Overrides:
isInteractiveMode
in classSettings
- Returns:
- boolean
-
isOffline
public boolean isOffline()
Description copied from class:Settings
Get indicate whether maven should operate in offline mode full-time.
-
getProxies
public java.util.List<Proxy> getProxies()
Description copied from class:Settings
Method getProxies.- Overrides:
getProxies
in classSettings
- Returns:
- List
-
getServers
public java.util.List<Server> getServers()
Description copied from class:Settings
Method getServers.- Overrides:
getServers
in classSettings
- Returns:
- List
-
getMirrors
public java.util.List<Mirror> getMirrors()
Description copied from class:Settings
Method getMirrors.- Overrides:
getMirrors
in classSettings
- Returns:
- List
-
getProfiles
public java.util.List<Profile> getProfiles()
Description copied from class:Settings
Method getProfiles.- Overrides:
getProfiles
in classSettings
- Returns:
- List
-
getActiveProfiles
public java.util.List<java.lang.String> getActiveProfiles()
Description copied from class:Settings
Method getActiveProfiles.- Overrides:
getActiveProfiles
in classSettings
- Returns:
- List
-
getPluginGroups
public java.util.List<java.lang.String> getPluginGroups()
Description copied from class:Settings
Method getPluginGroups.- Overrides:
getPluginGroups
in classSettings
- Returns:
- List
-
-