Class Settings
java.lang.Object
org.apache.maven.settings.TrackableBase
org.apache.maven.settings.Settings
- All Implemented Interfaces:
Serializable, Cloneable
Root element of the user configuration file.
- Version:
- $Revision$ $Date$
- See Also:
-
Field Summary
Fields inherited from class TrackableBase
GLOBAL_LEVEL, USER_LEVEL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddActiveProfile(String string) Method addActiveProfile.voidMethod addMirror.voidaddPluginGroup(String string) Method addPluginGroup.voidaddProfile(Profile profile) Method addProfile.voidMethod addProxy.voidMethod addServer.clone()Method clone.voidReset theactiveProxyfield tonullvoidReset theprofileMapfield tonullMethod getActiveProfiles.Get the local repository.
Default value is:${user.home}/.m2/repositorygetMirrorOf(String repositoryId) Deprecated.Method getMirrors.Get the modelEncoding field.Method getPluginGroups.Method getProfiles.Method getProxies.Method getServers.booleanGet whether Maven should attempt to interact with the user for input.booleanGet indicate whether maven should operate in offline mode full-time.booleanGet whether Maven should use theplugin-registry.xmlfile to manage plugin versions.voidremoveActiveProfile(String string) Method removeActiveProfile.voidremoveMirror(Mirror mirror) Method removeMirror.voidremovePluginGroup(String string) Method removePluginGroup.voidremoveProfile(Profile profile) Method removeProfile.voidremoveProxy(Proxy proxy) Method removeProxy.voidremoveServer(Server server) Method removeServer.voidsetActiveProfiles(List<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(String localRepository) Set the local repository.
Default value is:${user.home}/.m2/repositoryvoidsetMirrors(List<Mirror> mirrors) Set configuration of download mirrors for repositories.voidsetModelEncoding(String modelEncoding) Set the modelEncoding field.voidsetOffline(boolean offline) Set indicate whether maven should operate in offline mode full-time.voidsetPluginGroups(List<String> pluginGroups) Set list of groupIds to search for a plugin when that plugin groupId is not explicitly provided.voidsetProfiles(List<Profile> profiles) Set configuration of build profiles for adjusting the build according to environmental parameters.voidsetProxies(List<Proxy> proxies) Set configuration for different proxy profiles.voidsetServers(List<Server> servers) Set configuration of server-specific settings, mainly authentication method.voidsetUsePluginRegistry(boolean usePluginRegistry) Set whether Maven should use theplugin-registry.xmlfile to manage plugin versions.Methods inherited from class TrackableBase
getSourceLevel, setSourceLevel
-
Constructor Details
-
Settings
public Settings()
-
-
Method Details
-
addActiveProfile
Method addActiveProfile.- Parameters:
string- a string object.
-
addMirror
-
addPluginGroup
Method addPluginGroup.- Parameters:
string- a string object.
-
addProfile
-
addProxy
-
addServer
-
clone
-
getActiveProfiles
-
getLocalRepository
Get the local repository.
Default value is:${user.home}/.m2/repository- Returns:
- String
-
getMirrors
-
getModelEncoding
-
getPluginGroups
-
getProfiles
-
getProxies
-
getServers
-
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.xmlfile to manage plugin versions.- Returns:
- boolean
-
removeActiveProfile
Method removeActiveProfile.- Parameters:
string- a string object.
-
removeMirror
-
removePluginGroup
Method removePluginGroup.- Parameters:
string- a string object.
-
removeProfile
Method removeProfile.- Parameters:
profile- a profile object.
-
removeProxy
-
removeServer
-
setActiveProfiles
-
setInteractiveMode
public void setInteractiveMode(boolean interactiveMode) Set whether Maven should attempt to interact with the user for input.- Parameters:
interactiveMode- a interactiveMode object.
-
setLocalRepository
Set the local repository.
Default value is:${user.home}/.m2/repository- Parameters:
localRepository- a localRepository object.
-
setMirrors
-
setModelEncoding
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
-
setProfiles
-
setProxies
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
-
setUsePluginRegistry
public void setUsePluginRegistry(boolean usePluginRegistry) Set whether Maven should use theplugin-registry.xmlfile to manage plugin versions.- Parameters:
usePluginRegistry- a usePluginRegistry object.
-
getInteractiveMode
-
flushActiveProxy
public void flushActiveProxy()Reset theactiveProxyfield tonull -
getActiveProxy
- Returns:
- the first active proxy
-
getServer
-
getMirrorOf
Deprecated. -
flushProfileMap
public void flushProfileMap()Reset theprofileMapfield tonull -
getProfilesAsMap
-