Interface ArtifactDescriptor


public interface ArtifactDescriptor
An artifact (i.e. a file) in project build target platform.
  • Method Summary

    Modifier and Type
    Method
    Description
    Fetch the artifact in a possibly asynchronous way, that is returning a CompletableFuture that is either already completed (e.g. because the file is already available), failed (e.g because the fetching of the file itself failed) or will be complete sometime later on when the file is ready to be accessed.
    Maven artifact classifier.
    Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit>
    P2 metadata describing the project
    Eclipse/OSGi artifact key (a.k.a.
    Gets the location of the artifact if already know, if you really like to fetch the artifact and make is available use fetchArtifact() instead.
    default File
    getLocation(boolean fetch)
    Deprecated.
    use either getLocation() or fetchArtifact() depending on the use-case.
    ReactorProject corresponding to the artifact or null if the artifact does not come from a reactor project.
  • Method Details

    • getKey

      ArtifactKey getKey()
      Eclipse/OSGi artifact key (a.k.a. "coordinates") that uniquely identify the artifact
    • getLocation

      @Deprecated default File getLocation(boolean fetch)
      Deprecated.
      use either getLocation() or fetchArtifact() depending on the use-case.
      Artifact location on local filesystem
      Parameters:
      fetch - whether to fetch artifact if not already available locally
      Returns:
      the artifact location if already available or if fetch=true and fetching succeeds; null otherwise.
    • getLocation

      Optional<File> getLocation()
      Gets the location of the artifact if already know, if you really like to fetch the artifact and make is available use fetchArtifact() instead.
      Returns:
      an empty optional if the file is not currently available or an optional describing the location of that file
    • fetchArtifact

      CompletableFuture<File> fetchArtifact()
      Fetch the artifact in a possibly asynchronous way, that is returning a CompletableFuture that is either already completed (e.g. because the file is already available), failed (e.g because the fetching of the file itself failed) or will be complete sometime later on when the file is ready to be accessed.
      Returns:
      a CompletableFuture that represents the current state of fetching this file
    • getMavenProject

      ReactorProject getMavenProject()
      ReactorProject corresponding to the artifact or null if the artifact does not come from a reactor project.
    • getClassifier

      String getClassifier()
      Maven artifact classifier. Not null only for classified artifacts coming from a reactor project (eg, sources jar).
    • getInstallableUnits

      Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> getInstallableUnits()
      P2 metadata describing the project