title: How to upload maven plugin to Nexus repository?
body: <p>I want to upload my custom maven plugin to nexus repository.</p>
  
  <p>My problem is that when I upload my plugin to nexus via web IU like ordinary dependency, maven can't find it:</p>
  
  <blockquote>
    <p>Plugin com.huawei:maven-project-version-plugin:1.0 or one of its
    dependencies could not be resolved: Failed to read artifact descriptor
    for com.huawei:maven-project-version-plugin:jar:1.0: Failure to find
    com.mycompany:maven-project-version-plugin:pom:1.0 in
    <a href="http://localhost:8081/nexus/content/groups/public" rel="noreferrer">http://localhost:8081/nexus/content/groups/public</a> was cached in the
    local repository, resolution will not be reattempted until the update
    interval of nexus has elapsed or updates are forced -> [Help 1]</p>
  </blockquote>
  
  <p>But when I am install my plugin to maven local repositiry (not nexus) via command line all is fine.</p>
  
  <p>So, what is the difference between installing custom maven plugin and installing "non plugin" artefacts? Are there any tricks?</p>
  
  <p>My settings.xml:
      </p>
  
  <pre><code>&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;mirrors&gt;
      &lt;mirror&gt;
        &lt;!--This sends everything else to /public --&gt;
        &lt;id&gt;nexus&lt;/id&gt;
        &lt;mirrorOf&gt;*&lt;/mirrorOf&gt;
        &lt;url&gt;http://localhost:8081/nexus/content/groups/public&lt;/url&gt;
      &lt;/mirror&gt;
    &lt;/mirrors&gt;
  
    &lt;profiles&gt;
      &lt;profile&gt;
        &lt;id&gt;nexus&lt;/id&gt;
        &lt;!--Enable snapshots for the built in central repo to direct --&gt;
        &lt;!--all requests to nexus via the mirror --&gt;
        &lt;repositories&gt;
          &lt;repository&gt;
            &lt;id&gt;central&lt;/id&gt;
            &lt;url&gt;http://central&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;/repository&gt;
        &lt;/repositories&gt;
       &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
            &lt;id&gt;central&lt;/id&gt;
            &lt;url&gt;http://central&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;!--make the profile active all the time --&gt;
      &lt;activeProfile&gt;nexus&lt;/activeProfile&gt;
    &lt;/activeProfiles&gt;
  &lt;/settings&gt;
  </code></pre>