Hunter Jackson
Hunter Jackson

Reputation: 335

How to include and link to external javadocs

I'm currently generating javadocs for a project which relies heavily on some external libraries such as guava. All of the dependencies are listed in the pom.xml and to avoid having to manually update links every time a library version is changed I'd like to generate/download the javadocs for all of our dependencies and link to local versions of the javadocs for the external libraries in the project's javadocs.

I've seen <offlineLinks> and I don't believe this solves the entire issue however it's very well possible I'm missing something here.

Any help would be greatly appreciated!

Upvotes: 2

Views: 493

Answers (1)

srikanta
srikanta

Reputation: 2999

Try using <links> in your javadoc configuration. You can find more documentation on how to use it here

A few things to note:

  1. For me, the external links worked only with maven-javadoc-plugin version 3.1.0 and not with 3.0.1
  2. All external links should have a downloadable package-list file i.e. if you have added a link https://example.com/apidocs/, then there should be a file downloadable at https://example.com/apidocs/package-list

Upvotes: 1

Related Questions