[GRADLE-1322] Don't search for unused source and javadoc dependencies Created: 19/Jan/11 Updated: 04/Jan/13 Resolved: 05/Nov/11 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 0.9.1 |
Fix Version/s: | 1.0-milestone-6 |
Type: | Improvement | ||
Reporter: | Joe Schmetzer | Assignee: | Daz DeBoer |
Resolution: | Fixed | Votes: | 2 |
Description |
I have a project with a large number of dependencies in the build file. The dependencies have been configured to come from a local installation of Nexus, which will then proxy various external repos as well as our own hosted repositories. Often, when running a simple task (or just calling "gradle depenencies"), gradle will pause for a very long time (often up to 5 minutes) while it displays messages about retrieving various pom files for other internal projects. It seemed an unusually long time to pause, so I started wireshark to see what was happening: it appears that for every jar file we depend on, gradle will also do a HTTP HEAD request on various associated artifacts. For example, to retrieve a HEAD /nexus/content/groups/public/com/example/DataType/1.0.94/DataType-1.0.94.pom HTTP/1.1 The problem is that DataType-1.0.94-sources.jar, DataType-1.0.94-src.jar and DataType-1.0.94-javadoc.jar do not exist. Because gradle requested them, Nexus realises that it doesn't have them locally, and then searches the external repositories for them, which takes a long time (sometimes up to 10 seconds). Multiple this by about 20 different dependencies, this adds an enormous amount of time to what I would have expected to be a quick task. Gradle should not be requesting the "-sources", "-src" and "-javadoc" artifacts when it doesn't need them. |