title: Maven not using local repository
body: <p>I have a small problem with my Maven config. All other questions and answers here didn't solve my problem, so I'm starting a new question.</p>
  
  <p>My problem is, that my Maven is not using the local repository. It's always fetching the artifacts from the remote repositories.</p>
  
  <p>When an artifact is downloaded or when I build a project it is installed in the local repository, so the path is correct.</p>
  
  <p>The problem is: When I build one SNAPSHOT project, it is only installed in the local repository (should be like this, don't want to publish it on my nexus every time). When I build another project having the previous one as dependency in the pom.xml maven wants to download the artifact from the nexus server where it didn't find it instead of taking it from the local repository.</p>
  
  <p>This is my maven config:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
    &lt;localRepository&gt;C:\Users\Marc\.m2\repository&lt;/localRepository&gt;
    &lt;interactiveMode&gt;false&lt;/interactiveMode&gt;
    &lt;usePluginRegistry&gt;false&lt;/usePluginRegistry&gt;
    &lt;pluginGroups&gt;
    &lt;/pluginGroups&gt;
    &lt;servers&gt;
      &lt;server&gt;
        &lt;id&gt;releases&lt;/id&gt;
        &lt;username&gt;MY_USERNAME&lt;/username&gt;
        &lt;password&gt;MY_PASSWORD&lt;/password&gt;
        &lt;filePermissions&gt;664&lt;/filePermissions&gt;
        &lt;directoryPermissions&gt;775&lt;/directoryPermissions&gt;
      &lt;/server&gt;
      &lt;server&gt;
        &lt;id&gt;snapshots&lt;/id&gt;
        &lt;username&gt;MY_USERNAME&lt;/username&gt;
        &lt;password&gt;MY_PASSWORD&lt;/password&gt;
        &lt;filePermissions&gt;664&lt;/filePermissions&gt;
        &lt;directoryPermissions&gt;775&lt;/directoryPermissions&gt;
      &lt;/server&gt;
      &lt;server&gt;
        &lt;id&gt;nexus&lt;/id&gt;
        &lt;username&gt;MY_USERNAME&lt;/username&gt;
        &lt;password&gt;MY_PASSWORD&lt;/password&gt;
        &lt;filePermissions&gt;664&lt;/filePermissions&gt;
        &lt;directoryPermissions&gt;775&lt;/directoryPermissions&gt;
      &lt;/server&gt;
    &lt;/servers&gt;
    &lt;profiles&gt;
      &lt;profile&gt;
        &lt;id&gt;nexussrv&lt;/id&gt;
        &lt;repositories&gt;
          &lt;repository&gt;
            &lt;id&gt;snapshots&lt;/id&gt;
            &lt;url&gt;http://nexus/content/repositories/snapshots&lt;/url&gt;
            &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;updatePolicy&gt;always&lt;/updatePolicy&gt;
            &lt;/snapshots&gt;
            &lt;releases&gt;
              &lt;enabled&gt;false&lt;/enabled&gt;
            &lt;/releases&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
            &lt;id&gt;releases&lt;/id&gt;
            &lt;url&gt;http://nexus/content/repositories/releases&lt;/url&gt;
            &lt;releases&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;updatePolicy&gt;always&lt;/updatePolicy&gt;
            &lt;/releases&gt;
            &lt;snapshots&gt;
              &lt;enabled&gt;false&lt;/enabled&gt;
            &lt;/snapshots&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
            &lt;id&gt;nexus&lt;/id&gt;
            &lt;url&gt;http://nexus/content/groups/public&lt;/url&gt;
          &lt;/repository&gt;
        &lt;/repositories&gt;
      &lt;/profile&gt;
    &lt;/profiles&gt;
    &lt;activeProfiles&gt;
      &lt;activeProfile&gt;nexussrv&lt;/activeProfile&gt;
    &lt;/activeProfiles&gt;
  &lt;/settings&gt;
  </code></pre>
  
  <p>Downloading from the nexus and publishing artifacts (SNAPSHOT and RELEASE) to the nexus work with this config but it doesn't use artifacts from the local repository.</p>
  
  <p>Thanks for your Help!</p>