public interface ArtifactDescriptor
An artifact (i.e. a file) in project build target platform.
-
Method Summary
Modifier and TypeMethodDescriptionFetch the artifact in a possibly asynchronous way, that is returning aCompletableFuturethat 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 projectgetKey()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 usefetchArtifact()instead.default FilegetLocation(boolean fetch) Deprecated.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.use eithergetLocation()orfetchArtifact()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=trueand fetching succeeds;nullotherwise.
-
getLocation
Gets the location of the artifact if already know, if you really like to fetch the artifact and make is available usefetchArtifact()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 aCompletableFuturethat 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
CompletableFuturethat 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
-
getLocation()orfetchArtifact()depending on the use-case.