Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348990 - ExtensionLocationMetadataRepository is attempted before composite.
Summary: ExtensionLocationMetadataRepository is attempted before composite.
Status: CLOSED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: Juno M1   Edit
Assignee: Pascal Rapicault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-10 03:17 EDT by Thomas Hallgren CLA
Modified: 2011-07-28 14:18 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Hallgren CLA 2011-06-10 03:17:49 EDT
The b3 aggregator will create a repository that might contain a composite metadata co-located with one single artifact repository. The layout of the resulting folder looks like this:

artifacts.jar
compositeContent.jar
plugins/
features/
aggregate/
    composite-child-1/
    composite-child-2/

When attempting to install from this repository into an IDE, it shows up empty. I found the reason for this to be that the "eclipse" type (the ExtensionLocationMetadataRepository) is tested before the composite type. The "eclipse" type will recognize any folder with a plugins/ and features/ folder and thus become the designated factory. I.e. the isBaseDirectory() method returns true.

The containsStandardP2Repository() method returns false since the ".jar" extensions is missing from the list and this causes the validate() method to succeed.

I added a p2.index file as a quick workaround for this problem but the proper fix is probably to extend the list of standard p2 repositories with the .jar extended ones.
Comment 1 Pascal Rapicault CLA 2011-06-10 16:25:51 EDT
Fixed in ExtensionLocationMetadataRepository with the following change:
public static final List<String> STANDARD_P2_REPOSITORY_FILE_NAMES = Arrays.asList("artifacts.jar", "content.jar", "artifacts.xml", "content.xml", "compositeArtifacts.xml", "compositeContent.xml", "compositeArtifacts.jar", "compositeContent.jar"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$