The sources are downloaded in the Gradle cache and the classpath-entries for the source files looks ok, but Eclipse does not show the source files for 3rd party libs.
The sources are downloaded in the Gradle cache and the classpath-entries for the source files looks ok, but Eclipse does not show the source files for 3rd party libs.
That's a weird behavior in Eclipse with the generated .classpath-file. Just put the 'Web App Libraries' entry at the bottom of your classpath file (-> Java Build Path -> Order and Export).
The best solution is to enhance your gradle.build file (then you don't need to reorder your build path each time you generate the classpath file via gradle):
... eclipse.classpath.file { // Classpath entry for Eclipse which changes the order of classpathentries; otherwise no sources for 3rd party jars are shown withXml { xml -> def node = xml.asNode() node.remove( node.find { it.@path == 'org.eclipse.jst.j2ee.internal.web.container' } ) node.appendNode( 'classpathentry', [ kind: 'con', path: 'org.eclipse.jst.j2ee.internal.web.container', exported: 'true']) } }