Search in sources :

Example 1 with PublishingRepository

use of org.eclipse.tycho.repository.publishing.PublishingRepository in project tycho by eclipse.

the class PublisherServiceFactoryImpl method createProductPublisher.

@Override
public PublishProductTool createProductPublisher(ReactorProject project, List<TargetEnvironment> environments, String buildQualifier, Interpolator interpolator) {
    P2TargetPlatform targetPlatform = (P2TargetPlatform) reactorRepoManager.getFinalTargetPlatform(project);
    PublisherActionRunner publisherRunner = getPublisherRunnerForProject(targetPlatform, environments);
    PublishingRepository publishingRepository = reactorRepoManager.getPublishingRepository(project.getIdentities());
    return new PublishProductToolImpl(publisherRunner, publishingRepository, targetPlatform, buildQualifier, interpolator, mavenContext.getLogger());
}
Also used : P2TargetPlatform(org.eclipse.tycho.p2.target.P2TargetPlatform) PublishingRepository(org.eclipse.tycho.repository.publishing.PublishingRepository)

Example 2 with PublishingRepository

use of org.eclipse.tycho.repository.publishing.PublishingRepository in project tycho by eclipse.

the class PublisherServiceFactoryImpl method createPublisher.

@Override
public PublisherService createPublisher(ReactorProject project, List<TargetEnvironment> environments) {
    P2TargetPlatform targetPlatform = (P2TargetPlatform) reactorRepoManager.getFinalTargetPlatform(project);
    PublisherActionRunner publisherRunner = getPublisherRunnerForProject(targetPlatform, environments);
    PublishingRepository publishingRepository = reactorRepoManager.getPublishingRepository(project.getIdentities());
    return new PublisherServiceImpl(publisherRunner, project.getBuildQualifier(), publishingRepository);
}
Also used : P2TargetPlatform(org.eclipse.tycho.p2.target.P2TargetPlatform) PublishingRepository(org.eclipse.tycho.repository.publishing.PublishingRepository)

Example 3 with PublishingRepository

use of org.eclipse.tycho.repository.publishing.PublishingRepository 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)

Example 4 with PublishingRepository

use of org.eclipse.tycho.repository.publishing.PublishingRepository in project tycho by eclipse.

the class TargetPlatformFactoryImpl method extractProjectResultIUs.

private static Map<IInstallableUnit, ReactorProjectIdentities> extractProjectResultIUs(List<PublishingRepository> projectResults) {
    Map<IInstallableUnit, ReactorProjectIdentities> reactorUnits = new LinkedHashMap<>();
    for (PublishingRepository projectResult : projectResults) {
        Set<IInstallableUnit> projectUnits = projectResult.getMetadataRepository().query(QueryUtil.ALL_UNITS, null).toUnmodifiableSet();
        ReactorProjectIdentities project = projectResult.getProjectIdentities();
        for (IInstallableUnit projectUnit : projectUnits) {
            reactorUnits.put(projectUnit, project);
        }
    }
    return reactorUnits;
}
Also used : IInstallableUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit) ReactorProjectIdentities(org.eclipse.tycho.ReactorProjectIdentities) PublishingRepository(org.eclipse.tycho.repository.publishing.PublishingRepository) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

PublishingRepository (org.eclipse.tycho.repository.publishing.PublishingRepository)4 P2TargetPlatform (org.eclipse.tycho.p2.target.P2TargetPlatform)3 LinkedHashMap (java.util.LinkedHashMap)1 IInstallableUnit (org.eclipse.equinox.p2.metadata.IInstallableUnit)1 ReactorProjectIdentities (org.eclipse.tycho.ReactorProjectIdentities)1 PreliminaryTargetPlatformImpl (org.eclipse.tycho.p2.target.PreliminaryTargetPlatformImpl)1 TargetPlatformFactoryImpl (org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl)1