Interface TargetPlatform

  • All Known Subinterfaces:
    P2TargetPlatform
    All Known Implementing Classes:
    FinalTargetPlatformImpl, PreliminaryTargetPlatformImpl, TargetPlatformBaseImpl

    public interface TargetPlatform
    Set of artifacts which can be used by the build of a project, e.g. to resolve the project's dependencies. In current Tycho (cf. bug 353889), first a preliminary target platform is computed for each reactor project to determine the reactor build order. Then, the final target platform is computed as a normal build step. Note that only the final target platform must be used to produce build results. The preliminary target platform contains partial information ("dependency-only IUs") about the reactor artifacts, which must not end up in the build results.
    • Field Detail

      • FINAL_TARGET_PLATFORM_KEY

        static final java.lang.String FINAL_TARGET_PLATFORM_KEY
        Key under which the final target platform is stored in the reactor project instances.
        See Also:
        Constant Field Values
    • Method Detail

      • resolveArtifact

        ArtifactKey resolveArtifact​(java.lang.String type,
                                    java.lang.String id,
                                    java.lang.String versionRef)
                             throws IllegalArtifactReferenceException,
                                    DependencyResolutionException
        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]
        In case there multiple matching artifacts, the artifact with the highest version is returned.
        Parameters:
        type - One of the types defined in ArtifactType
        id - The ID of the artifact to be found.
        versionRef - A version reference string selecting one exact version or versions from a range. May be null.
        Returns:
        a matching artifact.
        Throws:
        IllegalArtifactReferenceException - if an invalid type or malformed version reference is given
        DependencyResolutionException - if there is no matching artifact in the target platform.
      • getArtifactLocation

        java.io.File getArtifactLocation​(ArtifactKey artifact)
        Returns the file system location of the given target platform artifact.
        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.
      • isFileAlreadyAvailable

        boolean isFileAlreadyAvailable​(ArtifactKey artifactKey)