Search code examples
javamavenintellij-ideajavadoc

IntelliJ can't associate javadoc and sources for dependencies


I have noticed that my IntelliJ doesn't properly show javadoc/sources. I have downloaded them thru right click -> maven -> download sources and documentation. When I go to the directory where its supposed to be located, I find everything that I need :

xxx-javadoc.jar.lastUpdated
xxx.sources.jar.lastUpdated

The issue seems to be .lastUpdated part. When I look at my project dependencies I can see clearly that intelliJ looks for xxx-javadoc.jar instead of

xxx-javadoc.jar.lastUpdated

How can I make sure that IntelliJ properly downloads and names javadoc/sources properly? I don't want to manually rename everything and then manually set javadoc/sources through IntelliJ interface.

I think this issue happened when I interrupted the download of sources/documentation


Solution

  • The .lastUpdated files are not the jar fails themselves, but a mechanism that Maven uses to track when it last updated a file. I.e., the file you should load in IntelliJ is the jar file, not the .lastUpdated file.

    If an interrupted/corrupted update is causing issues, remove that fail along with its .lastUpdated file and download (synchronize in IntelliJ) it again.