Package de.mnl.osgi.bnd.maven
Interface MavenResource
- 
- All Known Implementing Classes:
- MavenResourceRepository.MavenResourceImpl
 
 public interface MavenResource A resource that is backed by a maven archive.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description aQute.maven.api.Archivearchive()Returns the archive.ResourceasResource()Gets the underlying "ordinary" resource.BoundArchiveboundArchive()Returns the bound archive.List<org.apache.maven.model.Dependency>dependencies()Returns the mandatory maven compile and runtime dependencies.booleanequals(Object obj)Compares aMavenResourcewith another maven resource or aResource.List<Capability>getCapabilities(String namespace)Gets the capabilities from the given namespace.List<Requirement>getRequirements(String namespace)Gets the requirements from the given namespace.inthashCode()The hash code is defined by the revision.StringtoString()
 
- 
- 
- 
Method Detail- 
archiveaQute.maven.api.Archive archive() Returns the archive. The archive is the only mandatory information when creating aMavenResource. The other informations that can be obtained can be made available lazily, i.e. can be loaded on demand.This implies that a MavenResourcecan be created that does not exist in the backing maven repositories. If not obvious from the context, a call toboundArchive()can be used to verify that the resource exists.- Returns:
- the archive
 
 - 
boundArchiveBoundArchive boundArchive() throws MavenResourceException Returns the bound archive. Implies looking up the archive in the backing repositories.- Returns:
- the bound archive
- Throws:
- MavenResourceException- if the archive cannot obtained from a repository
 
 - 
dependenciesList<org.apache.maven.model.Dependency> dependencies() throws MavenResourceException Returns the mandatory maven compile and runtime dependencies. Dependencies in the POM that use variables are filtered, because these variable cannot be resolved.- Returns:
- the dependencies
- Throws:
- MavenResourceException- the maven resource exception
 
 - 
asResourceResource asResource() throws MavenResourceException Gets the underlying "ordinary" resource.- Returns:
- the resource
- Throws:
- MavenResourceException- the maven resource exception
 
 - 
getCapabilitiesList<Capability> getCapabilities(String namespace) throws MavenResourceException Gets the capabilities from the given namespace.- Parameters:
- namespace- the namespace
- Returns:
- the capabilities
- Throws:
- MavenResourceException- the maven resource exception
 
 - 
getRequirementsList<Requirement> getRequirements(String namespace) throws MavenResourceException Gets the requirements from the given namespace.- Parameters:
- namespace- the namespace
- Returns:
- the requirements
- Throws:
- MavenResourceException- the maven resource exception
 
 - 
equalsboolean equals(Object obj) Compares aMavenResourcewith another maven resource or aResource.Two MavenResources are considered equal if their archives are equal. If aMavenResourceis compared with anotherResource, equality will be checked betweenasResource()and the other resource (seeResource.equals(Object)).
 - 
hashCodeint hashCode() The hash code is defined by the revision.
 
- 
 
-