title: How to set up maven 3 local plugin repository
body: <p>I need to have a completely offline maven repository due to some limitations. According to <a href="http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException" rel="noreferrer">http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException</a> , only <code>&lt;pluginRepositories&gt;</code> are searched for plugins. So I am wondering how to configure maven to look up plugins in a local file system. I tried using "file://" prefix when setting <code>&lt;url&gt;</code> but it doesn't work.</p>
  
  <pre><code>DEBUG] Verifying availability of /home/dsun/.m2/repository/org/apache/karaf/tooling/features-maven-plugin/2.3.0/features-maven-plugin-2.3.0.jar from [central (http://repo1.maven.org/maven2, releases=true, snapshots=false, managed=false)]
  [ERROR] Plugin org.apache.karaf.tooling:features-maven-plugin:2.3.0 or one of its dependencies could not be resolved: The repository system is offline but the artifact org.apache.karaf.tooling:features-maven-plugin:jar:2.3.0 is not available in the local repository. -&gt; [Help 1]
  org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.karaf.tooling:features-maven-plugin:2.3.0 or one of its dependencies could not be resolved: The repository system is offline but the artifact org.apache.karaf.tooling:features-maven-plugin:jar:2.3.0 is not available in the local repository.
  
  dsun@localhost:&gt; ls /home/dsun/.m2/repository/org/apache/karaf/tooling/features-maven-plugin/2.3.0/features-maven-plugin-2.3.0.jar
  /home/dsun/.m2/repository/org/apache/karaf/tooling/features-maven-plugin/2.3.0/features-maven-plugin-2.3.0.jar
  </code></pre>
  
  <p>The settings.xml</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;settings&gt;      
  &lt;offline&gt;true&lt;/offline&gt;
    &lt;profiles&gt;
    &lt;profile&gt;
      &lt;id&gt;local&lt;/id&gt;
      &lt;pluginRepositories&gt;
        &lt;pluginRepository&gt;
        &lt;id&gt;central&lt;/id&gt;
        &lt;url&gt;file://${env.HOME}/.m2/repository&lt;/url&gt;
        &lt;releases&gt;
          &lt;enabled&gt;true&lt;/enabled&gt;
        &lt;/releases&gt;
        &lt;snapshots&gt;
          &lt;enabled&gt;true&lt;/enabled&gt;
        &lt;/snapshots&gt;
      &lt;/pluginRepository&gt;
    &lt;/pluginRepositories&gt;
     &lt;/profile&gt;
   &lt;/profiles&gt;
  &lt;activeProfiles&gt;
    &lt;activeProfile&gt;local&lt;/activeProfile&gt;
  &lt;/activeProfiles&gt;
  
  &lt;localRepository&gt;${env.HOME}/.m2/repository&lt;/localRepository&gt;
  </code></pre>
  
  <p></p>