title: Java 8 + Maven Javadoc plugin: Error fetching URL
body: <p>I am attempting to generate Javadoc that actually links to the Javadoc for my dependencies. I have tried various means to generate Javadoc which does not produce the fully qualified class names for references to classes from my dependencies. I wanted links to the Java doc with the simplified class names. However, even with Java API classnames, I get NO links and have fully qualified class names. I am working with Java 8. I have the following configuration:</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.10.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;reportOutputDirectory&gt;${project.basedir}/target&lt;/reportOutputDirectory&gt;
                  &lt;destDir&gt;javadoc&lt;/destDir&gt;
                  &lt;windowtitle&gt;Epiphany&lt;/windowtitle&gt;
                  &lt;doctitle&gt;Epiphany&lt;/doctitle&gt;
                  &lt;show&gt;private&lt;/show&gt;
                  &lt;detectLinks&gt;false&lt;/detectLinks&gt;
                  &lt;detectOfflineLinks&gt;true&lt;/detectOfflineLinks&gt;
                  &lt;linksource&gt;true&lt;/linksource&gt;
                  &lt;detectJavaApiLink&gt;false&lt;/detectJavaApiLink&gt;
                  &lt;additionalparam&gt;-Xdoclint:none&lt;/additionalparam&gt;
                  &lt;links&gt;
                      &lt;link&gt;http://docs.oracle.com/javase/8/docs/api&lt;/link&gt;
                  &lt;/links&gt;
  
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;javadoc&lt;/goal&gt;
                          &lt;goal&gt;test-javadoc&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>I have the source set to Java 8 in my maven compiler configuration. I have tried using <code>detectJavaApiLink</code> set to <code>true</code> and leaving out the link to the Java 8 Javadoc, but Javadoc does not generate links to Java API classes and all references to them in my Javadoc are fully qualified class names. </p>
  
  <p>I have tried setting <code>detectJavaApiLink</code> to <code>false</code> and using the above configuration with a specified URL(without and without a trailing slash) and I get the same result, along with this error:</p>
  
  <pre><code>[WARNING] javadoc: warning - Error fetching URL: http://docs.oracle.com/javase/8/docs/api
  </code></pre>
  
  <p>I have tried detecting links based on my declared dependencies, and I have tried setting it to false and then providing links to the Javadoc and I still get no links and all class names from classes in my dependencies are fully qualified. What the heck am I doing wrong? The package-list files are available at the URLs specified, so I don't get why Javadoc cannot access them or the Javadoc located there.</p>
  
  <p>UPDATE:</p>
  
  <p>Changed my version of the maven javadoc plugin to 2.10.3. Now, if I set <code>detectJavaApiLink</code> to <code>true</code> and remove the link for Java 8 javadoc, the javadoc generated properly links to Java API classes and used the simplified names. </p>
  
  <p>However, I am still having problems with my 3rd party dependencies and linking to their Javadoc. If I set <code>detectLinks</code> to <code>true</code>, it fails to find the javadoc for any of them. If I set it to <code>false</code> and manually configure the location, I still get an error message saying it cannot fetch the URL:</p>
  
  <pre><code>[WARNING] javadoc: warning - Error fetching URL: https://selenium.googlecode.com/git/docs/api/java
  </code></pre>
  
  <p>My updated pom configuration for the maven javadoc plugin is below:</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.10.3&lt;/version&gt;
          &lt;configuration&gt;
              &lt;reportOutputDirectory&gt;${project.basedir}/target&lt;/reportOutputDirectory&gt;
              &lt;destDir&gt;javadoc&lt;/destDir&gt;
              &lt;windowtitle&gt;Epiphany&lt;/windowtitle&gt;
              &lt;doctitle&gt;Epiphany&lt;/doctitle&gt;
              &lt;show&gt;private&lt;/show&gt;
              &lt;detectLinks&gt;false&lt;/detectLinks&gt;
              &lt;detectOfflineLinks&gt;true&lt;/detectOfflineLinks&gt;
              &lt;linksource&gt;true&lt;/linksource&gt;
              &lt;additionalparam&gt;-Xdoclint:none&lt;/additionalparam&gt;
              &lt;detectJavaApiLink&gt;true&lt;/detectJavaApiLink&gt;
              &lt;links&gt;
                  &lt;link&gt;https://selenium.googlecode.com/git/docs/api/java&lt;/link&gt;
              &lt;/links&gt;
          &lt;/configuration&gt;
          &lt;executions&gt;
              &lt;execution&gt;
                  &lt;goals&gt;
                      &lt;goal&gt;javadoc&lt;/goal&gt;
                      &lt;goal&gt;test-javadoc&lt;/goal&gt;
                  &lt;/goals&gt;
              &lt;/execution&gt;
          &lt;/executions&gt;
      &lt;/plugin&gt;
  </code></pre>
  
  <p>UPDATE 2:</p>
  
  <p>Defect report filed with MJAVADOC:</p>
  
  <p><a href="https://issues.apache.org/jira/browse/MJAVADOC-427" rel="nofollow">https://issues.apache.org/jira/browse/MJAVADOC-427</a></p>