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:
mv
In Intellij 2017.x, 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
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
I changed the java version in pom.xml to match my jdk's version and it worked for me.
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!--earlier this was 1.8-->
<java.version>10</java.version>
</properties>
"I had the same issue with IntelliJ IDEA 2016.1.3 and Maven 3.2.1. No solution mentioned here was working. In my case a newer Maven version fixed the issue. With Maven 3.3.9 IDEA can now download the sources."
anything's already in the former answers...
mvn dependency:sources
maybe it is not a full IDE solution, but hope it solves your issue
I solve this by use jdk 1.8 in MAVEN -> RUNNER -> JRE .my idea version is 2016.2
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