title: How to disable usage of public maven repo
body: <p>I've setup a maven repository(Artifactory) in my LAN which has no internet access. I've also change my maven settings.xml to use this internal repo only. However when I try to create a maven project, it still try to access the public repo(<a href="http://repo1.maven.org/maven2" rel="nofollow">http://repo1.maven.org/maven2</a>) for some downloads. Where has I done wrong?</p>
  
  <p>For example, when I perform the following:</p>
  
  <pre><code>mvn archetype:generate -DgroupId=demo.john -DartifactId=struts2demo 
      -DarchetypeGroupId=org.apache.struts 
      -DarchetypeArtifactId=struts2-archetype-starter 
      -DinteractiveMode=false
  </code></pre>
  
  <p>there is the following waring reported:</p>
  
  <pre><code>... ...
  [INFO] Generating project in Batch mode
  [WARNING] Error reading archetype catalog http://repo1.maven.org/maven2
  org.apache.maven.wagon.TransferFailedException: repo1.mavne.org
      at org.apache.maven.wagon.shared. ...
      ... ...
  </code></pre>
  
  <p>Sometimes the it build successfully with this waring, but sometime it won't.</p>
  
  <p>Below is my maven's settings.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"     xmlns="http://maven.apache.org/SETTINGS/1.1.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;servers&gt;
      &lt;server&gt;
        &lt;id&gt;central&lt;/id&gt;
        &lt;username&gt;admin&lt;/username&gt;
        &lt;password&gt;password&lt;/password&gt;
      &lt;/server&gt;
      &lt;server&gt;
        &lt;id&gt;snapshots&lt;/id&gt;
        &lt;username&gt;admin&lt;/username&gt;
        &lt;password&gt;password&lt;/password&gt;
      &lt;/server&gt;
    &lt;/servers&gt;
    &lt;mirrors&gt;
      &lt;mirror&gt;
        &lt;id&gt;my-company-repo&lt;/id&gt;
        &lt;name&gt;A maven repo in local network&lt;/name&gt;
        &lt;url&gt;http://my.internal.server/artifactory/repo&lt;url&gt;
      &lt;/mirror&gt;
      &lt;mirrorOf&gt;*&lt;/mirrorOf&gt;
    &lt;/mirrors&gt;
    &lt;profiles&gt;
      &lt;profile&gt;
        &lt;id&gt;artifactory&lt;/id&gt;
        &lt;repositories&gt;
          &lt;repository&gt;
            &lt;snapshots&gt;
              &lt;enabled&gt;false&lt;/enabled&gt;
            &lt;/snapshots&gt;
            &lt;id&gt;central&lt;/id&gt;
            &lt;name&gt;libs-release&lt;/name&gt;
            &lt;url&gt;http://my.internal.server/artifactory/libs-release&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
            &lt;snapshots /&gt;
            &lt;id&gt;snapshots&lt;/id&gt;
            &lt;name&gt;libs-snapshot&lt;/name&gt;
            &lt;url&gt;http://my.internal.server/artifactory/libs-snapshot&lt;/url&gt;
          &lt;/repository&gt;
        &lt;/repositories&gt;
        &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
            &lt;snapshots&gt;
              &lt;enabled&gt;false&lt;/enabled&gt;
            &lt;/snapshots&gt;
            &lt;id&gt;central&lt;/id&gt;
            &lt;name&gt;plugins-release&lt;/name&gt;
            &lt;url&gt;http://my.internal.server/artifactory/plugins-release&lt;/url&gt;
          &lt;/pluginRepository&gt;
          &lt;pluginRepository&gt;
            &lt;snapshots /&gt;
            &lt;id&gt;snapshots&lt;/id&gt;
            &lt;name&gt;plugins-snapshot&lt;/name&gt;
            &lt;url&gt;http://my.internal.server/artifactory/plugins-snapshot&lt;/url&gt;
          &lt;/pluginRepository&gt;
        &lt;/pluginRepositories&gt;
      &lt;/profile&gt;
    &lt;/profiles&gt;
    &lt;activeProfiles&gt;
      &lt;activeProfile&gt;artifactory&lt;/activeProfile&gt;
    &lt;/activeProfiles&gt;
  &lt;/settings&gt; 
  </code></pre>