use of org.eclipse.tycho.core.resolver.shared.DependencySeed in project tycho by eclipse.
the class MirrorApplicationServiceTest method seedFor.
private static Collection<DependencySeed> seedFor(VersionedId... units) {
Collection<DependencySeed> result = new ArrayList<>();
for (VersionedId unit : units) {
InstallableUnitDescription seedDescriptor = new InstallableUnitDescription();
seedDescriptor.setId("iu-requiring." + unit.getId());
seedDescriptor.addRequirements(strictRequirementTo(unit));
result.add(DependencySeedUtil.createSeed(null, MetadataFactory.createInstallableUnit(seedDescriptor)));
}
return result;
}
use of org.eclipse.tycho.core.resolver.shared.DependencySeed in project tycho by eclipse.
the class MirrorApplicationServiceTest method testMirrorForSeedWithNullIU.
@Test
public void testMirrorForSeedWithNullIU() throws Exception {
/*
* While it is hard to get an IU from the target platform (cf. bug 412416, bug 372780), we
* need to allow {@link DependencySeed} instances with null IU.
*/
List<DependencySeed> seeds = Collections.singletonList(new DependencySeed(null, "org.eclipse.core.runtime", null));
subject.mirrorReactor(sourceRepos("e342"), destinationRepo, seeds, context, false, false, null);
assertTrue(repoFile(destinationRepo, "plugins/org.eclipse.core.runtime_3.4.0.v20080512.jar").exists());
}
use of org.eclipse.tycho.core.resolver.shared.DependencySeed in project tycho by eclipse.
the class PublishProductToolTest method testProductPublishingWithLaunchers.
@Test
public void testProductPublishingWithLaunchers() throws Exception {
File productDefinition = resourceFile("publishers/products/test.product");
File launcherBinaries = resourceFile("launchers/");
subject = initPublisher();
Collection<DependencySeed> seeds = subject.publishProduct(productDefinition, launcherBinaries, FLAVOR);
assertThat(seeds.size(), is(1));
DependencySeed seed = seeds.iterator().next();
Set<Object> publishedUnits = outputRepository.getInstallableUnits();
assertThat(publishedUnits, hasItem(seed.getInstallableUnit()));
// test for launcher artifact
Map<String, File> artifactLocations = outputRepository.getArtifactLocations();
// TODO 348586 drop productUid from classifier
String executableClassifier = "productUid.executable.testws.testos.testarch";
assertThat(artifactLocations.keySet(), hasItem(executableClassifier));
assertThat(artifactLocations.get(executableClassifier), isFile());
assertThat(artifactLocations.get(executableClassifier).toString(), endsWith(".zip"));
}
use of org.eclipse.tycho.core.resolver.shared.DependencySeed in project tycho by eclipse.
the class PublishProductToolTest method testPublishingWithRootFeatures.
@Test
public void testPublishingWithRootFeatures() {
File productDefinition = resourceFile("publishers/products/rootFeatures.product");
subject = initPublisher(createFeatureIU("org.eclipse.rcp", "4.4.0.v20140128"), createFeatureIU("org.eclipse.e4.rcp", "1.0"), createFeatureIU("org.eclipse.help", "2.0.102.v20140128"), createFeatureIU("org.eclipse.egit", "2.0"));
List<DependencySeed> seeds = subject.publishProduct(productDefinition, null, FLAVOR);
IInstallableUnit productUnit = getUnique(productUnit(), unitsIn(seeds));
assertThat(productUnit.getRequirements(), hasItem(requirement("org.eclipse.rcp.feature.group", "4.4.0.v20140128")));
assertThat(productUnit.getRequirements(), hasItem(requirement("org.eclipse.e4.rcp.feature.group", "1.0")));
assertThat(productUnit.getRequirements(), not(hasItem(requirement("org.eclipse.help.feature.group", "2.0.102.v20140128"))));
assertThat(productUnit.getRequirements(), not(hasItem(requirement("org.eclipse.egit.feature.group", "2.0"))));
assertThat(seeds.get(1).getId(), is("org.eclipse.help"));
assertThat((IInstallableUnit) seeds.get(1).getInstallableUnit(), is(unitWithId("org.eclipse.help.feature.group")));
assertThat(seeds.get(2).getId(), is("org.eclipse.egit"));
assertThat((IInstallableUnit) seeds.get(2).getInstallableUnit(), is(unitWithId("org.eclipse.egit.feature.group")));
assertThat(seeds, hasSize(3));
}
use of org.eclipse.tycho.core.resolver.shared.DependencySeed in project tycho by eclipse.
the class PublisherServiceTest method testCategoryPublishing.
@Test
public void testCategoryPublishing() throws Exception {
File categoryDefinition = resourceFile("publishers/category.xml");
Collection<DependencySeed> seeds = subject.publishCategories(categoryDefinition);
assertThat(seeds.size(), is(1));
DependencySeed seed = seeds.iterator().next();
Set<Object> publishedUnits = outputRepository.getInstallableUnits();
assertThat(publishedUnits, hasItem(seed.getInstallableUnit()));
}
Aggregations