Reputation: 1439
There are plenty of similar questions in stackoverflow, like Get source JARs from Maven repository, Maven – Always download sources and javadocs, etc.
Follow the instructions suggested by those answers, Eclipse still can't download source code of jar package, but javadoc
has been downloaded.
Does someone can tell me why? I fell quite confused.
Upvotes: 3
Views: 27482
Reputation: 5585
There are few ways you can do it
1. mvn eclipse:eclipse -DdownloadSources
2. mvn dependency:sources
3. or below in pom.xml
<properties>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</properties>
Upvotes: 3
Reputation: 2063
I believe that you are using an embedded version of maven.
There are two items you need to check:
The second approach is to select an external installation of maven.
Take a look in the screenshot bellow. I'm using an external installation of maven.
In the second approach maven will read the settings.xml of external installation.
Upvotes: 7