Skip to content

Instantly share code, notes, and snippets.

@ukdave
Created February 28, 2014 17:44
Show Gist options
  • Save ukdave/9275819 to your computer and use it in GitHub Desktop.
Save ukdave/9275819 to your computer and use it in GitHub Desktop.
Attaches sources and javadocs to 3rd party jars in Eclipse
eclipse {
classpath.downloadSources = true
classpath.downloadJavadoc = true
// Classpath entry for Eclipse which changes the order of classpathentries; otherwise no sources for 3rd party jars are shown (http://stackoverflow.com/a/12836295)
classpath.file {
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' ])
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment