title: Maven site plugin or one of it's dependencies could not be resolved
body: <p>I am in a restricted network which doesn't allow access to dowloading files from the internet, as a result we have a local Nexus server running.</p>
  
  <p>Whitelisting proxies is not an option</p>
  
  <p>I need to update our common java libraries repository, I have managed to create a process for uploading new artifacts to nexus.</p>
  
  <ol>
  <li>Use a settings.xml which allows connection to central</li>
  <li>Download all new artifacts using a pom with the new dependencies declared</li>
  <li>This downloads all jars/poms to <code>~/.m2/repository</code>. I have a python script which copies the contents of repository to another temporary directory, it then walks this directory and runs <code>mvn deploy:deploy-file</code> for each jar/pom it comes across.</li>
  <li>I then switch my settings.xml with one which only allows connection to nexus and not central.</li>
  </ol>
  
  <p>In theory this sounded great but when I run <code>mvn dependency:resolve</code> with the local settings.xml I get the following</p>
  
  <pre><code>[INFO] Scanning for projects...
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom (4 KB at 23.2 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/22/maven-plugins-22.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/22/maven-plugins-22.pom (13 KB at 187.3 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/maven-parent/21/maven-parent-21.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/maven-parent/21/maven-parent-21.pom (26 KB at 357.5 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/apache/10/apache-10.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/apache/10/apache-10.pom (15 KB at 147.5 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar (25 KB at 325.1 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom (7 KB at 100.5 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/23/maven-plugins-23.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/23/maven-plugins-23.pom (9 KB at 149.7 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/maven-parent/22/maven-parent-22.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/maven-parent/22/maven-parent-22.pom (30 KB at 215.2 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/apache/11/apache-11.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/apache/11/apache-11.pom (15 KB at 278.2 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.jar
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.jar (27 KB at 355.7 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom (6 KB at 91.4 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.jar
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.jar (27 KB at 494.4 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.pom (21 KB at 312.7 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/24/maven-plugins-24.pom
  [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.3: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.3
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom (5 KB at 81.1 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/12/maven-plugins-12.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/12/maven-plugins-12.pom (12 KB at 47.6 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/maven-parent/9/maven-parent-9.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/maven-parent/9/maven-parent-9.pom (33 KB at 305.4 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/apache/4/apache-4.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/apache/4/apache-4.pom (5 KB at 75.7 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.jar
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.jar (24 KB at 451.4 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom (15 KB at 185.0 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/16/maven-plugins-16.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/16/maven-plugins-16.pom (13 KB at 252.9 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/maven-parent/15/maven-parent-15.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/maven-parent/15/maven-parent-15.pom (24 KB at 366.3 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/apache/6/apache-6.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/apache/6/apache-6.pom (13 KB at 137.3 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.jar
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.jar (204 KB at 2193.2 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.pom (12 KB at 116.5 KB/sec)
  [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.8: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-release-plugin/2.3.2/maven-release-plugin-2.3.2.pom
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-release-plugin/2.3.2/maven-release-plugin-2.3.2.pom (10 KB at 116.5 KB/sec)
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/release/maven-release/2.3.2/maven-release-2.3.2.pom
  [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.3.2: Plugin org.apache.maven.plugins:maven-release-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.3.2
  Downloading: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml
  Downloading: http://localhost:8082/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml (834 B at 6.7 KB/sec)
  Downloaded: http://localhost:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml (3 KB at 20.5 KB/sec)
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 3.776 s
  [INFO] Finished at: 2015-06-17T09:50:07+01:00
  [INFO] Final Memory: 11M/310M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8: Failure to find org.apache.maven.plugins:maven-plugins:pom:24 in http://localhost:8082/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
  </code></pre>
  
  <p>It has problems resolving dependencies for a number of maven plugins, I have tried looking through the plugin poms and checking to see I have the dependencies in Nexus, but I'm obviously still missing some.</p>
  
  <p>Is there an easy way to see which dependencies it can't resolve?</p>
  
  <p>Here's my settings.xml</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;settings&gt;
      &lt;mirrors&gt;
          &lt;mirror&gt; 
              &lt;id&gt;nexus&lt;/id&gt;
              &lt;mirrorOf&gt;*&lt;/mirrorOf&gt;
              &lt;url&gt;http://localhost:8082/nexus/content/groups/public&lt;/url&gt;
          &lt;/mirror&gt;
      &lt;/mirrors&gt;
      &lt;servers&gt;  
          &lt;server&gt;    
              &lt;id&gt;deployment&lt;/id&gt;    
              &lt;username&gt;admin&lt;/username&gt;    
              &lt;password&gt;admin123&lt;/password&gt;  
          &lt;/server&gt;
      &lt;/servers&gt;
      &lt;profiles&gt;
         &lt;profile&gt; 
             &lt;id&gt;nexus&lt;/id&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;activeProfile&gt;nexus&lt;/activeProfile&gt;
      &lt;/activeProfiles&gt;
  &lt;/settings&gt;
  </code></pre>