title: Maven dependency not getting corresponding POM file downloaded
body: <p>I've got a maven project that has a dependency that it gets from a remote Nexus repository. I believe that the dependency was not built with maven, and just uploaded with a barebones POM file. The layout on the server looks fine though, so it was probably deployed with maven.</p>
  
  <p>When maven downloads the dependency to my local repository, it downloads the jar file, but doesn't get the POM. At build time, there's a warning that the POM couldn't be found, and no dependency information available. I'm not actually using any of its code directly (it's actually a transitive dependency), so build completes successfully.</p>
  
  <p>The real problem arises when I try to perform site generation for my project. The part that tries to generate the dependency graph report fails, because it can't find the POM for this dependency to work with.</p>
  
  <p>I can't figure out why I'm not getting the POM downloaded, when the jar file for it gets downloaded just fine.</p>
  
  <p>The POM file for that particular dependency looks like this (you can see why I don't think it's built with maven :))</p>
  
  <pre><code>&lt;project&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.company.component&lt;/groupId&gt;
      &lt;artifactId&gt;my-artifact&lt;/artifactId&gt;
      &lt;version&gt;1.0.1&lt;/version&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>You'll notice that the root <code>&lt;project&gt;</code> element doesn't contain any namespace or schema information. Could this be related? Could it be Nexus not recognizing it as a POM? Apart from the possibility of some small syntactical character missing or mistaken, this is my current train of thought...please don't let it influence any ideas you may have! :)</p>
  
  <p>Also, while troubleshooting, I've pasted the contents of the remote POM file into the correct file location in my local .m2 repo. Everything works fine when I do that. This isn't an acceptable fix though, because we will need the build to be done on our CI build servers.</p>
  
  <p>Any help/suggestions greatly appreciated!</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I've managed to temporarily solve my actual problem, but the strangeness here still exists. I solved the problem by explicitly excluding the thing that depends on this from the dependency that's in my pom (the trouble dep is two steps away at least, and I'm not using anything that uses the thing that pulls it in):</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.company.utility&lt;/groupId&gt;
      &lt;artifactId&gt;shared-utility&lt;/artifactId&gt;
      &lt;version&gt;1.2.3&lt;/version&gt;
  
      &lt;exclusions&gt;
          &lt;exclusion&gt;
              &lt;groupId&gt;com.company.common.component&lt;/groupId&gt;
              &lt;artifactId&gt;thing-that-puls-in-bad-artifact&lt;/artifactId&gt;
          &lt;/exclusion&gt;
      &lt;/exclusions&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>I've created a dummy project to prove it, with the following POM:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.company.project&lt;/groupId&gt;
      &lt;artifactId&gt;my-project&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.company.component&lt;/groupId&gt;
              &lt;artifactId&gt;bad-artifact&lt;/artifactId&gt;
              &lt;version&gt;1.0.1&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Now in <code>~/.m2/repository/com/company/compnent/bad-artifact/1.0.1/</code>, I've got:</p>
  
  <pre><code>_remote.repositories
  bad-artifact-1.0.1.jar
  bad-artifact-1.0.1.jar.sha1
  bad-artifact-1.0.1.pom.lastUpdated
  </code></pre>
  
  <p>With no actual POM file.</p>