ASharma7
ASharma7

Reputation: 730

Unable to download CrudRepository source in Eclipse IDE - Source Not Found

Usually when I Ctrl + click the CRUDRepository in the interface shown like below in Spring Tool Suite, the source automatically gets downloaded.

public interface StudentImpl extends CrudRepository<Student, Integer>

But when I am trying this thing on eclipse it doesn't work. It does work on my colleague's pc. How can I download source by just Ctrl + click? Currently I am working on Spring Boot. I have added the preferences screenshot below:

RE @nhu: I have tried doing the same but it didn't download anything.

enter image description here

enter image description here

Source not found The JAR file Z:\Users\ASharma20.m2\repository\org\springframework\data\spring-data-commons\2.0.6.RELEASE\spring-data-commons-2.0.6.RELEASE.jar has no source attachment.

You can attach the source by clicking Attach Source below:

Upvotes: 1

Views: 564

Answers (1)

ASharma7
ASharma7

Reputation: 730

Sometimes going to maven --> Download Sources doesn't work & never downloads the source.

For this we need additional step as shown below:

  1. Delete the jar from .m2 folder for which you are trying to download source
  2. Re-download the jar using maven --> Update Project --> force Update of snapshots

enter image description here

enter image description here

  1. Now You can repeat same step (maven --> Download Sources). This time it will download the source !!

enter image description here

Upvotes: 1

Related Questions