Search in sources :

Example 1 with CategoryXMLAction

use of org.eclipse.equinox.internal.p2.updatesite.CategoryXMLAction in project tycho by eclipse.

the class PublisherServiceImpl method publishCategories.

@Override
public Collection<DependencySeed> publishCategories(File categoryDefinition) throws FacadeException, IllegalStateException {
    /*
         * At this point, we expect that the category.xml file does no longer contain any
         * "qualifier" literals; it is expected that they have been replaced before. Nevertheless we
         * pass the build qualifier to the CategoryXMLAction because this positively affects the IDs
         * of the category IUs (see {@link
         * org.eclipse.equinox.internal.p2.updatesite.SiteXMLAction#buildCategoryId(String)}).
         */
    CategoryXMLAction categoryXMLAction = new CategoryXMLAction(categoryDefinition.toURI(), qualifier);
    /*
         * TODO Fix in Eclipse: category publisher should produce root IUs; workaround: the category
         * publisher produces no "inner" IUs, so just return all IUs
         */
    Collection<IInstallableUnit> allIUs = publisherRunner.executeAction(categoryXMLAction, publishingRepository.getMetadataRepository(), publishingRepository.getArtifactRepository());
    // TODO introduce type "eclipse-category"?
    return toSeeds(null, allIUs);
}
Also used : IInstallableUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit) CategoryXMLAction(org.eclipse.equinox.internal.p2.updatesite.CategoryXMLAction)

Aggregations

CategoryXMLAction (org.eclipse.equinox.internal.p2.updatesite.CategoryXMLAction)1 IInstallableUnit (org.eclipse.equinox.p2.metadata.IInstallableUnit)1