use of org.eclipse.equinox.p2.publisher.actions.JREAction 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.publisher.actions.JREAction in project tycho by eclipse.
the class CustomEEResolutionHintsTest method testConsistencyWithJREAction.
@Test
public void testConsistencyWithJREAction() throws Exception {
JREAction jreAction = new JREAction(resourceFile("profiles/TestMe-1.8.profile"));
PublisherResult results = new PublisherResult();
jreAction.perform(new PublisherInfo(), results, null);
Set<IInstallableUnit> publishedUnits = results.query(QueryUtil.ALL_UNITS, null).toUnmodifiableSet();
subject = new CustomEEResolutionHints("TestMe-1.8");
for (IInstallableUnit unit : publishedUnits) {
if (subject.isEESpecificationUnit(unit)) {
// success: we find the unit create by the JREAction
return;
}
}
fail("'a.jre' unit for profile 'TestMe-1.8' not found in" + publishedUnits);
}
use of org.eclipse.equinox.p2.publisher.actions.JREAction in project tycho by eclipse.
the class StandardEEResolutionHints method addIUsFromEnvironment.
static void addIUsFromEnvironment(String executionEnvironment, Map<VersionedId, IInstallableUnit> units) {
// generate real IUs that represent requested execution environment
PublisherResult results = new PublisherResult();
new JREAction(executionEnvironment).perform(new PublisherInfo(), results, null);
results.query(QueryUtil.ALL_UNITS, null);
Iterator<IInstallableUnit> iterator = results.query(QueryUtil.ALL_UNITS, null).iterator();
while (iterator.hasNext()) {
put(units, iterator.next());
}
}
Aggregations