Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353175

Summary: Allow to disable using mirrors defined in a P2 artifacts repository
Product: z_Archived Reporter: Matthias Gradl <matthias.gradl>
Component: TychoAssignee: Tobias Oberlies <t-oberlies>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: mariya.yordanova
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Allow to disable p2 mirrors defined in artifact repositories t-oberlies: iplog+

Description Matthias Gradl CLA 2011-07-27 03:16:47 EDT
Build Identifier: 0.13.0-SNAPSHOT

When Tycho resolves the target platform and downloads the artifacts, it makes use of mirrors from the mirror list obtained from p2.mirrorsURL property of the artifact repository.

In our case we have local mirrors of the repositories referenced in the target platform. Using a mirror obtained from the list the artifact is downloaded from an external site instead from the local mirror.

While it is possible to disable this behaviour by setting the system property eclipse.p2.mirrors=false, we'd like to add a configuration option into Tycho's target-platform-configuration for this.

Reproducible: Always
Comment 1 Mariya Yordanova CLA 2011-07-27 07:34:27 EDT
Created attachment 200439 [details]
Allow to disable p2 mirrors defined in artifact repositories

The added patch implements the described enhancement.

A new target-platform-configuration option is introduced. Add <disableP2Mirrors>true</disableP2Mirrors> in order to disable using p2 mirrors during target platform resolution.
Comment 2 Tobias Oberlies CLA 2011-07-29 04:32:10 EDT
Fixed with e3fe86d. The target-platform-configuration parameter disableP2Mirrors=true yields the same effect as eclipse.p2.mirrors=false, but through (inhertiable!) POM configuration
Comment 3 Tobias Oberlies CLA 2011-08-03 09:12:32 EDT
The implementation currently uses reflection because there is no API in p2 to disable mirrors properly. The request for the API has been made in bug 266199.