How do I configure Maven for a user rather than globally?
Author: Deron Eriksson
Description: This tutorial demonstrates how to configure maven for a user rather than globally.
Tutorial created using: Windows Vista || JDK 1.6.0_04 || Eclipse Web Tools Platform 2.0.1 (Eclipse 3.3.1)

MavenSW global settings for all users are configured using the settings.xml file in the mavenSW conf directory. To set settings for an individual user, you can create (or copy) a settings.xml file into the .m2 directory in your user home directory. This file will hold maven settings specific to that user rather than globally for all users on that computer.

The settings.xml file that comes with maven in the conf directory contains many useful comments, so I like to copy this settings.xml file to my .m2 directory. I installed maven at C:\dev\apache-maven-2.0.8, so my global settings.xml is located at C:\dev\apache-maven-2.0.8\conf\settings.xml.

global settings.xml file at C:\dev\apache-maven-2.0.8\conf\settings.xml

I copied this settings.xml and pasted it in my home directory's .m2 directory. This .m2 directory was created after I installed maven and ran a maven command, like 'mvn clean'. So, my path to my user settings.xml is C:\Users\Cakes\.m2\settings.xml.

settings.xml copied to C:\Users\Cakes\.m2\settings.xml

I can now make configuration changes to maven using this settings.xml file, which is specific to my particular user on my computer.