Hi,
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
jar called DataType, the following requests are made:
HEAD
/nexus/content/groups/public/com/example/DataType/1.0.94/DataType-1.0.94.pom
HTTP/1.1
GET /nexus/content/groups/public/com/example/DataType/1.0.94/DataType-1.0.94.pom
HTTP/1.1
HEAD
/nexus/content/groups/public/com/example/DataType/1.0.94/DataType-1.0.94.jar
HTTP/1.1
HEAD
/nexus/content/groups/public/com/example/DataType/1.0.94/DataType-1.0.94-sources.jar
HTTP/1.1
HEAD
/nexus/content/groups/public/com/example/DataType/1.0.94/DataType-1.0.94-src.jar
HTTP/1.1
HEAD
/nexus/content/groups/public/com/example/DataType/1.0.94/DataType-1.0.94-javadoc.jar
HTTP/1.1
GET /nexus/content/groups/public/com/example/DataType/1.0.94/DataType-1.0.94.jar
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.
Can anyone offer some suggestions on the best way to speed this up? Is
it possible to stop gradle from making requests for the "-sources",
"-src" and "-javadoc" artifacts?
Thanks,
Joe
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email