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.
I solve this by use jdk 1.8 in MAVEN -> RUNNER -> JRE .my idea version is 2016.2
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 ofUser Internal JRE
which was 1.6.0 by default on MacThe setting
JDK For Importer
can be found in: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)
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' sectionRunning
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
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.