Search in sources :

Example 1 with ImmutableInMemoryMetadataRepository

use of org.eclipse.tycho.repository.p2base.metadata.ImmutableInMemoryMetadataRepository in project tycho by eclipse.

the class PublisherServiceTest method initSubject.

@Before
public void initSubject() throws Exception {
    File projectDirectory = tempManager.newFolder("projectDir");
    LinkedHashSet<IInstallableUnit> installableUnits = new LinkedHashSet<>();
    installableUnits.add(InstallableUnitUtil.createFeatureIU("org.eclipse.example.original_feature", "1.0.0"));
    IMetadataRepository context = new ImmutableInMemoryMetadataRepository(installableUnits);
    // TODO these publishers don't produce artifacts, so we could run without file system
    outputRepository = new PublishingRepositoryImpl(p2Context.getAgent(), new ReactorProjectIdentitiesStub(projectDirectory));
    PublisherActionRunner publisherRunner = new PublisherActionRunner(context, DEFAULT_ENVIRONMENTS, logVerifier.getLogger());
    subject = new PublisherServiceImpl(publisherRunner, DEFAULT_QUALIFIER, outputRepository);
}
Also used : LinkedHashSet(java.util.LinkedHashSet) PublishingRepositoryImpl(org.eclipse.tycho.repository.module.PublishingRepositoryImpl) ReactorProjectIdentitiesStub(org.eclipse.tycho.test.util.ReactorProjectIdentitiesStub) IInstallableUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit) IMetadataRepository(org.eclipse.equinox.p2.repository.metadata.IMetadataRepository) ResourceUtil.resourceFile(org.eclipse.tycho.p2.tools.test.util.ResourceUtil.resourceFile) File(java.io.File) ImmutableInMemoryMetadataRepository(org.eclipse.tycho.repository.p2base.metadata.ImmutableInMemoryMetadataRepository) Before(org.junit.Before)

Aggregations

File (java.io.File)1 LinkedHashSet (java.util.LinkedHashSet)1 IInstallableUnit (org.eclipse.equinox.p2.metadata.IInstallableUnit)1 IMetadataRepository (org.eclipse.equinox.p2.repository.metadata.IMetadataRepository)1 ResourceUtil.resourceFile (org.eclipse.tycho.p2.tools.test.util.ResourceUtil.resourceFile)1 PublishingRepositoryImpl (org.eclipse.tycho.repository.module.PublishingRepositoryImpl)1 ImmutableInMemoryMetadataRepository (org.eclipse.tycho.repository.p2base.metadata.ImmutableInMemoryMetadataRepository)1 ReactorProjectIdentitiesStub (org.eclipse.tycho.test.util.ReactorProjectIdentitiesStub)1 Before (org.junit.Before)1