Search in sources :

Example 1 with FinalTargetPlatformImpl

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

the class PublishProductToolTest method initPublisher.

private PublishProductTool initPublisher(IInstallableUnit... tpUnits) {
    LinkedHashSet<IInstallableUnit> contextUnits = new LinkedHashSet<>();
    contextUnits.addAll(Arrays.asList(tpUnits));
    P2TargetPlatform targetPlatform = new FinalTargetPlatformImpl(contextUnits, null, null, null, null, null);
    PublisherActionRunner publisherRunner = new PublisherActionRunner(targetPlatform.getInstallableUnitsAsMetadataRepository(), ENVIRONMENTS, logVerifier.getLogger());
    return new PublishProductToolImpl(publisherRunner, outputRepository, targetPlatform, QUALIFIER, interpolatorMock, logVerifier.getLogger());
}
Also used : LinkedHashSet(java.util.LinkedHashSet) FinalTargetPlatformImpl(org.eclipse.tycho.p2.target.FinalTargetPlatformImpl) P2TargetPlatform(org.eclipse.tycho.p2.target.P2TargetPlatform) IInstallableUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit)

Example 2 with FinalTargetPlatformImpl

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

the class TargetPlatformFactoryImpl method createTargetPlatformWithUpdatedReactorUnits.

P2TargetPlatform createTargetPlatformWithUpdatedReactorUnits(PreliminaryTargetPlatformImpl preliminaryTP, Map<IInstallableUnit, ReactorProjectIdentities> reactorUnitsMap, List<IRawArtifactFileProvider> reactorArtifacts) {
    LinkedHashSet<IInstallableUnit> allUnits = preliminaryTP.getExternalUnits();
    // external units are already filtered, only reactor units need to be filtered again
    if (reactorUnitsMap != null) {
        Collection<IInstallableUnit> reactorUnits = new LinkedList<>(reactorUnitsMap.keySet());
        TargetPlatformFilterEvaluator configuredFilters = preliminaryTP.getFilter();
        if (configuredFilters != null) {
            configuredFilters.filterUnits(reactorUnits);
        }
        allUnits.addAll(reactorUnits);
    }
    IRawArtifactFileProvider jointArtifacts = createJointArtifactProvider(reactorArtifacts, preliminaryTP.getExternalArtifacts());
    return new FinalTargetPlatformImpl(allUnits, preliminaryTP.getEEResolutionHints(), jointArtifacts, localArtifactRepository, preliminaryTP.getOriginalMavenArtifactMap(), reactorUnitsMap);
}
Also used : IRawArtifactFileProvider(org.eclipse.tycho.repository.p2base.artifact.provider.IRawArtifactFileProvider) IInstallableUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit) TargetPlatformFilterEvaluator(org.eclipse.tycho.p2.target.filters.TargetPlatformFilterEvaluator) LinkedList(java.util.LinkedList)

Aggregations

IInstallableUnit (org.eclipse.equinox.p2.metadata.IInstallableUnit)2 LinkedHashSet (java.util.LinkedHashSet)1 LinkedList (java.util.LinkedList)1 FinalTargetPlatformImpl (org.eclipse.tycho.p2.target.FinalTargetPlatformImpl)1 P2TargetPlatform (org.eclipse.tycho.p2.target.P2TargetPlatform)1 TargetPlatformFilterEvaluator (org.eclipse.tycho.p2.target.filters.TargetPlatformFilterEvaluator)1 IRawArtifactFileProvider (org.eclipse.tycho.repository.p2base.artifact.provider.IRawArtifactFileProvider)1