Tangoo
Tangoo

Reputation: 1439

Eclipse|Maven: Can't download source code of jar package?

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

Answers (2)

Girdhar Singh Rathore
Girdhar Singh Rathore

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

josivan
josivan

Reputation: 2063

I believe that you are using an embedded version of maven.

There are two items you need to check:

  1. Check if the options in Eclipse are selected as screen bellow

enter image description here

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.

enter image description here

In the second approach maven will read the settings.xml of external installation.

Upvotes: 7

Related Questions