Package org.apache.maven.settings
Class Settings
- java.lang.Object
-
- org.apache.maven.settings.TrackableBase
-
- org.apache.maven.settings.Settings
-
- All Implemented Interfaces:
java.io.Serializable
public class Settings extends TrackableBase implements java.io.Serializable
Root element of the user configuration file.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>activeProfilesField activeProfiles.private ProxyactiveProxyprivate booleaninteractiveModeWhether Maven should attempt to interact with the user for input.private java.lang.StringlocalRepositoryThe local repository.private java.util.List<Mirror>mirrorsField mirrors.private java.lang.StringmodelEncodingField modelEncoding.private booleanofflineIndicate whether maven should operate in offline mode full-time.private java.util.List<java.lang.String>pluginGroupsField pluginGroups.private java.util.MapprofileMapprivate java.util.List<Profile>profilesField profiles.private java.util.List<Proxy>proxiesField proxies.private RuntimeInforuntimeInfoprivate java.util.List<Server>serversField servers.private booleanusePluginRegistryWhether Maven should use the plugin-registry.xml file to manage plugin versions.-
Fields inherited from class org.apache.maven.settings.TrackableBase
GLOBAL_LEVEL, USER_LEVEL
-
-
Constructor Summary
Constructors Constructor Description Settings()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddActiveProfile(java.lang.String string)Method addActiveProfile.voidaddMirror(Mirror mirror)Method addMirror.voidaddPluginGroup(java.lang.String string)Method addPluginGroup.voidaddProfile(Profile profile)Method addProfile.voidaddProxy(Proxy proxy)Method addProxy.voidaddServer(Server server)Method addServer.voidflushActiveProxy()Reset theactiveProxyfield tonullvoidflushProfileMap()Reset theprofileMapfield tonulljava.util.List<java.lang.String>getActiveProfiles()Method getActiveProfiles.ProxygetActiveProxy()java.lang.BooleangetInteractiveMode()java.lang.StringgetLocalRepository()Get the local repository.MirrorgetMirrorOf(java.lang.String repositoryId)Deprecated.java.util.List<Mirror>getMirrors()Method getMirrors.java.lang.StringgetModelEncoding()Get the modelEncoding field.java.util.List<java.lang.String>getPluginGroups()Method getPluginGroups.java.util.List<Profile>getProfiles()Method getProfiles.java.util.MapgetProfilesAsMap()java.util.List<Proxy>getProxies()Method getProxies.RuntimeInfogetRuntimeInfo()ServergetServer(java.lang.String serverId)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.booleanisUsePluginRegistry()Get whether Maven should use the plugin-registry.xml file to manage plugin versions.voidremoveActiveProfile(java.lang.String string)Method removeActiveProfile.voidremoveMirror(Mirror mirror)Method removeMirror.voidremovePluginGroup(java.lang.String string)Method removePluginGroup.voidremoveProfile(Profile profile)Method removeProfile.voidremoveProxy(Proxy proxy)Method removeProxy.voidremoveServer(Server server)Method removeServer.voidsetActiveProfiles(java.util.List<java.lang.String> activeProfiles)Set list of manually-activated build profiles, specified in the order in which they should be applied.voidsetInteractiveMode(boolean interactiveMode)Set whether Maven should attempt to interact with the user for input.voidsetLocalRepository(java.lang.String localRepository)Set the local repository.voidsetMirrors(java.util.List<Mirror> mirrors)Set configuration of download mirrors for repositories.voidsetModelEncoding(java.lang.String modelEncoding)Set the modelEncoding field.voidsetOffline(boolean offline)Set indicate whether maven should operate in offline mode full-time.voidsetPluginGroups(java.util.List<java.lang.String> pluginGroups)Set list of groupIds to search for a plugin when that plugin groupId is not explicitly provided.voidsetProfiles(java.util.List<Profile> profiles)Set configuration of build profiles for adjusting the build according to environmental parameters.voidsetProxies(java.util.List<Proxy> proxies)Set configuration for different proxy profiles.voidsetRuntimeInfo(RuntimeInfo runtimeInfo)voidsetServers(java.util.List<Server> servers)Set configuration of server-specific settings, mainly authentication method.voidsetUsePluginRegistry(boolean usePluginRegistry)Set whether Maven should use the plugin-registry.xml file to manage plugin versions.-
Methods inherited from class org.apache.maven.settings.TrackableBase
getSourceLevel, setSourceLevel
-
-
-
-
Field Detail
-
localRepository
private java.lang.String localRepository
The local repository.
-
interactiveMode
private boolean interactiveMode
Whether Maven should attempt to interact with the user for input.
-
usePluginRegistry
private boolean usePluginRegistry
Whether Maven should use the plugin-registry.xml file to manage plugin versions.
-
offline
private boolean offline
Indicate whether maven should operate in offline mode full-time.
-
proxies
private java.util.List<Proxy> proxies
Field proxies.
-
servers
private java.util.List<Server> servers
Field servers.
-
mirrors
private java.util.List<Mirror> mirrors
Field mirrors.
-
profiles
private java.util.List<Profile> profiles
Field profiles.
-
activeProfiles
private java.util.List<java.lang.String> activeProfiles
Field activeProfiles.
-
pluginGroups
private java.util.List<java.lang.String> pluginGroups
Field pluginGroups.
-
modelEncoding
private java.lang.String modelEncoding
Field modelEncoding.
-
activeProxy
private Proxy activeProxy
-
profileMap
private java.util.Map profileMap
-
runtimeInfo
private RuntimeInfo runtimeInfo
-
-
Method Detail
-
addActiveProfile
public void addActiveProfile(java.lang.String string)
Method addActiveProfile.- Parameters:
string-
-
addMirror
public void addMirror(Mirror mirror)
Method addMirror.- Parameters:
mirror-
-
addPluginGroup
public void addPluginGroup(java.lang.String string)
Method addPluginGroup.- Parameters:
string-
-
addProfile
public void addProfile(Profile profile)
Method addProfile.- Parameters:
profile-
-
addProxy
public void addProxy(Proxy proxy)
Method addProxy.- Parameters:
proxy-
-
addServer
public void addServer(Server server)
Method addServer.- Parameters:
server-
-
getActiveProfiles
public java.util.List<java.lang.String> getActiveProfiles()
Method getActiveProfiles.- Returns:
- List
-
getLocalRepository
public java.lang.String getLocalRepository()
Get the local repository.- Returns:
- String
-
getMirrors
public java.util.List<Mirror> getMirrors()
Method getMirrors.- Returns:
- List
-
getModelEncoding
public java.lang.String getModelEncoding()
Get the modelEncoding field.- Returns:
- String
-
getPluginGroups
public java.util.List<java.lang.String> getPluginGroups()
Method getPluginGroups.- Returns:
- List
-
getProfiles
public java.util.List<Profile> getProfiles()
Method getProfiles.- Returns:
- List
-
getProxies
public java.util.List<Proxy> getProxies()
Method getProxies.- Returns:
- List
-
getServers
public java.util.List<Server> getServers()
Method getServers.- Returns:
- List
-
isInteractiveMode
public boolean isInteractiveMode()
Get whether Maven should attempt to interact with the user for input.- Returns:
- boolean
-
isOffline
public boolean isOffline()
Get indicate whether maven should operate in offline mode full-time.- Returns:
- boolean
-
isUsePluginRegistry
public boolean isUsePluginRegistry()
Get whether Maven should use the plugin-registry.xml file to manage plugin versions.- Returns:
- boolean
-
removeActiveProfile
public void removeActiveProfile(java.lang.String string)
Method removeActiveProfile.- Parameters:
string-
-
removeMirror
public void removeMirror(Mirror mirror)
Method removeMirror.- Parameters:
mirror-
-
removePluginGroup
public void removePluginGroup(java.lang.String string)
Method removePluginGroup.- Parameters:
string-
-
removeProfile
public void removeProfile(Profile profile)
Method removeProfile.- Parameters:
profile-
-
removeProxy
public void removeProxy(Proxy proxy)
Method removeProxy.- Parameters:
proxy-
-
removeServer
public void removeServer(Server server)
Method removeServer.- Parameters:
server-
-
setActiveProfiles
public void setActiveProfiles(java.util.List<java.lang.String> activeProfiles)
Set list of manually-activated build profiles, specified in the order in which they should be applied.- Parameters:
activeProfiles-
-
setInteractiveMode
public void setInteractiveMode(boolean interactiveMode)
Set whether Maven should attempt to interact with the user for input.- Parameters:
interactiveMode-
-
setLocalRepository
public void setLocalRepository(java.lang.String localRepository)
Set the local repository.- Parameters:
localRepository-
-
setMirrors
public void setMirrors(java.util.List<Mirror> mirrors)
Set configuration of download mirrors for repositories.- Parameters:
mirrors-
-
setModelEncoding
public void setModelEncoding(java.lang.String modelEncoding)
Set the modelEncoding field.- Parameters:
modelEncoding-
-
setOffline
public void setOffline(boolean offline)
Set indicate whether maven should operate in offline mode full-time.- Parameters:
offline-
-
setPluginGroups
public void setPluginGroups(java.util.List<java.lang.String> pluginGroups)
Set list of groupIds to search for a plugin when that plugin groupId is not explicitly provided.- Parameters:
pluginGroups-
-
setProfiles
public void setProfiles(java.util.List<Profile> profiles)
Set configuration of build profiles for adjusting the build according to environmental parameters.- Parameters:
profiles-
-
setProxies
public void setProxies(java.util.List<Proxy> proxies)
Set configuration for different proxy profiles. Multiple proxy profiles might come in handy for anyone working from a notebook or other mobile platform, to enable easy switching of entire proxy configurations by simply specifying the profile id, again either from the command line or from the defaults section below.- Parameters:
proxies-
-
setServers
public void setServers(java.util.List<Server> servers)
Set configuration of server-specific settings, mainly authentication method. This allows configuration of authentication on a per-server basis.- Parameters:
servers-
-
setUsePluginRegistry
public void setUsePluginRegistry(boolean usePluginRegistry)
Set whether Maven should use the plugin-registry.xml file to manage plugin versions.- Parameters:
usePluginRegistry-
-
getInteractiveMode
public java.lang.Boolean getInteractiveMode()
-
flushActiveProxy
public void flushActiveProxy()
Reset theactiveProxyfield tonull
-
getActiveProxy
public Proxy getActiveProxy()
- Returns:
- the first active proxy
-
getServer
public Server getServer(java.lang.String serverId)
-
getMirrorOf
@Deprecated public Mirror getMirrorOf(java.lang.String repositoryId)
Deprecated.
-
flushProfileMap
public void flushProfileMap()
Reset theprofileMapfield tonull
-
getProfilesAsMap
public java.util.Map getProfilesAsMap()
- Returns:
- a Map of profiles field with
Profile#getId()as key - See Also:
IdentifiableBase.getId()
-
setRuntimeInfo
public void setRuntimeInfo(RuntimeInfo runtimeInfo)
-
getRuntimeInfo
public RuntimeInfo getRuntimeInfo()
-
-