@Experimental @Generated @ThreadSafe @Immutable public class Settings extends TrackableBase implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Settings.Builder
Builder class used to create Settings instances.
|
GLOBAL_LEVEL, USER_LEVEL
Modifier and Type | Method and Description |
---|---|
void |
flushActiveProxy()
Reset the
activeProxy field to null |
void |
flushProfileMap()
Reset the
profileMap field to null |
List<String> |
getActiveProfiles()
List of manually-activated build profiles, specified in the order in which
they should be applied.
|
Proxy |
getActiveProxy() |
Boolean |
getInteractiveMode() |
String |
getLocalRepository()
The local repository.
Default value is: ${user.home}/.m2/repository |
Mirror |
getMirrorOf(String repositoryId)
Deprecated.
|
List<Mirror> |
getMirrors()
Configuration of download mirrors for repositories.
|
String |
getModelEncoding() |
List<String> |
getPluginGroups()
List of groupIds to search for a plugin when that plugin
groupId is not explicitly provided.
|
List<Profile> |
getProfiles()
Configuration of build profiles for adjusting the build
according to environmental parameters.
|
Map<String,Profile> |
getProfilesAsMap() |
List<Proxy> |
getProxies()
Configuration for different proxy profiles.
|
Server |
getServer(String serverId) |
List<Server> |
getServers()
Configuration of server-specific settings, mainly authentication
method.
|
boolean |
isInteractiveMode()
Whether Maven should attempt to interact with the user for input.
|
boolean |
isOffline()
Indicate whether maven should operate in offline mode full-time.
|
boolean |
isUsePluginRegistry()
Whether Maven should use the plugin-registry.xml file to manage plugin versions.
|
static Settings.Builder |
newBuilder()
Creates a new
Settings builder instance. |
static Settings.Builder |
newBuilder(boolean withDefaults)
Creates a new
Settings builder instance using default values or not. |
static Settings.Builder |
newBuilder(Settings from)
Creates a new
Settings builder instance using the specified object as a basis. |
static Settings.Builder |
newBuilder(Settings from,
boolean forceCopy)
Creates a new
Settings builder instance using the specified object as a basis. |
static Settings |
newInstance()
Creates a new
Settings instance. |
static Settings |
newInstance(boolean withDefaults)
Creates a new
Settings instance using default values or not. |
Settings.Builder |
with()
Creates a new builder with this object as the basis.
|
Settings |
withActiveProfiles(Collection<String> activeProfiles)
Creates a new
Settings instance using the specified activeProfiles. |
Settings |
withInteractiveMode(boolean interactiveMode)
Creates a new
Settings instance using the specified interactiveMode. |
Settings |
withLocalRepository(String localRepository)
Creates a new
Settings instance using the specified localRepository. |
Settings |
withMirrors(Collection<Mirror> mirrors)
Creates a new
Settings instance using the specified mirrors. |
Settings |
withOffline(boolean offline)
Creates a new
Settings instance using the specified offline. |
Settings |
withPluginGroups(Collection<String> pluginGroups)
Creates a new
Settings instance using the specified pluginGroups. |
Settings |
withProfiles(Collection<Profile> profiles)
Creates a new
Settings instance using the specified profiles. |
Settings |
withProxies(Collection<Proxy> proxies)
Creates a new
Settings instance using the specified proxies. |
Settings |
withServers(Collection<Server> servers)
Creates a new
Settings instance using the specified servers. |
Settings |
withUsePluginRegistry(boolean usePluginRegistry)
Creates a new
Settings instance using the specified usePluginRegistry. |
getSourceLevel, newBuilder, newBuilder, setSourceLevel
public String getModelEncoding()
public String getLocalRepository()
${user.home}/.m2/repository
String
public boolean isInteractiveMode()
boolean
public boolean isUsePluginRegistry()
boolean
public boolean isOffline()
boolean
@Nonnull public List<Proxy> getProxies()
List<Proxy>
@Nonnull public List<Server> getServers()
List<Server>
@Nonnull public List<Mirror> getMirrors()
List<Mirror>
@Nonnull public List<Profile> getProfiles()
List<Profile>
@Nonnull public List<String> getActiveProfiles()
List<String>
@Nonnull public List<String> getPluginGroups()
List<String>
@Nonnull public Settings.Builder with()
with
in class TrackableBase
Builder
@Nonnull public Settings withLocalRepository(String localRepository)
Settings
instance using the specified localRepository.localRepository
- the new String
to useSettings
with the specified localRepository@Nonnull public Settings withInteractiveMode(boolean interactiveMode)
Settings
instance using the specified interactiveMode.interactiveMode
- the new boolean
to useSettings
with the specified interactiveMode@Nonnull public Settings withUsePluginRegistry(boolean usePluginRegistry)
Settings
instance using the specified usePluginRegistry.usePluginRegistry
- the new boolean
to useSettings
with the specified usePluginRegistry@Nonnull public Settings withOffline(boolean offline)
Settings
instance using the specified offline.offline
- the new boolean
to useSettings
with the specified offline@Nonnull public Settings withProxies(Collection<Proxy> proxies)
Settings
instance using the specified proxies.proxies
- the new Collection<Proxy>
to useSettings
with the specified proxies@Nonnull public Settings withServers(Collection<Server> servers)
Settings
instance using the specified servers.servers
- the new Collection<Server>
to useSettings
with the specified servers@Nonnull public Settings withMirrors(Collection<Mirror> mirrors)
Settings
instance using the specified mirrors.mirrors
- the new Collection<Mirror>
to useSettings
with the specified mirrors@Nonnull public Settings withProfiles(Collection<Profile> profiles)
Settings
instance using the specified profiles.profiles
- the new Collection<Profile>
to useSettings
with the specified profiles@Nonnull public Settings withActiveProfiles(Collection<String> activeProfiles)
Settings
instance using the specified activeProfiles.activeProfiles
- the new Collection<String>
to useSettings
with the specified activeProfiles@Nonnull public Settings withPluginGroups(Collection<String> pluginGroups)
Settings
instance using the specified pluginGroups.pluginGroups
- the new Collection<String>
to useSettings
with the specified pluginGroups@Nonnull public static Settings newInstance()
Settings
instance.
Equivalent to newInstance( true )
.Settings
newInstance(boolean)
@Nonnull public static Settings newInstance(boolean withDefaults)
Settings
instance using default values or not.
Equivalent to newBuilder( withDefaults ).build()
.withDefaults
- the boolean indicating whether default values should be usedSettings
@Nonnull public static Settings.Builder newBuilder()
Settings
builder instance.
Equivalent to newBuilder( true )
.Builder
newBuilder(boolean)
@Nonnull public static Settings.Builder newBuilder(boolean withDefaults)
Settings
builder instance using default values or not.withDefaults
- the boolean indicating whether default values should be usedBuilder
@Nonnull public static Settings.Builder newBuilder(Settings from)
Settings
builder instance using the specified object as a basis.
Equivalent to newBuilder( from, false )
.from
- the Settings
instance to use as a basisBuilder
@Nonnull public static Settings.Builder newBuilder(Settings from, boolean forceCopy)
Settings
builder instance using the specified object as a basis.from
- the Settings
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forcedBuilder
public Boolean getInteractiveMode()
public void flushActiveProxy()
activeProxy
field to null
public Proxy getActiveProxy()
@Deprecated public Mirror getMirrorOf(String repositoryId)
public void flushProfileMap()
profileMap
field to null
public Map<String,Profile> getProfilesAsMap()
Profile#getId()
as keyIdentifiableBase.getId()
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.