What download documentation does for Maven dependency in IntelliJ?

Viewed 98

I am using IntelliJ.

I know that by default Maven downloads only a Jar file. So, when I want to see the source code, it shows the decompiled java code.

When I say download sources on the Maven tab on the right, it downloads the real source code with comments written.

This is what download sources does, but download sources and download documentation are separated. What download documentation does? Aren't those comments a documentation? What documentation it downloads?

1 Answers

It downloads the javadoc jar for the dependency. It contains documentation in HTML format that is pre-built from the sources using the javadoc tool.

Maven dependencies usually come in 3 files:

  • attach-source-javadoc-1.0-SNAPSHOT.jar
  • attach-source-javadoc-1.0-SNAPSHOT-sources.jar
  • attach-source-javadoc-1.0-SNAPSHOT-javadoc.jar

This action downloads the latter (if available).

In IntelliJ IDEA javadoc can be used to display External documentation in the browser (Shift+F1). Quick documentation (Ctrl+Q) will also work from just the sources and doesn't require javadoc.

Related