I have specified a local repository in my settings.xml in %USERPROFILE%.m2 directory.
<profile>
<id>mainprofile</id>
<repositories>
<repository>
<url>http://maven/maven2</url>
However when I do the maven build, it tries to download from the maven central repo
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/com/tiger/t-parent/4.0.1/t-parent-4.0.1.pom
[INFO] Unable to find resource 'com.tiger:t-parent:pom:4.0.1' in repository central (http://repo1.maven.org/maven2)
Why does this happen? Please help before I shoot myself.
Update: If I explicitly specify the option --settings=%USERPROFILE%\.m2\settings.xml in the maven command line, then it works. Why does it not use it automatically like it is supposed to?