Class MavenBundlesArtifactRepository

java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.equinox.p2.repository.spi.AbstractRepository<org.eclipse.equinox.p2.metadata.IArtifactKey>
org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IArtifactKey>, org.eclipse.equinox.p2.repository.artifact.IArtifactRepository, org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository, org.eclipse.equinox.p2.repository.IRepository<org.eclipse.equinox.p2.metadata.IArtifactKey>, IArtifactFileProvider, IArtifactProvider, IRawArtifactFileProvider, IRawArtifactProvider

public final class MavenBundlesArtifactRepository extends ArtifactRepositoryBaseImpl<GAVArtifactDescriptor>
p2 artifact repository providing the POM dependency Maven artifacts.

Although the provided artifacts are also stored in the local Maven repository, they cannot be made available via the LocalArtifactRepository artifact repository implementation. The reason is that there are differences is how the artifacts provided by the respective implementations may be updated:

  • For the LocalArtifactRepository artifacts, it can be assumed that all updates (e.g. as a result of a mvn install) are done by Tycho. Therefore it is safe to write the p2 artifact index data to disk together with the artifacts.
  • For the POM dependency artifacts, this assumption does not hold true: e.g. a maven-bundle-plugin build may update an artifact in the local Maven repository without notifying Tycho. So if we had written p2 artifact index data to disk, that data might then be stale.
To avoid the need to implement and index invalidation logic, we use this separate artifact repository implementation with an in-memory index.