use of org.eclipse.equinox.p2.metadata.IInstallableUnit in project tycho by eclipse.
the class PublisherActionRunner method newPublisherInfo.
private IPublisherInfo newPublisherInfo(IMetadataRepository metadataOutput, IArtifactRepository artifactsOutput) {
final PublisherInfo publisherInfo = new PublisherInfo();
publisherInfo.setMetadataRepository(metadataOutput);
publisherInfo.setArtifactRepository(artifactsOutput);
publisherInfo.setArtifactOptions(IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH);
// TODO publishers only need an IQueryable<IInstallableUnit> -> changing this in p2 would simplify things for us
publisherInfo.setContextMetadataRepository(contextIUs);
// no (known) publisher action needs context artifact repositories
setTargetEnvironments(publisherInfo);
return publisherInfo;
}
use of org.eclipse.equinox.p2.metadata.IInstallableUnit 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);
}
use of org.eclipse.equinox.p2.metadata.IInstallableUnit in project tycho by eclipse.
the class PublisherServiceImpl method publishEEProfile.
@Override
public Collection<DependencySeed> publishEEProfile(File profileFile) throws FacadeException {
validateProfile(profileFile);
IPublisherAction jreAction = new JREAction(profileFile);
Collection<IInstallableUnit> allIUs = publisherRunner.executeAction(jreAction, publishingRepository.getMetadataRepository(), publishingRepository.getArtifactRepository());
return toSeeds(null, allIUs);
}
use of org.eclipse.equinox.p2.metadata.IInstallableUnit in project tycho by eclipse.
the class InstallableUnitUtil method createProductIU.
public static IInstallableUnit createProductIU(String productId, String version) {
InstallableUnitDescription description = createIuDescription(productId, version);
description.setProperty(PRODUCT_TYPE_PROPERTY, Boolean.toString(true));
return MetadataFactory.createInstallableUnit(description);
}
use of org.eclipse.equinox.p2.metadata.IInstallableUnit in project tycho by eclipse.
the class InstallableUnitUtil method createIURequirement.
public static IInstallableUnit createIURequirement(String id, String version, String requiredId, String requiredVersionRange) {
InstallableUnitDescription description = createIuDescription(id, version);
final IRequirement requiredCapability = createRequirement(requiredId, requiredVersionRange);
description.addRequirements(Arrays.asList(requiredCapability));
return MetadataFactory.createInstallableUnit(description);
}
Aggregations