5

I'm using gradle for dependency management of my Spring boot project. I want to be able to debug through the source of Spring classes.

Is there a way to tell gradle to download the source along the jar files?

Update 1 I add classifier: 'sources' to the gradle properties file:

compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version:'1.5.8.RELEASE', classifier: 'sources'

In eclipse I refreshed the gradle project, but I still get Source not found error when I want to debug inside the spring source code.

Update 2 I added the following to the gradle properties file:

apply plugin: 'java'
apply plugin: 'eclipse'

eclipse {
    classpath {
        downloadJavadoc = true
        downloadSources = true
    }
}

and ran gradle cleanEclipse eclipse, but still I cannot debug inside the spring source.

Arian
  • 7,397
  • 21
  • 89
  • 177
  • 1
    https://stackoverflow.com/questions/28404149/how-to-download-javadocs-and-sources-for-jar-using-gradle-2-0 – Risto Pärnapuu May 08 '18 at 07:32
  • I changed gradle properties file to `compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version:'1.5.8.RELEASE', classifier: 'sources'` and I still get `Source not found` error when I put a breakpoint and want to go into the source code. Do I need to take further steps? like adding something to the build path of the project? – Arian May 08 '18 at 07:45

0 Answers0