use of org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor in project tycho by eclipse.
the class LocalArtifactRepositoryTest method newBundleArtifactDescriptor.
private ArtifactDescriptor newBundleArtifactDescriptor(boolean maven) {
ArtifactKey key = new ArtifactKey(PublisherHelper.OSGI_BUNDLE_CLASSIFIER, "org.eclipse.tycho.test." + (maven ? "maven" : "p2"), Version.createOSGi(1, 0, 0));
ArtifactDescriptor desc = new ArtifactDescriptor(key);
if (maven) {
desc.setProperty(RepositoryLayoutHelper.PROP_GROUP_ID, "group");
desc.setProperty(RepositoryLayoutHelper.PROP_ARTIFACT_ID, key.getId());
desc.setProperty(RepositoryLayoutHelper.PROP_VERSION, key.getVersion().toString());
}
return desc;
}
use of org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor in project tycho by eclipse.
the class FeatureRootfileArtifactRepositoryTest method testRepoWithAttachedArtifactsAndConfigurations.
@Test
public void testRepoWithAttachedArtifactsAndConfigurations() throws Exception {
FeatureRootfileArtifactRepository subject = new FeatureRootfileArtifactRepository(createPublisherInfo(true), tempFolder.newFolder("testrootfiles"));
IArtifactDescriptor artifactDescriptor = createArtifactDescriptor(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, "org.eclipse.tycho.test.p2.win32.win32.x86");
subject.getOutputStream(artifactDescriptor).close();
assertAttachedArtifact(subject.getPublishedArtifacts(), 1, "root.win32.win32.x86", "org.eclipse.tycho.test.p2.win32.win32.x86-1.0.0-root.zip");
Set<IArtifactDescriptor> artifactDescriptors = subject.getArtifactDescriptors();
Assert.assertEquals(1, artifactDescriptors.size());
IArtifactDescriptor descriptor = artifactDescriptors.iterator().next();
assertMavenProperties(descriptor, "root.win32.win32.x86");
}
use of org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor in project tycho by eclipse.
the class FeatureRootfileArtifactRepositoryTest method testRepoWithoutMavenAdvice.
@Test(expected = ProvisionException.class)
public void testRepoWithoutMavenAdvice() throws Exception {
FeatureRootfileArtifactRepository subject = new FeatureRootfileArtifactRepository(createPublisherInfo(false), tempFolder.newFolder("testrootfiles"));
IArtifactDescriptor artifactDescriptor = createArtifactDescriptor(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, "org.eclipse.tycho.test.p2");
subject.getOutputStream(artifactDescriptor).close();
}
use of org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor in project tycho by eclipse.
the class FeatureRootfileArtifactRepositoryTest method testRepoWithAttachedArtifacts.
@Test
public void testRepoWithAttachedArtifacts() throws Exception {
FeatureRootfileArtifactRepository subject = new FeatureRootfileArtifactRepository(createPublisherInfo(true), tempFolder.newFolder("testrootfiles"));
IArtifactDescriptor artifactDescriptor = createArtifactDescriptor(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, "org.eclipse.tycho.test.p2");
subject.getOutputStream(artifactDescriptor).close();
assertAttachedArtifact(subject.getPublishedArtifacts(), 1, "root", "org.eclipse.tycho.test.p2-1.0.0-root.zip");
Set<IArtifactDescriptor> artifactDescriptors = subject.getArtifactDescriptors();
Assert.assertEquals(1, artifactDescriptors.size());
IArtifactDescriptor descriptor = artifactDescriptors.iterator().next();
assertMavenProperties(descriptor, "root");
}
use of org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor in project tycho by eclipse.
the class ArtifactRepositoryTestUtils method packedDescriptorFor.
public static IArtifactDescriptor packedDescriptorFor(IArtifactKey key) {
ArtifactDescriptor result = new ArtifactDescriptor(key);
result.setProcessingSteps(new IProcessingStepDescriptor[] { new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true) });
result.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
return result;
}
Aggregations