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 SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Settings instances.
- 
Field SummaryFields inherited from class org.apache.maven.api.settings.TrackableBaseGLOBAL_LEVEL, PROJECT_LEVEL, USER_LEVEL
- 
Method SummaryModifier 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/repositoryConfiguration 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.booleanWhether Maven should attempt to interact with the user for input.booleanIndicate whether maven should operate in offline mode full-time.booleanWhether Maven should use the plugin-registry.xml file to manage plugin versions.static Settings.BuilderCreates a newSettingsbuilder instance.static Settings.BuildernewBuilder(boolean withDefaults) Creates a newSettingsbuilder instance using default values or not.static Settings.BuildernewBuilder(Settings from) Creates a newSettingsbuilder instance using the specified object as a basis.static Settings.BuildernewBuilder(Settings from, boolean forceCopy) Creates a newSettingsbuilder instance using the specified object as a basis.static SettingsCreates a newSettingsinstance.static SettingsnewInstance(boolean withDefaults) Creates a newSettingsinstance using default values or not.with()Creates a new builder with this object as the basis.withActiveProfiles(Collection<String> activeProfiles) Creates a newSettingsinstance using the specified activeProfiles.withInteractiveMode(boolean interactiveMode) Creates a newSettingsinstance using the specified interactiveMode.withLocalRepository(String localRepository) Creates a newSettingsinstance using the specified localRepository.withMirrors(Collection<Mirror> mirrors) Creates a newSettingsinstance using the specified mirrors.withOffline(boolean offline) Creates a newSettingsinstance using the specified offline.withPluginGroups(Collection<String> pluginGroups) Creates a newSettingsinstance using the specified pluginGroups.withPluginRepositories(Collection<Repository> pluginRepositories) Creates a newSettingsinstance using the specified pluginRepositories.withProfiles(Collection<Profile> profiles) Creates a newSettingsinstance using the specified profiles.withProxies(Collection<Proxy> proxies) Creates a newSettingsinstance using the specified proxies.withRepositories(Collection<Repository> repositories) Creates a newSettingsinstance using the specified repositories.withServers(Collection<Server> servers) Creates a newSettingsinstance using the specified servers.withUsePluginRegistry(boolean usePluginRegistry) Creates a newSettingsinstance using the specified usePluginRegistry.Methods inherited from class org.apache.maven.api.settings.TrackableBasegetLocation, getSourceLevel, newBuilder, newBuilder, setSourceLevelMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.api.settings.InputLocationTrackergetLocation
- 
Method Details- 
getNamespaceUri
- 
getModelEncoding
- 
getLocalRepositoryThe local repository.
 Default value is:${user.home}/.m2/repository- Returns:
- a String
 
- 
isInteractiveModepublic boolean isInteractiveMode()Whether Maven should attempt to interact with the user for input.- Returns:
- a boolean
 
- 
isUsePluginRegistrypublic boolean isUsePluginRegistry()Whether Maven should use the plugin-registry.xml file to manage plugin versions.- Returns:
- a boolean
 
- 
isOfflinepublic boolean isOffline()Indicate whether maven should operate in offline mode full-time.- Returns:
- a boolean
 
- 
getProxiesConfiguration 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>
 
- 
getServersConfiguration of server-specific settings, mainly authentication method. This allows configuration of authentication on a per-server basis.- Returns:
- a List<Server>
 
- 
getMirrorsConfiguration of download mirrors for repositories.- Returns:
- a List<Mirror>
 
- 
getRepositoriesThe lists of the remote repositories.- Returns:
- a List<Repository>
 
- 
getPluginRepositoriesThe lists of the remote repositories for discovering plugins.- Returns:
- a List<Repository>
 
- 
getProfilesConfiguration of build profiles for adjusting the build according to environmental parameters.- Returns:
- a List<Profile>
 
- 
getActiveProfilesList of manually-activated build profiles, specified in the order in which they should be applied.- Returns:
- a List<String>
 
- 
getPluginGroupsList of groupIds to search for a plugin when that plugin groupId is not explicitly provided.- Returns:
- a List<String>
 
- 
withCreates a new builder with this object as the basis.- Overrides:
- within class- TrackableBase
- Returns:
- a Builder
 
- 
withLocalRepositoryCreates a newSettingsinstance using the specified localRepository.- Parameters:
- localRepository- the new- Stringto use
- Returns:
- a Settingswith the specified localRepository
 
- 
withInteractiveModeCreates a newSettingsinstance using the specified interactiveMode.- Parameters:
- interactiveMode- the new- booleanto use
- Returns:
- a Settingswith the specified interactiveMode
 
- 
withUsePluginRegistryCreates a newSettingsinstance using the specified usePluginRegistry.- Parameters:
- usePluginRegistry- the new- booleanto use
- Returns:
- a Settingswith the specified usePluginRegistry
 
- 
withOfflineCreates a newSettingsinstance using the specified offline.- Parameters:
- offline- the new- booleanto use
- Returns:
- a Settingswith the specified offline
 
- 
withProxiesCreates a newSettingsinstance using the specified proxies.- Parameters:
- proxies- the new- Collection<Proxy>to use
- Returns:
- a Settingswith the specified proxies
 
- 
withServersCreates a newSettingsinstance using the specified servers.- Parameters:
- servers- the new- Collection<Server>to use
- Returns:
- a Settingswith the specified servers
 
- 
withMirrorsCreates a newSettingsinstance using the specified mirrors.- Parameters:
- mirrors- the new- Collection<Mirror>to use
- Returns:
- a Settingswith the specified mirrors
 
- 
withRepositoriesCreates a newSettingsinstance using the specified repositories.- Parameters:
- repositories- the new- Collection<Repository>to use
- Returns:
- a Settingswith the specified repositories
 
- 
withPluginRepositoriesCreates a newSettingsinstance using the specified pluginRepositories.- Parameters:
- pluginRepositories- the new- Collection<Repository>to use
- Returns:
- a Settingswith the specified pluginRepositories
 
- 
withProfilesCreates a newSettingsinstance using the specified profiles.- Parameters:
- profiles- the new- Collection<Profile>to use
- Returns:
- a Settingswith the specified profiles
 
- 
withActiveProfilesCreates a newSettingsinstance using the specified activeProfiles.- Parameters:
- activeProfiles- the new- Collection<String>to use
- Returns:
- a Settingswith the specified activeProfiles
 
- 
withPluginGroupsCreates a newSettingsinstance using the specified pluginGroups.- Parameters:
- pluginGroups- the new- Collection<String>to use
- Returns:
- a Settingswith the specified pluginGroups
 
- 
newInstanceCreates a newSettingsinstance. Equivalent tonewInstance(true).- Returns:
- a new Settings
- See Also:
 
- 
newInstanceCreates a newSettingsinstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Settings
 
- 
newBuilderCreates a newSettingsbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newSettingsbuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newSettingsbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
- from- the- Settingsinstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newSettingsbuilder instance using the specified object as a basis.- Parameters:
- from- the- Settingsinstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
 
-