Maven - Settings.xml - (User|Local) Configuration

Card Puncher Data Processing


Settings.xml is a configuration file that should not be bundled to any specific project

whereas the pom.xml can be distributed

It contains:

  • configuration information such as the local repository location
  • authentication information such as username and password.



Use the global settings from the Maven installation dir M2_HOME/conf


There are two locations where a settings.xml file may live:

  • The Maven install conf: M2_HOME/conf/settings.xml (configuration for all Maven users on a machine (assuming they're all using the same Maven installation).
  • The user’s install conf: user.home/.m2/settings.xml (configuration for a single user)

This location can be overridden with the CLI option:

  • User level: -s /path/to/user/settings.xml
  • Global Level. -gs /path/to/global/settings.xml


The contents of the settings.xml may use the following expressions:

  • user.home and all other properties system properties (since Maven 3.0)
  • env.myEnvVariable etc. for the environment variables


See Settings.xml Reference for a full description.

Documentation / Reference

Discover More
Card Puncher Data Processing
Maven - (Installation|Configuration)

How I install maven on my computer. Download Apache Maven (3.0.4) Unzip the distribution archive, i.e. to the directory...
Card Puncher Data Processing
Maven - (Password|Credentials)

How to manage credentials: login password within Maven Encrypt the master password Saved it by creating the file m2_home/.m2/settings-security.xml And save it in the settings.xml...
Card Puncher Data Processing
Maven - (Property|Filter)

A property is used to supplied value of resource files at build time. This process is called filtering. A property can be: one of the values defined in your pom.xml, a value defined in the user's...
Card Puncher Data Processing
Maven - (Remote Repository|Server)

Remote repository in maven A remote repository (or server) can be defined as: a source to resolve dependency (via HTTP) or as a target to deploy the artifact (via SCP) The definition dependent on...
Card Puncher Data Processing
Maven - Configuration Files (Pom, Settings, Profiles, )

... Maven configuration occurs at differents levels: Project - The pom.xml file is the core of a project's configuration in Maven. User - this is configuration specific to a particular user: (%USER_HOME%/.m2settings.xmM2_HOMsettings.xProfilesMaven...
Card Puncher Data Processing
Maven - Distribution Management

The distribution Management pom.xml section is responsible to define: the remote repositories how to deploy the project's site and documentation....
Card Puncher Data Processing
Maven - GroupId

GroupId is the first coordinate of an artifact that indicates the unique identifier of the organization or group that created the project. It's the Maven jargon for the package name. org.apache.maven.plugins...
Card Puncher Data Processing
Maven - Local Repository

A local repository is the repository of the local file system of Maven. The default value is /.m2/repository/ Value Example Os /.m2 ~/.m2 Linux/Unix/Mac OS X C:\Windows\System32\config\systemprofile\.m2...
Card Puncher Data Processing
Maven - Repository

in Maven. A repository is a storage of artifacts (jar, war, zip ...) in a file system that is: local: or remote repository (ie via HTTP or SSH) Repository Client translate artifact coordinates...
Card Puncher Data Processing
Maven - Snapshot (Version|Dependency)

A snapshot is a artifact that has not been released. The difference between a release version and a snapshot version is that snapshots might get updates. The snapshot property of a artifact is defined...

Share this page:
Follow us:
Task Runner