Package org.eclipse.tycho.p2.target
Class PreliminaryTargetPlatformImpl
- java.lang.Object
-
- org.eclipse.tycho.p2.target.PreliminaryTargetPlatformImpl
-
- All Implemented Interfaces:
TargetPlatform,P2TargetPlatform
public class PreliminaryTargetPlatformImpl extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected LinkedHashSet<org.eclipse.equinox.p2.metadata.IInstallableUnit>installableUnitsAll installable units contained in the target platform.-
Fields inherited from interface org.eclipse.tycho.artifacts.TargetPlatform
FINAL_TARGET_PLATFORM_KEY
-
-
Constructor Summary
Constructors Constructor Description PreliminaryTargetPlatformImpl(Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,ReactorProjectIdentities> reactorProjectIUs, Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> externalIUs, Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,IArtifactFacade> mavenArtifactIUs, ExecutionEnvironmentResolutionHints executionEnvironment, TargetPlatformFilterEvaluator filter, LocalMetadataRepository localMetadataRepository, IRawArtifactFileProvider externalArtifacts, LocalArtifactRepository localArtifactRepository, boolean includeLocalRepo, MavenLogger logger)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LinkedHashSet<org.eclipse.equinox.p2.metadata.IInstallableUnit>collectAllInstallableUnits(Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,ReactorProjectIdentities> reactorProjectIUs, Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> externalIUs, ExecutionEnvironmentResolutionHints executionEnvironment)FilegetArtifactLocation(ArtifactKey artifact)Returns the file system location of the given target platform artifact.ExecutionEnvironmentResolutionHintsgetEEResolutionHints()Returns additional information for resolving against the configured execution environment.IRawArtifactFileProvidergetExternalArtifacts()LinkedHashSet<org.eclipse.equinox.p2.metadata.IInstallableUnit>getExternalUnits()TargetPlatformFilterEvaluatorgetFilter()Set<org.eclipse.equinox.p2.metadata.IInstallableUnit>getInstallableUnits()org.eclipse.equinox.p2.repository.metadata.IMetadataRepositorygetInstallableUnitsAsMetadataRepository()Returns the target platform content as (immutable) p2 metadata repository.FilegetLocalArtifactFile(org.eclipse.equinox.p2.metadata.IArtifactKey key)Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,IArtifactFacade>getOriginalMavenArtifactMap()Returns the map from target platform installable units back to the contributing Maven artifacts.Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,ReactorProjectIdentities>getOriginalReactorProjectMap()Returns the map from target platform installable units back to the contributing reactor project.voidreportUsedLocalIUs(Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> usedUnits)ArtifactKeyresolveArtifact(String type, String id, String version)Returns an artifact of the given type, id and matching version.org.eclipse.equinox.p2.metadata.IInstallableUnitresolveUnit(String type, String id, org.eclipse.equinox.p2.metadata.Version version)Same asTargetPlatform.resolveArtifact(String, String, String)but returning the result asIInstallableUnit.voidsaveLocalMavenRepository()
-
-
-
Field Detail
-
installableUnits
protected final LinkedHashSet<org.eclipse.equinox.p2.metadata.IInstallableUnit> installableUnits
All installable units contained in the target platform. This includes reactor-external content and all results of upstream reactor projects (or all projects in case of the preliminary target platform where the reactor build order isn't known yet). Configured and automatic filters have been applied.
-
-
Constructor Detail
-
PreliminaryTargetPlatformImpl
public PreliminaryTargetPlatformImpl(Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,ReactorProjectIdentities> reactorProjectIUs, Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> externalIUs, Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,IArtifactFacade> mavenArtifactIUs, ExecutionEnvironmentResolutionHints executionEnvironment, TargetPlatformFilterEvaluator filter, LocalMetadataRepository localMetadataRepository, IRawArtifactFileProvider externalArtifacts, LocalArtifactRepository localArtifactRepository, boolean includeLocalRepo, MavenLogger logger)
-
-
Method Detail
-
collectAllInstallableUnits
public static LinkedHashSet<org.eclipse.equinox.p2.metadata.IInstallableUnit> collectAllInstallableUnits(Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,ReactorProjectIdentities> reactorProjectIUs, Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> externalIUs, ExecutionEnvironmentResolutionHints executionEnvironment)
-
reportUsedLocalIUs
public void reportUsedLocalIUs(Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> usedUnits)
-
getExternalUnits
public LinkedHashSet<org.eclipse.equinox.p2.metadata.IInstallableUnit> getExternalUnits()
-
getFilter
public TargetPlatformFilterEvaluator getFilter()
-
getExternalArtifacts
public IRawArtifactFileProvider getExternalArtifacts()
-
getArtifactLocation
public File getArtifactLocation(ArtifactKey artifact)
Description copied from interface:TargetPlatformReturns the file system location of the given target platform artifact. Not supported by the preliminary target platform.- Returns:
- the location of the given artifact, or
nullif the artifact does not exist in the target platform, or if the given ArtifactKey refers to an metadata-only "artifact" e.g. a product definition.
-
getInstallableUnitsAsMetadataRepository
public org.eclipse.equinox.p2.repository.metadata.IMetadataRepository getInstallableUnitsAsMetadataRepository()
Description copied from interface:P2TargetPlatformReturns the target platform content as (immutable) p2 metadata repository.
-
getInstallableUnits
public final Set<org.eclipse.equinox.p2.metadata.IInstallableUnit> getInstallableUnits()
- Specified by:
getInstallableUnitsin interfaceP2TargetPlatform
-
resolveArtifact
public final ArtifactKey resolveArtifact(String type, String id, String version) throws IllegalArtifactReferenceException, DependencyResolutionException
Description copied from interface:TargetPlatformReturns an artifact of the given type, id and matching version. The version reference string matches versions according to the following rules:- "0.0.0" or
nullmatches any version - "1.2.3.qualifier", i.e. a version with a literal "qualifier", matches all versions in the range [1.2.3,1.2.4)
- all other version references match artifacts with exactly that version. For example the version reference "1.2.3.v2014" stands for the strict version range [1.2.3.v2014,1.2.3.v2014]
- Specified by:
resolveArtifactin interfaceTargetPlatform- Parameters:
type- One of the types defined inArtifactTypeid- The ID of the artifact to be found.version- A version reference string selecting one exact version or versions from a range. May benull.- Returns:
- a matching artifact.
- Throws:
IllegalArtifactReferenceException- if an invalid type or malformed version reference is givenDependencyResolutionException- if there is no matching artifact in the target platform.
- "0.0.0" or
-
resolveUnit
public final org.eclipse.equinox.p2.metadata.IInstallableUnit resolveUnit(String type, String id, org.eclipse.equinox.p2.metadata.Version version) throws IllegalArtifactReferenceException, DependencyResolutionException
Description copied from interface:P2TargetPlatformSame asTargetPlatform.resolveArtifact(String, String, String)but returning the result asIInstallableUnit. Note: "artifact" in "resolveArtifact" refers to a Tycho artifact, which technically represent a p2 installable unit and optionally the associated p2 artifact.- Specified by:
resolveUnitin interfaceP2TargetPlatform- Throws:
IllegalArtifactReferenceExceptionDependencyResolutionException
-
getEEResolutionHints
public final ExecutionEnvironmentResolutionHints getEEResolutionHints()
Description copied from interface:P2TargetPlatformReturns additional information for resolving against the configured execution environment.- Specified by:
getEEResolutionHintsin interfaceP2TargetPlatform
-
getOriginalReactorProjectMap
public final Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,ReactorProjectIdentities> getOriginalReactorProjectMap()
Description copied from interface:P2TargetPlatformReturns the map from target platform installable units back to the contributing reactor project.Note: The map may contain additional installable units as keys, i.e. not all keys are necessarily part of the target platform.
- Specified by:
getOriginalReactorProjectMapin interfaceP2TargetPlatform
-
getOriginalMavenArtifactMap
public final Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,IArtifactFacade> getOriginalMavenArtifactMap()
Description copied from interface:P2TargetPlatformReturns the map from target platform installable units back to the contributing Maven artifacts.Note: The map may contain additional installable units as keys, i.e. not all keys are necessarily part of the target platform.
- Specified by:
getOriginalMavenArtifactMapin interfaceP2TargetPlatform
-
getLocalArtifactFile
public final File getLocalArtifactFile(org.eclipse.equinox.p2.metadata.IArtifactKey key)
- Specified by:
getLocalArtifactFilein interfaceP2TargetPlatform
-
saveLocalMavenRepository
public final void saveLocalMavenRepository()
- Specified by:
saveLocalMavenRepositoryin interfaceP2TargetPlatform
-
-