how can I access spark javadoc or sources from java project?

In your sbt build file you can always do this:

"org.apache.spark" %% "spark-core" % versions('spark) withSources() withJavadoc(),
"org.apache.spark" %% "spark-sql" % versions('spark) withSources() withJavadoc(),

versions('spark) is just the version of spark that you are using.


After discussion in the comments the solution appears to be to just add manually the JavaDoc to desired "Module" or Project.

The detailed answer is located at the following thread Attaching additional javadoc in Intellij IDEA

Then select the "Dependencies" tab, select the dependency that's missing the javadoc and click "Edit". In the window that just showed up you see two buttons "Attach Javadoc" and "Specify Javadoc URL". If you have the javadoc in a jar file select the first one, if you want to point to a web site that contains the javadoc select the latest. That's it.


What did the trick to me was to install the Scala plugin for IntelliJ, I was then able to navigate and debug through the spark core (which is written in scala), in spite of the project being in Java, and properly see the Javadoc, which was automatically inferred from the scala source code. Of course, you also need to have the Spark source code properly setup, easy to do using Gradle or Maven.