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

Bug 330889

Summary: [target] Target definition editor should allow multiple repositories per location
Product: [Eclipse Project] PDE Reporter: Matthias Gradl <matthias.gradl>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: curtis.windatt.public, felix.riegger, jeffmcaffer
Version: 3.6.1Keywords: helpwanted
Target Milestone: 3.7 M4   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Target file with two containers.
none
screenshot showing resolution
none
Target file with resolution error.
none
Screenshot showing the resolution error. none

Description Matthias Gradl CLA 2010-11-23 03:26:52 EST
Build Identifier: 20100617-1415

When using the target definition editor to define the target platform, you can only provide a single repository for a location of type "Software Site".

However, when editing the target definition file (.target) directly, it is possible to include additional <repository .../> tags for the location. These added repositories are actually used when the target platform is resolved.
The target platform resolver makes use of all given repositories and successfully lists the resolved units, but the editor still only shows the first repository URL.

This enhancement request brings the target editor the functionality to edit target definitions that the target resolver already can handle.

Requested changes:
* It should be possible to add additional repository URLs to any location of type "Software Site", i.e. "InstallableUnit" in the .target xml
* The additional repository URLs should be visible in the target editor UI.


Reproducible: Always
Comment 1 Curtis Windatt CLA 2010-11-23 09:37:45 EST
This has been a wanted feature from the start (though I can't find a duplicate report), however, implementing it will require a new UI.  Currently we reuse the UI piece from p2 to select a repository.  There are no plans for the PDE team to work on this.
Comment 2 Jeff McAffer CLA 2010-11-23 10:41:32 EST
As a bonus, the recent changes that I did to PDE may well enable what is being asked for but in a slightly different way.  Rather than adding multiple repos to one container, simply add multiple containers.  Now we slice and plan in the context of all IU containers so if you should get things from other containers.  There may be some tweaks needed as the UI sometimes complains if there are no items selected.

Summary, try this out in the latest integration builds and see if you can get what you want with the new behaviour.
Comment 3 Jeff McAffer CLA 2010-11-23 10:42:48 EST
Note: Personally I like the approach that I just outlined.  Containers aren't really something that surfaces explicitly to users.  They just add dirs, installs, repos, ...  The idea of adding multiple repos to one container would elevate the notion of "container" to something the user thinks/knows about.  Then we would have multiple dirs in one container, ...
Comment 4 Felix Riegger CLA 2010-11-29 08:25:53 EST
Created attachment 184035 [details]
Target file with two containers.

The attached target file was opened with the target editor of the following builds:
3.7.0 N20101128-2000
3.7.0 I20101123-0800

The target file couldn't be resolved successfully (The second container cannot be resolved. It specifies the m2eclipse feature, which needs content from Helios.). If slicing and planning happens in the context of all containers, shouldn't it resolve successfully as Helios is specified in the first container?

Adding the Helios repo to the second container as an additional repository via text editor makes the target platform resolution successful.

Are the changes not in yet or do we get something wrong here?
Comment 5 Jeff McAffer CLA 2010-11-29 11:37:52 EST
Created attachment 184051 [details]
screenshot showing resolution

It must be that all the required changes are not in yet.  I used your .target and it resolved just fine with all my latest changes (not yet released).  I'll put an updated patch on bug 331068 later today for you to try.  It would be great to get your feedback on these changes.
Comment 6 Felix Riegger CLA 2010-12-02 10:47:40 EST
After having your patch applied, target resolution works like expected. The key feature for us here is, that the planner resolves across multiple repositories. Therefore, your changes fit our needs.

Beside this, we experienced a small bug:
If a dependency cannot be satisfied, because it is not available in any of the specified repositories/locations, the error message is attached to a random container. I would expect it in the location where the root IU is specified, which has the (tranisitive) dependency.
Comment 7 Jeff McAffer CLA 2010-12-02 10:55:04 EST
Actually I would have expected the error to show up either in the first one or all of them.  Underlying the individual containers is one profile that either resolves or does not.  So if the profile does not resolve then all IU containers should have effectively the same errors.  We can likely do better on this reporting but for now the user is getting the information they need.

I would like ot know more about the randomness in the reporting.  Do you have a case that I can try and reproduce?  Curtis was seeing some unrelated but still random UI behaviour and I wonder if it may be a similar underlying cause.
Comment 8 Felix Riegger CLA 2010-12-02 11:31:19 EST
Created attachment 184365 [details]
Target file with resolution error.

The dependencies of the org.maven.ide.eclipse.site feature cannot be satisfied.
Comment 9 Felix Riegger CLA 2010-12-02 11:32:34 EST
Created attachment 184366 [details]
Screenshot showing the resolution error.
Comment 10 Jeff McAffer CLA 2010-12-02 21:31:14 EST
The screen shot shows that the bundle org.hamcrest could not be found.  As far as I can tell, this is correct.  If you look at the three repos identified, non of them actually have a bundle called org.hamcrest.  The Helios repo has org.hamcrest.core. So the m2e repos are either incomplete or incorrect.

Given that the basic function requested is now implemented and released (the patch in bug 331068 was committed today and will be in M4 next week), I'm closing this bug as fixed.  Please do test the latest patch or tonight's nightly and M4 next week and open new bugs if there are problems.
Comment 11 Felix Riegger CLA 2010-12-07 04:40:16 EST
Yes, the error is definitely correct, we just expected the error to show up in the second software site and not in the last one. But that's really a minor issue, if at all. Looking forward to having your changes in M4.
Comment 12 Curtis Windatt CLA 2010-12-07 13:58:17 EST
Verified in I20101206-1800