diff --git a/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java b/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java index 14b320bc1d..ebd29d0d17 100644 --- a/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java +++ b/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java @@ -51,6 +51,11 @@ public class DefaultMavenSettingsBuilder { Settings globalSettings = readSettings( globalSettingsFile ); + if ( userSettingsFile == null ) + { + userSettingsFile = new File( new File( System.getProperty( "user.home" ) ), ".m2/settings.xml" ); + } + Settings userSettings = readSettings( userSettingsFile ); if ( globalSettings == null )