Search in sources :

Example 1 with TargetPlatformFactoryImpl

use of org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl in project tycho by eclipse.

the class P2ResolverFactoryImpl method getTargetPlatformFactory.

@Override
public TargetPlatformFactoryImpl getTargetPlatformFactory() {
    try {
        // TODO don't synchronize twice
        LocalMetadataRepository localMetadataRepo = getLocalMetadataRepository(mavenContext, localRepoIndices);
        LocalArtifactRepository localArtifactRepo = getLocalArtifactRepository(mavenContext, localRepoIndices);
        return new TargetPlatformFactoryImpl(mavenContext, remoteAgentManager.getProvisioningAgent(), localArtifactRepo, localMetadataRepo, targetDefinitionResolverService);
    } catch (ProvisionException e) {
        throw new RuntimeException(e);
    }
}
Also used : LocalArtifactRepository(org.eclipse.tycho.repository.local.LocalArtifactRepository) ProvisionException(org.eclipse.equinox.p2.core.ProvisionException) LocalMetadataRepository(org.eclipse.tycho.repository.local.LocalMetadataRepository) TargetPlatformFactoryImpl(org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl)

Example 2 with TargetPlatformFactoryImpl

use of org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl in project tycho by eclipse.

the class ReactorRepositoryManagerImpl method computeFinalTargetPlatform.

@Override
public void computeFinalTargetPlatform(ReactorProject project, List<? extends ReactorProjectIdentities> upstreamProjects) {
    PreliminaryTargetPlatformImpl preliminaryTargetPlatform = getRegisteredPreliminaryTargetPlatform(project);
    if (preliminaryTargetPlatform == null) {
        // project doesn't seem to use resolver=p2
        return;
    }
    List<PublishingRepository> upstreamProjectResults = getBuildResults(upstreamProjects);
    P2TargetPlatform result = ((TargetPlatformFactoryImpl) tpFactory).createTargetPlatformWithUpdatedReactorContent(preliminaryTargetPlatform, upstreamProjectResults);
    project.setContextValue(FINAL_TARGET_PLATFORM_KEY, result);
}
Also used : P2TargetPlatform(org.eclipse.tycho.p2.target.P2TargetPlatform) PreliminaryTargetPlatformImpl(org.eclipse.tycho.p2.target.PreliminaryTargetPlatformImpl) PublishingRepository(org.eclipse.tycho.repository.publishing.PublishingRepository) TargetPlatformFactoryImpl(org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl)

Aggregations

TargetPlatformFactoryImpl (org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl)2 ProvisionException (org.eclipse.equinox.p2.core.ProvisionException)1 P2TargetPlatform (org.eclipse.tycho.p2.target.P2TargetPlatform)1 PreliminaryTargetPlatformImpl (org.eclipse.tycho.p2.target.PreliminaryTargetPlatformImpl)1 LocalArtifactRepository (org.eclipse.tycho.repository.local.LocalArtifactRepository)1 LocalMetadataRepository (org.eclipse.tycho.repository.local.LocalMetadataRepository)1 PublishingRepository (org.eclipse.tycho.repository.publishing.PublishingRepository)1