title: Maven repository location woes
body: <p>I'm reconfiguring a build server that someone else setup a long time ago to use a new Maven repository.  However, the old repository is still being referenced and I can't figure out where that reference is coming from.</p>
  
  <p>M2_HOME=/usr/share/maven2</p>
  
  <p><strong>/etc/maven2/m2.conf</strong> (usr/share/maven2/conf/m2.conf links here)</p>
  
  <pre><code>main is org.apache.maven.cli.MavenCli from plexus.core
  
  set maven.home default ${user.home}/m2
  
  [plexus.core]
  load ${maven.home}/lib/*.jar
  </code></pre>
  
  <p>/etc/maven2/conf also has a settings.xml with all entries commented out.</p>
  
  <p>The build user has a <strong>~/.m2/settings.xml:</strong> referencing <strong>NewRepo</strong>.</p>
  
  <pre><code>&lt;settings&gt;
      &lt;pluginGroups&gt;
      &lt;/pluginGroups&gt;
      &lt;servers&gt;
      &lt;/servers&gt;
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
              &lt;/activation&gt;
              &lt;id&gt;personal&lt;/id&gt;
              &lt;repositories&gt;
                  &lt;repository&gt;
                      &lt;id&gt;new-repo&lt;/id&gt;
                      &lt;name&gt;New Maven 2 Repo&lt;/name&gt;
                      &lt;url&gt;http://NewRepo/&lt;/url&gt;
                  &lt;/repository&gt;
        &lt;!-- Some other standard repos like maven.org here --&gt;
              &lt;/repositories&gt;
              &lt;pluginRepositories&gt;
                  &lt;pluginRepository&gt;
                      &lt;id&gt;ibiblio&lt;/id&gt;
                      &lt;name&gt;Ibiblio Maven 2 Repo&lt;/name&gt;
                      &lt;url&gt;http://repo1.maven.org/maven2/&lt;/url&gt;
                  &lt;/pluginRepository&gt;
                  &lt;pluginRepository&gt;
                    &lt;id&gt;apache-snapshots&lt;/id&gt;
                    &lt;name&gt;Apache Snapshots Maven 2 Repo&lt;/name&gt;
                    &lt;url&gt;http://people.apache.org./maven-snapshot-repository/&lt;/url&gt;
                  &lt;/pluginRepository&gt;
              &lt;/pluginRepositories&gt;
           &lt;/profile&gt;
       &lt;/profiles&gt;
  &lt;/settings&gt;
  </code></pre>
  
  <p>There is also a /mnt/public/maven/settings.xml with the exact same content as the build user's settings.xml</p>
  
  <p>I searched the entire file system to ensure there are no other settings.xml files.</p>
  
  <p>When running</p>
  
  <pre><code>mvn release:prepare
  </code></pre>
  
  <p>I get the warning:</p>
  
  <blockquote>
    <p>[INFO] NOTE: Maven is executing in
    offline mode. Any artifacts not
    already in your local repository will
    be inaccessible.</p>
  </blockquote>
  
  <p>When running </p>
  
  <pre><code>mvn release:perform
  </code></pre>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>Error deploying artifact: Failed to
    transfer file: http://<strong>OldRepo</strong></p>
  </blockquote>
  
  <p>Where could that reference to http://<strong>OldRepo</strong> be hiding?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The project's pom.xml references a parent POM as follows:</p>
  
  <pre><code>&lt;parent&gt;
      &lt;groupId&gt;MyParent&lt;/groupId&gt;
      &lt;artifactId&gt;maven&lt;/artifactId&gt;
      &lt;version&gt;20090727&lt;/version&gt;
  &lt;/parent&gt;
  </code></pre>
  
  <p>There is no reference to </p>
  
  <pre><code>&lt;distributionManagement&gt;
  </code></pre>
  
  <p>in the project's POM.  I have been unable to locate the parent POM.</p>