title: Maven Javadoc aggregate-jar plugin fails because of unresolved dependencies
body: <p>I have multi-module Maven project in which I run the maven-javadoc-plugin to generate javadoc. In my parent pom.xml I have defined the plugin build as follows:</p>
  
  <pre><code>&lt;plugin&gt;
     &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
     &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
     &lt;version&gt;2.9.1&lt;/version&gt;
     &lt;configuration&gt;
        &lt;!-- Default configuration for all reports --&gt;
     &lt;/configuration&gt;
     &lt;executions&gt;
        &lt;execution&gt;
           &lt;id&gt;aggregate&lt;/id&gt;
           &lt;goals&gt;
              &lt;goal&gt;aggregate-jar&lt;/goal&gt;
           &lt;/goals&gt;
           &lt;phase&gt;install&lt;/phase&gt;
                   &lt;configuration&gt;
                       &lt;!-- Specific configuration for the aggregate report --&gt;
                   &lt;/configuration&gt;
        &lt;/execution&gt;
     &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>When I run <code>mvn clean install</code> the build fails with unresolved dependencies, but I see the following warning:</p>
  
  <blockquote>
    <p>[WARNING] The dependency:
    [my.application:my-module:jar:1.7.1] can't be resolved but
    has been found in the reactor (probably snapshots). This dependency
    has been excluded from the Javadoc classpath. You should rerun javadoc
    after executing mvn install.</p>
  </blockquote>
  
  <p>As I am currently building my-module 1.7.1, I would assume Maven to detect this and run the aggregate-jar after building my-module, but for some reason it expects my-module to already be installed in a repo. </p>
  
  <p>My Maven version is 3.0.4. Please keep in mind that I am new to Maven builds so this may be a very simple question, but I was not able to find any answer. </p>
  
  <p>Some observations:</p>
  
  <ul>
  <li>The build succeeds if I first run <code>mvn clean install</code> without the javadoc plugin <code>aggregate-jar</code> goal</li>
  <li>The javadoc plugin <code>aggregate</code> goal runs fine.</li>
  <li>This <a href="http://jira.codehaus.org/browse/MNG-4618">bug</a> refers exactly to my issue, but should have been solved in Maven 3 (2010)</li>
  </ul>