Package org.apache.maven.api.settings
Class Settings
java.lang.Object
org.apache.maven.api.settings.TrackableBase
org.apache.maven.api.settings.Settings
- All Implemented Interfaces:
Serializable
,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Settings
extends TrackableBase
implements Serializable, InputLocationTracker
Root element of the user configuration file.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create Settings instances. -
Constructor Summary
ModifierConstructorDescriptionprotected
Settings
(Settings.Builder builder) Constructor for this class, to be called from its subclasses andSettings.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionList of manually-activated build profiles, specified in the order in which they should be applied.The local repository.
Default value is:${user.home}/.m2/repository
Configuration of download mirrors for repositories.List of groupIds to search for a plugin when that plugin groupId is not explicitly provided.The lists of the remote repositories for discovering plugins.Configuration of build profiles for adjusting the build according to environmental parameters.Configuration for different proxy profiles.The lists of the remote repositories.Configuration of server-specific settings, mainly authentication method.boolean
Whether Maven should attempt to interact with the user for input.boolean
Indicate whether maven should operate in offline mode full-time.boolean
Whether Maven should use theplugin-registry.xml
file to manage plugin versions.static Settings.Builder
Creates a newSettings
builder instance.static Settings.Builder
newBuilder
(boolean withDefaults) Creates a newSettings
builder instance using default values or not.static Settings.Builder
newBuilder
(Settings from) Creates a newSettings
builder instance using the specified object as a basis.static Settings.Builder
newBuilder
(Settings from, boolean forceCopy) Creates a newSettings
builder instance using the specified object as a basis.static Settings
Creates a newSettings
instance.static Settings
newInstance
(boolean withDefaults) Creates a newSettings
instance using default values or not.with()
Creates a new builder with this object as the basis.withActiveProfiles
(Collection<String> activeProfiles) Creates a newSettings
instance using the specified activeProfiles.withInteractiveMode
(boolean interactiveMode) Creates a newSettings
instance using the specified interactiveMode.withLocalRepository
(String localRepository) Creates a newSettings
instance using the specified localRepository.withMirrors
(Collection<Mirror> mirrors) Creates a newSettings
instance using the specified mirrors.withOffline
(boolean offline) Creates a newSettings
instance using the specified offline.withPluginGroups
(Collection<String> pluginGroups) Creates a newSettings
instance using the specified pluginGroups.withPluginRepositories
(Collection<Repository> pluginRepositories) Creates a newSettings
instance using the specified pluginRepositories.withProfiles
(Collection<Profile> profiles) Creates a newSettings
instance using the specified profiles.withProxies
(Collection<Proxy> proxies) Creates a newSettings
instance using the specified proxies.withRepositories
(Collection<Repository> repositories) Creates a newSettings
instance using the specified repositories.withServers
(Collection<Server> servers) Creates a newSettings
instance using the specified servers.withUsePluginRegistry
(boolean usePluginRegistry) Creates a newSettings
instance using the specified usePluginRegistry.Methods inherited from class org.apache.maven.api.settings.TrackableBase
getImportedFrom, getLocation, getLocationKeys, getLocationKeyStream, newBuilder, newBuilder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.maven.api.settings.InputLocationTracker
getLocation
-
Constructor Details
-
Settings
Constructor for this class, to be called from its subclasses andSettings.Builder
.- See Also:
-
-
Method Details
-
getNamespaceUri
-
getModelEncoding
-
getLocalRepository
The local repository.
Default value is:${user.home}/.m2/repository
- Returns:
- a
String
-
isInteractiveMode
public boolean isInteractiveMode()Whether Maven should attempt to interact with the user for input.- Returns:
- a
boolean
-
isUsePluginRegistry
public boolean isUsePluginRegistry()Whether Maven should use theplugin-registry.xml
file to manage plugin versions.- Returns:
- a
boolean
-
isOffline
public boolean isOffline()Indicate whether maven should operate in offline mode full-time.- Returns:
- a
boolean
-
getProxies
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.- Returns:
- a
List<Proxy>
-
getServers
Configuration of server-specific settings, mainly authentication method. This allows configuration of authentication on a per-server basis.- Returns:
- a
List<Server>
-
getMirrors
Configuration of download mirrors for repositories.- Returns:
- a
List<Mirror>
-
getRepositories
The lists of the remote repositories.- Returns:
- a
List<Repository>
-
getPluginRepositories
The lists of the remote repositories for discovering plugins.- Returns:
- a
List<Repository>
-
getProfiles
Configuration of build profiles for adjusting the build according to environmental parameters.- Returns:
- a
List<Profile>
-
getActiveProfiles
List of manually-activated build profiles, specified in the order in which they should be applied.- Returns:
- a
List<String>
-
getPluginGroups
List of groupIds to search for a plugin when that plugin groupId is not explicitly provided.- Returns:
- a
List<String>
-
with
Creates a new builder with this object as the basis.- Overrides:
with
in classTrackableBase
- Returns:
- a
Builder
-
withLocalRepository
Creates a newSettings
instance using the specified localRepository.- Parameters:
localRepository
- the newString
to use- Returns:
- a
Settings
with the specified localRepository
-
withInteractiveMode
Creates a newSettings
instance using the specified interactiveMode.- Parameters:
interactiveMode
- the newboolean
to use- Returns:
- a
Settings
with the specified interactiveMode
-
withUsePluginRegistry
Creates a newSettings
instance using the specified usePluginRegistry.- Parameters:
usePluginRegistry
- the newboolean
to use- Returns:
- a
Settings
with the specified usePluginRegistry
-
withOffline
Creates a newSettings
instance using the specified offline.- Parameters:
offline
- the newboolean
to use- Returns:
- a
Settings
with the specified offline
-
withProxies
Creates a newSettings
instance using the specified proxies.- Parameters:
proxies
- the newCollection<Proxy>
to use- Returns:
- a
Settings
with the specified proxies
-
withServers
Creates a newSettings
instance using the specified servers.- Parameters:
servers
- the newCollection<Server>
to use- Returns:
- a
Settings
with the specified servers
-
withMirrors
Creates a newSettings
instance using the specified mirrors.- Parameters:
mirrors
- the newCollection<Mirror>
to use- Returns:
- a
Settings
with the specified mirrors
-
withRepositories
Creates a newSettings
instance using the specified repositories.- Parameters:
repositories
- the newCollection<Repository>
to use- Returns:
- a
Settings
with the specified repositories
-
withPluginRepositories
Creates a newSettings
instance using the specified pluginRepositories.- Parameters:
pluginRepositories
- the newCollection<Repository>
to use- Returns:
- a
Settings
with the specified pluginRepositories
-
withProfiles
Creates a newSettings
instance using the specified profiles.- Parameters:
profiles
- the newCollection<Profile>
to use- Returns:
- a
Settings
with the specified profiles
-
withActiveProfiles
Creates a newSettings
instance using the specified activeProfiles.- Parameters:
activeProfiles
- the newCollection<String>
to use- Returns:
- a
Settings
with the specified activeProfiles
-
withPluginGroups
Creates a newSettings
instance using the specified pluginGroups.- Parameters:
pluginGroups
- the newCollection<String>
to use- Returns:
- a
Settings
with the specified pluginGroups
-
newInstance
Creates a newSettings
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
Settings
- See Also:
-
newInstance
Creates a newSettings
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Settings
-
newBuilder
Creates a newSettings
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newSettings
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newSettings
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theSettings
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newSettings
builder instance using the specified object as a basis.- Parameters:
from
- theSettings
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-