Can not download sources with Intellij Idea commun

2019-02-04 05:27发布

I click "download sources and documentation" in Intellij Idea Community Edition 12.1.4 and get error that sources can not be downloaded. But when I try:

mvn dependency:sources

All sources are downloaded.

What is the problem?

P.S. I have checked that Idea use the same maven that use in console. There are not any "off line" mode buttons triggered in Idea.

9条回答
成全新的幸福
2楼-- · 2019-02-04 05:49

I solve this by use jdk 1.8 in MAVEN -> RUNNER -> JRE .my idea version is 2016.2

查看更多
Lonely孤独者°
3楼-- · 2019-02-04 05:50

In Intellij 2017.1, 2016.x, 15.x, 14.x the given solution does not work as the option is removed.

The problem can be solved by changing JDK for Importer to a latest JDK instead of User Internal JRE which was 1.6.0 by default on Mac

The setting JDK For Importer can be found in:

Preferences -> Build, Execution,Deployment -> Build Tools -> Maven -> Importing

查看更多
戒情不戒烟
4楼-- · 2019-02-04 05:56

Had the same issue with IntelliJ 2016.2.4. As user526177 posted udating the Maven version fixes it but for my needs switching to the bundled Maven 2 was just fine and fixed the issue.

Screenshot (can't embed yet due to rank)

查看更多
放荡不羁爱自由
5楼-- · 2019-02-04 05:59

I had this issue, and sources weren't being downloaded since I needed credentials from my project's specific settings.xml.

To fix (Intellij 2018.1.2):

File -> Settings -> Build, Execution, Deployment -> Maven

and provide the appropriate settings.xml in the 'User settings file' section

查看更多
相关推荐>>
6楼-- · 2019-02-04 06:04

Running IDEA version 12.1.6 and I have the same issue.

When I uncheck the following option it does work:

Settings > Maven > Importing > Use Maven3 to import project

查看更多
我欲成王,谁敢阻挡
7楼-- · 2019-02-04 06:07

I use IDEA 2017.1.3, I just change the Maven home directory option(Preferences -> Build, Execution,Deployment -> Build Tools -> Maven -> Maven home directory) of default Maven 3 to Maven 2, I believe it's the same solution for newer version of IDEA just like the selected answer. And it works for me.

查看更多
登录 后发表回答