title: Maven site on multi module project could not resolve dependency
body: <p>I want to split my continous integration job (Hudson) into two steps. (Because the runtime with build and reporting together takes too long.)
  In the first job, I build my <strong>multi module maven project</strong> with "mvn package" successfully.
  Then I copy my workspace to another location and try to build the project again only with the goal "site" and/or findbugs/checkstyle/pmd to create reports.
  But this doesn't work! Maven <strong>can't resolve a dependency</strong> of my submodules.
  (But all JARs are available in its target folders.)</p>
  
  <p>Example:
  My structure looks like this:</p>
  
  <ul>
  <li>Parent
  <ul>
  <li>A</li>
  <li>B</li>
  <li>C</li>
  <li>D</li>
  </ul></li>
  </ul>
  
  <p>Project C has as dependency project B.</p>
  
  <p>When I build everything with "mvn site", it generates for project A and B all reports. But halted at project C with error message "Could not resolve dependencies for project B."
  But project B is already builded with "mvn package". I.e. I can find the JAR file of project B in its target folder.</p>
  
  <p>Is there any way to resolve the dependency from submodule B without a "mvn install"?
  (I don't wanna do this on my ci server. I fear it could be dangerous for other jobs with the same code base.)</p>
  
  <p><strong>Update 08/20/12:</strong></p>
  
  <p>POM of root folder:</p>
  
  
  
  <pre class="lang-xml prettyprint-override"><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/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;name&gt;Foo&lt;/name&gt;
      &lt;groupId&gt;foo&lt;/groupId&gt;
      &lt;artifactId&gt;bar&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;modules&gt;
          &lt;module&gt;parent&lt;/module&gt;
      &lt;/modules&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Parent POM:</p>
  
  <pre class="lang-xml prettyprint-override"><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/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;name&gt;Foo&lt;/name&gt;
      &lt;groupId&gt;foo&lt;/groupId&gt;
      &lt;artifactId&gt;parent&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;modules&gt;
          &lt;module&gt;../bar-a&lt;/module&gt;
          &lt;module&gt;../bar-b&lt;/module&gt;
          &lt;module&gt;../bar-c&lt;/module&gt;
          &lt;module&gt;../bar-d&lt;/module&gt;
      &lt;/modules&gt;
      [...]
      &lt;reporting&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;findbugs-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.5.1&lt;/version&gt;
                  [...]
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-pmd-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.7.1&lt;/version&gt;
                  [...]
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-checkstyle-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.9.1&lt;/version&gt;            
                  [...]
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/reporting&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>POM of B:</p>
  
  <pre class="lang-xml prettyprint-override"><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/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;foo&lt;/groupId&gt;
          &lt;artifactId&gt;parent&lt;/artifactId&gt;
          &lt;version&gt;1.0&lt;/version&gt;
          &lt;relativePath&gt;../parent&lt;/relativePath&gt;
      &lt;/parent&gt;
      &lt;name&gt;Bar B&lt;/name&gt;
      &lt;artifactId&gt;bar-b&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;  
      [...]
  &lt;/project&gt;
  </code></pre>
  
  <p>POM of C:</p>
  
  <pre class="lang-xml prettyprint-override"><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/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;foo&lt;/groupId&gt;
          &lt;artifactId&gt;parent&lt;/artifactId&gt;
          &lt;version&gt;1.0&lt;/version&gt;
          &lt;relativePath&gt;../parent&lt;/relativePath&gt;
      &lt;/parent&gt;
      &lt;name&gt;Bar C&lt;/name&gt;
      &lt;artifactId&gt;bar-c&lt;/artifactId&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      [...]
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;foo&lt;/groupId&gt;
              &lt;artifactId&gt;bar-b&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      [...]
  &lt;/project&gt;
  </code></pre>