Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force intellij to download scala-library sources in an existing project

It seems that Intellij does well when "Download sources" and "Download javadocs" are checked in the import settings.

But if they were not checked then how do we get the scala sources after the fact? In the screenshot below I did click on Download Sources

enter image description here

But it failed Sources for 'scala-library.jar' not found .

enter image description here

Seems Intellij should realize to properly ornament the scala-library.jar with the appropriate scala version from the project . no?

So is there any alternative to simply nuking the project and re-importing? The reason for the inquiry is I have a number of projects in this state and also would like the flexibility to not always have Download sources checked - due to both longer build time and occasional build failures caused by it.

like image 239
WestCoastProjects Avatar asked Jul 31 '16 18:07

WestCoastProjects


1 Answers

You can edit the sbt settings of an existing project:

enter image description here enter image description here

After selecting 'Download: Sources' and closing the settings, you must refresh the sbt project to trigger the download:

enter image description here

like image 142
0__ Avatar answered Oct 25 '22 01:10

0__