Package org.eclipse.tycho.p2.target
Class FinalTargetPlatformImpl
- java.lang.Object
-
- org.eclipse.tycho.p2.target.FinalTargetPlatformImpl
-
- All Implemented Interfaces:
TargetPlatform
,P2TargetPlatform
public class FinalTargetPlatformImpl extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected LinkedHashSet<org.eclipse.equinox.p2.metadata.IInstallableUnit>
installableUnits
All 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 FinalTargetPlatformImpl(LinkedHashSet<org.eclipse.equinox.p2.metadata.IInstallableUnit> installableUnits, ExecutionEnvironmentResolutionHints executionEnvironment, IRawArtifactFileProvider jointArtifacts, LocalArtifactRepository localArtifactRepository, Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,IArtifactFacade> mavenArtifactLookup, Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,ReactorProjectIdentities> reactorProjectLookup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getArtifactLocation(ArtifactKey artifact)
Returns the file system location of the given target platform artifact.ExecutionEnvironmentResolutionHints
getEEResolutionHints()
Returns additional information for resolving against the configured execution environment.Set<org.eclipse.equinox.p2.metadata.IInstallableUnit>
getInstallableUnits()
org.eclipse.equinox.p2.repository.metadata.IMetadataRepository
getInstallableUnitsAsMetadataRepository()
Returns the target platform content as (immutable) p2 metadata repository.File
getLocalArtifactFile(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.void
reportUsedLocalIUs(Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> usedUnits)
ArtifactKey
resolveArtifact(String type, String id, String version)
Returns an artifact of the given type, id and matching version.org.eclipse.equinox.p2.metadata.IInstallableUnit
resolveUnit(String type, String id, org.eclipse.equinox.p2.metadata.Version version)
Same asTargetPlatform.resolveArtifact(String, String, String)
but returning the result asIInstallableUnit
.void
saveLocalMavenRepository()
-
-
-
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
-
FinalTargetPlatformImpl
public FinalTargetPlatformImpl(LinkedHashSet<org.eclipse.equinox.p2.metadata.IInstallableUnit> installableUnits, ExecutionEnvironmentResolutionHints executionEnvironment, IRawArtifactFileProvider jointArtifacts, LocalArtifactRepository localArtifactRepository, Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,IArtifactFacade> mavenArtifactLookup, Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,ReactorProjectIdentities> reactorProjectLookup)
-
-
Method Detail
-
reportUsedLocalIUs
public void reportUsedLocalIUs(Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> usedUnits)
-
getInstallableUnitsAsMetadataRepository
public org.eclipse.equinox.p2.repository.metadata.IMetadataRepository getInstallableUnitsAsMetadataRepository()
Description copied from interface:P2TargetPlatform
Returns the target platform content as (immutable) p2 metadata repository.
-
getArtifactLocation
public File getArtifactLocation(ArtifactKey artifact)
Description copied from interface:TargetPlatform
Returns 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
null
if 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.
-
getInstallableUnits
public final Set<org.eclipse.equinox.p2.metadata.IInstallableUnit> getInstallableUnits()
- Specified by:
getInstallableUnits
in interfaceP2TargetPlatform
-
resolveArtifact
public final ArtifactKey resolveArtifact(String type, String id, String version) throws IllegalArtifactReferenceException, DependencyResolutionException
Description copied from interface:TargetPlatform
Returns 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
null
matches 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:
resolveArtifact
in interfaceTargetPlatform
- Parameters:
type
- One of the types defined inArtifactType
id
- 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:P2TargetPlatform
Same 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:
resolveUnit
in interfaceP2TargetPlatform
- Throws:
IllegalArtifactReferenceException
DependencyResolutionException
-
getEEResolutionHints
public final ExecutionEnvironmentResolutionHints getEEResolutionHints()
Description copied from interface:P2TargetPlatform
Returns additional information for resolving against the configured execution environment.- Specified by:
getEEResolutionHints
in interfaceP2TargetPlatform
-
getOriginalReactorProjectMap
public final Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,ReactorProjectIdentities> getOriginalReactorProjectMap()
Description copied from interface:P2TargetPlatform
Returns 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:
getOriginalReactorProjectMap
in interfaceP2TargetPlatform
-
getOriginalMavenArtifactMap
public final Map<org.eclipse.equinox.p2.metadata.IInstallableUnit,IArtifactFacade> getOriginalMavenArtifactMap()
Description copied from interface:P2TargetPlatform
Returns 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:
getOriginalMavenArtifactMap
in interfaceP2TargetPlatform
-
getLocalArtifactFile
public final File getLocalArtifactFile(org.eclipse.equinox.p2.metadata.IArtifactKey key)
- Specified by:
getLocalArtifactFile
in interfaceP2TargetPlatform
-
saveLocalMavenRepository
public final void saveLocalMavenRepository()
- Specified by:
saveLocalMavenRepository
in interfaceP2TargetPlatform
-
-