Community
Participate
Working Groups
Build Identifier: I am using a local mirror of the eclipse p2 helios repository configured like this in my pom.xml: --cut-- <repository> <id>eclipse-helios</id> <layout>p2</layout> <url>http://mirror/eclipse-helios/</url> <snapshots> <enabled>false</enabled> <updatePolicy>never</updatePolicy> </snapshots> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> </repository> --cut-- Each time I build my project using tycho 0.11.0 it downloads the content.xml and artifacts.xml files from the p2 repository. The files are about 70 MB and this takes about 2-3 minutes just for that step - which is unacceptable. I have tried both Nexus Pro 1.9.1 and apache2 to host the helios p2 repository mirror. The same behavior for both. What I check the load balancer's logs, I see that tycho first issues a HEAD request and then a GET request. The HEAD request is fast and responds with correct Last-Modified and ETag headers (result from apache2): --cut-- root@build:~# curl --head 'http://mirror/eclipse-helios/content.xml' HTTP/1.1 200 OK Date: Wed, 04 May 2011 09:19:17 GMT Server: Apache/2.2.16 (Ubuntu) Last-Modified: Wed, 04 May 2011 09:15:49 GMT ETag: "20edd-3d402cb-4a26fb3df8d5a" Accept-Ranges: bytes Content-Length: 64225995 Connection: close Content-Type: application/xml --cut-- Despite that, tycho still redownloads the files. I have also checked in my local m2 repository - the files are there. Reproducible: Always
Please provide complete standalone project and steps to reproduce the problem.
It has been claimed that p2 is the culprit for this behaviour (I don't remember the bug number), but p2 has proven that they in fact only do HEAD requests to check that the cache is up to date. Nevertheless, it is still possible, that Tycho still sends out GETs: 1) Tycho's p2 version could be too old (cf. bug 342554) 2) Tycho prevents that p2 properly caches p2 repositories. (I wouldn't be surprised: p2's IProvisioningAgent is reponsible for maintaining the cache, and it seems a bit random how Tycho uses/creates IProvisioningAgent instances.) However, all this theoretic analysis doesn't get us anywhere. As long as there are no detailed instructions for reproducing the issue, we won't see any progress here.
With the current 0.13.0-SNAPSHOT, I cannot reproduce the problem: I traced the http communication as described in bug 347403#c7, and there are only HEAD requests for the content.jar/artifact.jars. Note that there is still the related issue, that Tycho does HEAD requests for the artifacts.xml, even if this is not necessary (see bug 347477).