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

Bug 257783

Summary: [mirror] Be able to merge remote repositories into composite repository
Product: [Eclipse Project] Equinox Reporter: DJ Houghton <dj.houghton>
Component: p2Assignee: DJ Houghton <dj.houghton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: agcattle, pascal
Version: 3.5   
Target Milestone: 3.5 M5   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 255913, 260411    
Bug Blocks:    

Description DJ Houghton CLA 2008-12-05 17:07:57 EST
From bug 255685 comment 1:

We talked a bit about this and here are a few use-cases which I am interested
in seeing covered:

- I have 5 repositories that I have already built and I want to create a new
composite repository which has these 5 as sub-repos.
- I am a product developer and I want to create a new composite repository
which is a collection of 5 remote (e.g. http) repositories.

In these cases I believe it would be ok to fail the "add child/create
repo/whatever" operation if we found 2 JARs which were the same id/version but
differing in contents.

Parts of this might be covered by the tasks created in bug 255913.
Comment 1 Andrew Cattle CLA 2008-12-08 08:00:34 EST
Do you think this is something that can be covered by using a script which calls the CompositeArtifactRepository#addChild(URI, String) method which uses a comparator specified using by a comparatorID passed in as a string to perform a sanity check before adding? That method returns a boolean saying if the add was successful.

Otherwise we could support bulk adding/removing of children: addChildren(URI[]), removeChildren(URI[]), and addChildren(URI[], String).
Comment 2 DJ Houghton CLA 2008-12-08 09:51:03 EST
I think that once bug 255913 gets fixed we may be able to use the resulting Ant tasks to combine repositories, although that is a little clunky. A better solution might be to have an Eclipse app that a user can call to add the children.

Comment 3 DJ Houghton CLA 2009-02-06 12:05:32 EST
With the fixes to bug 262084, bug 255913 and bug 260411 we are now able to create composite repositories (via code and via Ant) and use them whether or not their children are local or remote.

Closing.