settings Settings This is a reference for the user-specific configuration for Maven.

Includes things that should not be distributed with the pom.xml file, such as developer identity, along with local settings, like proxy information.

The default location for the settings file is ~/.m2/settings.xml

An XSD is available at:

]]>
package org.apache.maven.settings TrackableBase 1.0.0+ common base class that contains code to track the source for this instance (USER|GLOBAL) 1.0.0+ IdentifiableBase TrackableBase 1.0.0+ Mirror, Profile, Proxy and Server. ]]> id 1.0.0+ String default true Settings 1.0.0+ TrackableBase Root element of the user configuration file. localRepository 1.0.0+ true Default value is: ${user.home}/.m2/repository ]]> String interactiveMode 1.0.0+ boolean true usePluginRegistry 1.0.0+ boolean false offline 1.0.0+ false boolean false proxies 1.0.0+ Proxy * servers 1.0.0+ Server * mirrors 1.0.0+ Configuration of download mirrors for repositories. Mirror * profiles 1.0.0+ Profile * activeProfiles 1.0.0+ String * pluginGroups 1.0.0+ List of groupIds to search for a plugin when that plugin groupId is not explicitly provided. String * 1.0.0+ activeProxy field to null */ public void flushActiveProxy() { this.activeProxy = null; } /** * @return the first active proxy */ public synchronized Proxy getActiveProxy() { if ( activeProxy == null ) { java.util.List proxies = getProxies(); if ( proxies != null && !proxies.isEmpty() ) { for ( Proxy proxy : proxies ) { if ( proxy.isActive() ) { activeProxy = proxy; break; } } } } return activeProxy; } public Server getServer( String serverId ) { Server match = null; java.util.List servers = getServers(); if ( servers != null && serverId != null ) { for ( Server server : servers ) { if ( serverId.equals( server.getId() ) ) { match = server; break; } } } return match; } @Deprecated public Mirror getMirrorOf( String repositoryId ) { Mirror match = null; java.util.List mirrors = getMirrors(); if ( mirrors != null && repositoryId != null ) { for ( Mirror mirror : mirrors ) { if ( repositoryId.equals( mirror.getMirrorOf() ) ) { match = mirror; break; } } } return match; } private java.util.Map profileMap; /** * Reset the profileMap field to null */ public void flushProfileMap() { this.profileMap = null; } /** * @return a Map of profiles field with Profile#getId() as key * @see org.apache.maven.settings.Profile#getId() */ public java.util.Map getProfilesAsMap() { if ( profileMap == null ) { profileMap = new java.util.LinkedHashMap(); if ( getProfiles() != null ) { for ( Profile profile : getProfiles() ) { profileMap.put( profile.getId(), profile ); } } } return profileMap; } ]]> Proxy 1.0.0+ IdentifiableBase <proxy> element contains informations required to a proxy settings. ]]> active 1.0.0+ false true boolean protocol 1.0.0+ String http username 1.0.0+ String password 1.0.0+ String port 1.0.0+ int 8080 host 1.0.0+ String true nonProxyHosts 1.0.0+ String Server 1.0.0+ IdentifiableBase <server> element contains informations required to a server settings. ]]> username 1.0.0+ String password 1.0.0+ String privateKey 1.0.0+ String passphrase 1.0.0+ String filePermissions 1.0.0+ String directoryPermissions 1.0.0+ String configuration DOM Mirror 1.0.0+ IdentifiableBase A download mirror for a given repository. mirrorOf true 1.0.0+ String The server ID of the repository being mirrored, eg "central". This MUST NOT match the mirror id. name false 1.0.0+ String The optional name that describes the mirror. url true 1.0.0+ String The URL of the mirror repository. layout 1.1.0+ String default The layout of the mirror repository. Since Maven 3. mirrorOfLayouts 1.1.0+ String default,legacy The layouts of repositories being mirrored. This value can be used to restrict the usage of the mirror to repositories with a matching layout (apart from a matching id). Since Maven 3. 1.0.0+ Profile 1.0.0+ IdentifiableBase activation 1.0.0+ Activation properties <property.name>property.value</property.name> ]]> Properties String * repositories 1.0.0+ Repository * pluginRepositories 1.0.0+ Repository * Activation 1.0.0+ activeByDefault 1.0.0+ boolean Flag specifying whether this profile is active as a default. jdk 1.0.0+ String os 1.0.0+ ActivationOS property 1.0.0+ ActivationProperty file 1.0.0+ ActivationFile RepositoryBase 1.0.0+ id 1.0.0+ String name 1.0.0+ String url 1.0.0+ String layout 1.0.0+ The type of layout this repository uses for locating and storing artifacts - can be "legacy" or "default". String default 1.0.0+ Repository RepositoryBase 1.0.0+ Repository contains the information needed for establishing connections with remote repository releases 1.0.0+ How to handle downloading of releases from this repository RepositoryPolicy snapshots 1.0.0+ How to handle downloading of snapshots from this repository RepositoryPolicy 1.0.0+ RepositoryPolicy 1.0.0+ Download policy enabled 1.0.0+ Whether to use this repository for downloading this type of artifact. boolean true updatePolicy 1.0.0+ The frequency for downloading updates - can be "always", "daily" (default), "interval:XXX" (in minutes) or "never" (only if it doesn't exist locally). String checksumPolicy 1.0.0+ What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are "fail" or "warn". String ActivationProperty 1.0.0+ name 1.0.0+ String true The name of the property to be used to activate a profile. value 1.0.0+ String The value of the property to be used to activate a profile. ActivationOS 1.0.0+ name 1.0.0+ String The name of the OS to be used to activate a profile. family 1.0.0+ String The general family of the OS to be used to activate a profile (e.g. 'windows') arch 1.0.0+ String The architecture of the OS to be used to activate a profile. version 1.0.0+ String The version of the OS to be used to activate a profile. ActivationFile 1.0.0+ missing 1.0.0+ String The name of the file that should be missing to activate a profile. exists 1.0.0+ String The name of the file that should exist to activate a profile.