The maven-javadoc-plugin has an option detectLinks which enables detection of Javadoc links of dependent projects. The detection works only if the dependent project follows the default Maven conventions (javadoc must be located under ${project.url}/apidocs).
The project URL of assertj-core is https://assertj.github.io/doc/#assertj-core. The Maven plugin first checks if the URL https://assertj.github.io/doc/#assertj-core/apidocs/element-list is accessible and then forwards the URL 'https://assertj.github.io/doc/#assertj-core/apidocs' to the javadoc tool.
But the javadoc tool interprets the # character, reads the URL https://assertj.github.io/doc/package-list and obviously fails:
Error fetching URL: https://assertj.github.io/doc/#assertj-core/apidocs/ (java.io.FileNotFoundException: https://assertj.github.io/doc/package-list)
I can workaround this by defining in my project:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<dependencyLinks>
<dependencyLink>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<url>https://www.javadoc.io/doc/org.assertj/assertj-core/${assertj.version}</url>
</dependencyLink>
</dependencyLinks>
</configuration>
</plugin>
Maybe the project URL of assertj-core should be https://www.javadoc.io/doc/org.assertj/assertj-core/${assertj.version} instead of https://assertj.github.io/doc/#assertj-core. But then the javadoc must be located under https://www.javadoc.io/doc/org.assertj/assertj-core/${assertj.version}/apidocs.
The
maven-javadoc-pluginhas an option detectLinks which enables detection of Javadoc links of dependent projects. The detection works only if the dependent project follows the default Maven conventions (javadoc must be located under${project.url}/apidocs).The project URL of assertj-core is
https://assertj.github.io/doc/#assertj-core. The Maven plugin first checks if the URLhttps://assertj.github.io/doc/#assertj-core/apidocs/element-listis accessible and then forwards the URL'https://assertj.github.io/doc/#assertj-core/apidocs'to the javadoc tool.But the javadoc tool interprets the
#character, reads the URLhttps://assertj.github.io/doc/package-listand obviously fails:I can workaround this by defining in my project:
Maybe the project URL of assertj-core should be
https://www.javadoc.io/doc/org.assertj/assertj-core/${assertj.version}instead ofhttps://assertj.github.io/doc/#assertj-core. But then the javadoc must be located underhttps://www.javadoc.io/doc/org.assertj/assertj-core/${assertj.version}/apidocs.