Skip to main content

1 minute read - Java For Testers Maven

Maven settings.xml - global and user-specific

Sep 19, 2013

Sometimes you have to amend the Maven settings.xml file to add a proxy or various repositories.

I had to do that a couple of days ago when experimenting with a 3rd party library.

What I sometimes forget, is that there are two settings.xml files. Now I shouldn’t forget this, because it is quite clear on the Maven Apache site.

But I do.

The settings.xml file in

  • %M2_HOME%/conf/settings.xml is the global settings.
  • your .m2 user directory is your user-specific settings.
    • This file doesn’t exist until you create it, which might explain why I forget about it.

Duplicate settings in the user-specific file, override the settings in the global settings.

I was reminded of this because of the permission schemes in Windows 7 which wouldn’t let me save my global settings without upping my permissions to admin.

You can see the combined settings if you issue the command:

mvn help:effective-settings

Some useful references:


You will need a Github account to comment. Or you can contact me with your comment.

I reserve the right to delete spam comments e.g. if your comment adds no value and its purpose is simply to create a backlink to another site offering training, or courses, etc.