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:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.2</version>
<configuration>
<reportOutputDirectory>${project.basedir}/target</reportOutputDirectory>
<destDir>javadoc</destDir>
<windowtitle>Epiphany</windowtitle>
<doctitle>Epiphany</doctitle>
<show>private</show>
<detectLinks>false</detectLinks>
<detectOfflineLinks>true</detectOfflineLinks>
<linksource>true</linksource>
<detectJavaApiLink>false</detectJavaApiLink>
<additionalparam>-Xdoclint:none</additionalparam>
<links>
<link>http://docs.oracle.com/javase/8/docs/api</link>
</links>
</configuration>
<executions>
<execution>
<goals>
<goal>javadoc</goal>
<goal>test-javadoc</goal>
</goals>
</execution>
</executions>
</plugin>
I have the source set to Java 8 in my maven compiler configuration. I have tried using detectJavaApiLink
set to true
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.
I have tried setting detectJavaApiLink
to false
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:
[WARNING] javadoc: warning - Error fetching URL: http://docs.oracle.com/javase/8/docs/api
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.
UPDATE:
Changed my version of the maven javadoc plugin to 2.10.3. Now, if I set detectJavaApiLink
to true
and remove the link for Java 8 javadoc, the javadoc generated properly links to Java API classes and used the simplified names.
However, I am still having problems with my 3rd party dependencies and linking to their Javadoc. If I set detectLinks
to true
, it fails to find the javadoc for any of them. If I set it to false
and manually configure the location, I still get an error message saying it cannot fetch the URL:
[WARNING] javadoc: warning - Error fetching URL: https://selenium.googlecode.com/git/docs/api/java
My updated pom configuration for the maven javadoc plugin is below:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<configuration>
<reportOutputDirectory>${project.basedir}/target</reportOutputDirectory>
<destDir>javadoc</destDir>
<windowtitle>Epiphany</windowtitle>
<doctitle>Epiphany</doctitle>
<show>private</show>
<detectLinks>false</detectLinks>
<detectOfflineLinks>true</detectOfflineLinks>
<linksource>true</linksource>
<additionalparam>-Xdoclint:none</additionalparam>
<detectJavaApiLink>true</detectJavaApiLink>
<links>
<link>https://selenium.googlecode.com/git/docs/api/java</link>
</links>
</configuration>
<executions>
<execution>
<goals>
<goal>javadoc</goal>
<goal>test-javadoc</goal>
</goals>
</execution>
</executions>
</plugin>
UPDATE 2:
Defect report filed with MJAVADOC: