Search in sources :

Example 1 with ProcessingStepDescriptor

use of org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor in project tycho by eclipse.

the class LocalArtifactRepositoryP2APITest method localPackedDescriptorFor.

/**
 * Returns a descriptor of the internally used {@link IArtifactDescriptor} type for the pack200
 * format of the given key.
 */
private static IArtifactDescriptor localPackedDescriptorFor(IArtifactKey key) {
    GAVArtifactDescriptor result = new GAVArtifactDescriptor(key);
    result.setProcessingSteps(new IProcessingStepDescriptor[] { new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true) });
    result.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
    return result;
}
Also used : IProcessingStepDescriptor(org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor) ProcessingStepDescriptor(org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor)

Example 2 with ProcessingStepDescriptor

use of org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor 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;
}
Also used : ArtifactDescriptor(org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor) IArtifactDescriptor(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor) IProcessingStepDescriptor(org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor) ProcessingStepDescriptor(org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor)

Example 3 with ProcessingStepDescriptor

use of org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor in project tycho by eclipse.

the class LocalArtifactRepositoryTest method getP2Location.

@Test
public void getP2Location() {
    LocalArtifactRepository repo = new LocalArtifactRepository(localRepoIndices);
    ArtifactDescriptor desc = newBundleArtifactDescriptor(false);
    Assert.assertEquals(new File(baseDir, "p2/osgi/bundle/org.eclipse.tycho.test.p2/1.0.0/org.eclipse.tycho.test.p2-1.0.0.jar"), repo.internalGetArtifactStorageLocation(desc));
    ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] { new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true) };
    desc.setProcessingSteps(steps);
    desc.setProperty(IArtifactDescriptor.FORMAT, "packed");
    Assert.assertEquals(new File(baseDir, "p2/osgi/bundle/org.eclipse.tycho.test.p2/1.0.0/org.eclipse.tycho.test.p2-1.0.0-pack200.jar.pack.gz"), repo.internalGetArtifactStorageLocation(desc));
}
Also used : ArtifactDescriptor(org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor) IArtifactDescriptor(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor) ProcessingStepDescriptor(org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor) File(java.io.File) Test(org.junit.Test)

Aggregations

ProcessingStepDescriptor (org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor)3 IArtifactDescriptor (org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor)2 IProcessingStepDescriptor (org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor)2 ArtifactDescriptor (org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor)2 File (java.io.File)1 Test (org.junit.Test)1