Download sources not working, no error given

已回答

Sometimes when I try to download sources in Intellij (Java or Kotlin) it simply does nothing. A progress bar at the bottom flashes briefly, then the message changes in the yellow tab to "Downloading sources..." but nothing happens. It seemingly only happens with certain libraries. Why is this happening?

评论操作 固定链接

IDE should download sources if they are available in Maven repository. Could be that the library does not have sources in repository or there is a connectivity problem.

Do you use Maven/Gradle in project? If Maven is used, make sure the Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Maven | Importing | Automatically download: Sources option is enabled and refresh Maven project. does it help?

If problem remains please file an issue at https://youtrack.jetbrains.com/issues/IDEA  with idea.log (Help | Show Log in ... action) attached after IDE restart and reproducing. And a screenshot with the action you invoke in IDE interface that fails. Thanks.

0
评论操作 固定链接

I have experienced the same problem on IntelliJ IDEA 2021.3.2 (Community Edition)

seems that IDE stop responding for the downloading task. 

The Sync tab is running for more that 3 mins after I click download source. I have to restart IDE to fix the issue. 

0
评论操作 固定链接

Saeed Najdmohtasham Does it work from the command line Maven?

mvn dependency:sources dependency:resolve -Dclassifier=javadoc
0
评论操作 固定链接

Serge Baranov 

I can not reproduce the problem. It happens rarely and after I restart the IDE it get fixed automatically showing the source code. 

0
评论操作 固定链接

An update to this thread. 

the problem repeated and when the IDE was not responding to sync tab, I could run the command line Maven successfully. 

mvn dependency:sources dependency:resolve -Dclassifier=javadoc

running the command did not changed the IDE state and when I clicked Reload button for Maven, it stopped at waiting state. I have attached the screenshot . After I restarted the IDE, I clicked for Downloading the source code and it get downloaded and synced automatically. 

0
评论操作 固定链接

Please file a bug at https://youtrack.jetbrains.com/newIssue?project=IDEA with the logs and the thread dumps attached, see https://intellij-support.jetbrains.com/hc/en-us/articles/207241085 and https://intellij-support.jetbrains.com/hc/en-us/articles/206544899. Use jstack to get the thread dumps while IDE is waiting for the Maven import completion.

0

请先登录再写评论。