Package org.apache.maven.settings
Class Settings
- java.lang.Object
-
- org.apache.maven.settings.TrackableBase
-
- org.apache.maven.settings.Settings
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class Settings extends TrackableBase implements Serializable, Cloneable
Root element of the user configuration file.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Field Summary
-
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 void
addActiveProfile(String string)
Method addActiveProfile.void
addMirror(Mirror mirror)
Method addMirror.void
addPluginGroup(String string)
Method addPluginGroup.void
addProfile(Profile profile)
Method addProfile.void
addProxy(Proxy proxy)
Method addProxy.void
addServer(Server server)
Method addServer.Settings
clone()
Method clone.void
flushActiveProxy()
Reset theactiveProxy
field tonull
void
flushProfileMap()
Reset theprofileMap
field tonull
List<String>
getActiveProfiles()
Method getActiveProfiles.Proxy
getActiveProxy()
Boolean
getInteractiveMode()
String
getLocalRepository()
Get the local repository.
Default value is:${user.home}/.m2/repository
Mirror
getMirrorOf(String repositoryId)
Deprecated.List<Mirror>
getMirrors()
Method getMirrors.String
getModelEncoding()
Get the modelEncoding field.List<String>
getPluginGroups()
Method getPluginGroups.List<Profile>
getProfiles()
Method getProfiles.Map<String,Profile>
getProfilesAsMap()
List<Proxy>
getProxies()
Method getProxies.Server
getServer(String serverId)
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.boolean
isUsePluginRegistry()
Get whether Maven should use theplugin-registry.xml
file to manage plugin versions.void
removeActiveProfile(String string)
Method removeActiveProfile.void
removeMirror(Mirror mirror)
Method removeMirror.void
removePluginGroup(String string)
Method removePluginGroup.void
removeProfile(Profile profile)
Method removeProfile.void
removeProxy(Proxy proxy)
Method removeProxy.void
removeServer(Server server)
Method removeServer.void
setActiveProfiles(List<String> activeProfiles)
Set list of manually-activated build profiles, specified in the order in which they should be applied.void
setInteractiveMode(boolean interactiveMode)
Set whether Maven should attempt to interact with the user for input.void
setLocalRepository(String localRepository)
Set the local repository.
Default value is:${user.home}/.m2/repository
void
setMirrors(List<Mirror> mirrors)
Set configuration of download mirrors for repositories.void
setModelEncoding(String modelEncoding)
Set the modelEncoding field.void
setOffline(boolean offline)
Set indicate whether maven should operate in offline mode full-time.void
setPluginGroups(List<String> pluginGroups)
Set list of groupIds to search for a plugin when that plugin groupId is not explicitly provided.void
setProfiles(List<Profile> profiles)
Set configuration of build profiles for adjusting the build according to environmental parameters.void
setProxies(List<Proxy> proxies)
Set configuration for different proxy profiles.void
setServers(List<Server> servers)
Set configuration of server-specific settings, mainly authentication method.void
setUsePluginRegistry(boolean usePluginRegistry)
Set whether Maven should use theplugin-registry.xml
file to manage plugin versions.-
Methods inherited from class org.apache.maven.settings.TrackableBase
getSourceLevel, setSourceLevel
-
-
-
-
Method Detail
-
addActiveProfile
public void addActiveProfile(String string)
Method addActiveProfile.- Parameters:
string
- a string object.
-
addMirror
public void addMirror(Mirror mirror)
Method addMirror.- Parameters:
mirror
- a mirror object.
-
addPluginGroup
public void addPluginGroup(String string)
Method addPluginGroup.- Parameters:
string
- a string object.
-
addProfile
public void addProfile(Profile profile)
Method addProfile.- Parameters:
profile
- a profile object.
-
addProxy
public void addProxy(Proxy proxy)
Method addProxy.- Parameters:
proxy
- a proxy object.
-
addServer
public void addServer(Server server)
Method addServer.- Parameters:
server
- a server object.
-
clone
public Settings clone()
Method clone.- Overrides:
clone
in classTrackableBase
- Returns:
- Settings
-
getLocalRepository
public String getLocalRepository()
Get the local repository.
Default value is:${user.home}/.m2/repository
- Returns:
- String
-
getModelEncoding
public String getModelEncoding()
Get the modelEncoding field.- Returns:
- String
-
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 theplugin-registry.xml
file to manage plugin versions.- Returns:
- boolean
-
removeActiveProfile
public void removeActiveProfile(String string)
Method removeActiveProfile.- Parameters:
string
- a string object.
-
removeMirror
public void removeMirror(Mirror mirror)
Method removeMirror.- Parameters:
mirror
- a mirror object.
-
removePluginGroup
public void removePluginGroup(String string)
Method removePluginGroup.- Parameters:
string
- a string object.
-
removeProfile
public void removeProfile(Profile profile)
Method removeProfile.- Parameters:
profile
- a profile object.
-
removeProxy
public void removeProxy(Proxy proxy)
Method removeProxy.- Parameters:
proxy
- a proxy object.
-
removeServer
public void removeServer(Server server)
Method removeServer.- Parameters:
server
- a server object.
-
setActiveProfiles
public void setActiveProfiles(List<String> activeProfiles)
Set list of manually-activated build profiles, specified in the order in which they should be applied.- Parameters:
activeProfiles
- a activeProfiles object.
-
setInteractiveMode
public void setInteractiveMode(boolean interactiveMode)
Set whether Maven should attempt to interact with the user for input.- Parameters:
interactiveMode
- a interactiveMode object.
-
setLocalRepository
public void setLocalRepository(String localRepository)
Set the local repository.
Default value is:${user.home}/.m2/repository
- Parameters:
localRepository
- a localRepository object.
-
setMirrors
public void setMirrors(List<Mirror> mirrors)
Set configuration of download mirrors for repositories.- Parameters:
mirrors
- a mirrors object.
-
setModelEncoding
public void setModelEncoding(String modelEncoding)
Set the modelEncoding field.- Parameters:
modelEncoding
- a modelEncoding object.
-
setOffline
public void setOffline(boolean offline)
Set indicate whether maven should operate in offline mode full-time.- Parameters:
offline
- a offline object.
-
setPluginGroups
public void setPluginGroups(List<String> pluginGroups)
Set list of groupIds to search for a plugin when that plugin groupId is not explicitly provided.- Parameters:
pluginGroups
- a pluginGroups object.
-
setProfiles
public void setProfiles(List<Profile> profiles)
Set configuration of build profiles for adjusting the build according to environmental parameters.- Parameters:
profiles
- a profiles object.
-
setProxies
public void setProxies(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
- a proxies object.
-
setServers
public void setServers(List<Server> servers)
Set configuration of server-specific settings, mainly authentication method. This allows configuration of authentication on a per-server basis.- Parameters:
servers
- a servers object.
-
setUsePluginRegistry
public void setUsePluginRegistry(boolean usePluginRegistry)
Set whether Maven should use theplugin-registry.xml
file to manage plugin versions.- Parameters:
usePluginRegistry
- a usePluginRegistry object.
-
getInteractiveMode
public Boolean getInteractiveMode()
-
flushActiveProxy
public void flushActiveProxy()
Reset theactiveProxy
field tonull
-
getActiveProxy
public Proxy getActiveProxy()
- Returns:
- the first active proxy
-
getMirrorOf
@Deprecated public Mirror getMirrorOf(String repositoryId)
Deprecated.
-
flushProfileMap
public void flushProfileMap()
Reset theprofileMap
field tonull
-
getProfilesAsMap
public Map<String,Profile> getProfilesAsMap()
- Returns:
- a Map of profiles field with
Profile#getId()
as key - See Also:
IdentifiableBase.getId()
-
-