Package org.eclipse.tycho.artifacts
Interface DependencyArtifacts
-
- All Known Implementing Classes:
DefaultDependencyArtifacts
,MultiEnvironmentDependencyArtifacts
public interface DependencyArtifacts
DependencyArtifacts is a collection of artifacts and their corresponding metadata.Each artifact represents a file and can be uniquely identified either by (type,id,version) or by (location,classifier) tuple. Each artifact has associated (p2) metadata.
In some cases it is not possible or not practical to associate external dependency metadata, i.e. metadata not coming from a reactor project, with a specific artifact. Such metadata can only be accessed via
getInstallableUnits()
-
-
Field Summary
Fields Modifier and Type Field Description static String
ANY_QUALIFIER
Conventional qualifier used to denote "ANY QUALIFIER" in feature.xml and .product files.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,ArtifactDescriptor>
getArtifact(File location)
Returns map of artifact descriptors at the given location.ArtifactDescriptor
getArtifact(String type, String id, String version)
Returns artifact of the given type and id and best matching version or null if no such artifact is found.ArtifactDescriptor
getArtifact(ArtifactKey key)
List<ArtifactDescriptor>
getArtifacts()
Returns all artifacts.List<ArtifactDescriptor>
getArtifacts(String type)
Returns all artifacts of the given type.Collection<?>
getInstallableUnits()
Collection of dependency metadata (p2 installable units).ReactorProject
getMavenProject(File location)
Set<?>
getNonReactorUnits()
Set of IInstallableUnits in the resolved project dependencies that come from outside the local reactor, ornull
if the the project dependencies were not resolved from a p2 target platform.void
toDebugString(StringBuilder sb, String linePrefix)
For debug purposes only, do not use.
-
-
-
Field Detail
-
ANY_QUALIFIER
static final String ANY_QUALIFIER
Conventional qualifier used to denote "ANY QUALIFIER" in feature.xml and .product files. See TYCHO-383.- See Also:
- Constant Field Values
-
-
Method Detail
-
getArtifacts
List<ArtifactDescriptor> getArtifacts()
Returns all artifacts.
-
getArtifacts
List<ArtifactDescriptor> getArtifacts(String type)
Returns all artifacts of the given type.
-
getArtifact
ArtifactDescriptor getArtifact(String type, String id, String version)
Returns artifact of the given type and id and best matching version or null if no such artifact is found.This method uses the following version selection rules
- 0.0.0 or null matches the latest version
- 1.2.3, i.e. without a qualifier, is equivalent to [1.2.3,1.2.4) and matches 1.2.3 with the latest qualifier.
- 1.2.3.qualifier, i.e. literal "qualifier", is equivalent to [1.2.3,1.2.4) and matches 1.2.3 with the latest qualifier.
- all other versions match artifact with that exact version, 1.2.3.foo is equivalent to [1.2.3.foo]
-
getMavenProject
ReactorProject getMavenProject(File location)
-
getArtifact
Map<String,ArtifactDescriptor> getArtifact(File location)
Returns map of artifact descriptors at the given location. The map is keyed by maven artifact classifiers. For dependency artifacts and the main reactor project artifact, the classifier isnull
.
-
getArtifact
ArtifactDescriptor getArtifact(ArtifactKey key)
-
getNonReactorUnits
Set<?> getNonReactorUnits()
Set of IInstallableUnits in the resolved project dependencies that come from outside the local reactor, ornull
if the the project dependencies were not resolved from a p2 target platform.- Returns:
- Set<IInstallableUnit> or null
-
getInstallableUnits
Collection<?> getInstallableUnits()
Collection of dependency metadata (p2 installable units). Includes metadata associated with dependency artifacts and metadata that is not possible or not practical to assosiate with a specific artifact, like, for example, p2 repository category installable units.The result does not include metadata associated with 'this' project.
- Returns:
- Set<IInstallableUnit> or null
-
toDebugString
void toDebugString(StringBuilder sb, String linePrefix)
For debug purposes only, do not use. TODO move this out of here
-
-