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
-
- org.eclipse.tycho.repository.p2base.artifact.repository.AbstractArtifactRepository2
-
- org.eclipse.tycho.repository.p2base.artifact.repository.ArtifactRepositoryBaseImpl<GAVArtifactDescriptor>
-
- org.eclipse.tycho.p2.target.repository.MavenBundlesArtifactRepository
-
- 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.
-
-
Field Summary
-
Fields inherited from class org.eclipse.tycho.repository.p2base.artifact.repository.ArtifactRepositoryBaseImpl
descriptorsMap
-
-
Constructor Summary
Constructors Constructor Description MavenBundlesArtifactRepository(MavenContext mavenContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPublishedArtifact(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor baseDescriptor, IArtifactFacade mavenArtifact)FilegetBaseDir()protected org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptorgetComparableDescriptor(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)protected GAVArtifactDescriptorgetInternalDescriptorForAdding(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)protected FileinternalGetArtifactStorageLocation(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)booleanisFileAlreadyAvailable(org.eclipse.equinox.p2.metadata.IArtifactKey artifact)-
Methods inherited from class org.eclipse.tycho.repository.p2base.artifact.repository.ArtifactRepositoryBaseImpl
contains, contains, descriptorQueryable, flattenedValues, getArtifact, getArtifact, getArtifactDescriptors, getArtifactFile, getArtifactFile, getRawArtifact, internalAddDescriptor, internalAddInternalDescriptor, internalNewAddingArtifactSink, internalRemoveAllDescriptors, internalRemoveDescriptor, internalRemoveDescriptors, internalRemoveDescriptors, internalRemoveDescriptors, internalStore, newAddingArtifactSink, newAddingRawArtifactSink, query
-
Methods inherited from class org.eclipse.tycho.repository.p2base.artifact.repository.AbstractArtifactRepository2
addDescriptor, addDescriptor, addDescriptors, addDescriptors, getArtifacts, getOutputStream, getRawArtifact, isFatal, removeAll, removeAll, removeDescriptor, removeDescriptor, removeDescriptor, removeDescriptor, removeDescriptors, removeDescriptors, removeDescriptors, removeDescriptors, setStatusOnStreamIfPossible
-
Methods inherited from class org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository
createArtifactDescriptor, createArtifactKey, equals, executeBatch, hashCode
-
Methods inherited from class org.eclipse.equinox.p2.repository.spi.AbstractRepository
assertModifiable, getDescription, getLocation, getName, getProperties, getProperty, getProvider, getProvisioningAgent, getType, getVersion, isModifiable, setDescription, setLocation, setName, setProperties, setProperty, setProperty, setProvider, setType, setVersion
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.equinox.p2.repository.artifact.IArtifactRepository
addDescriptor, addDescriptor, addDescriptors, addDescriptors, createArtifactDescriptor, createArtifactKey, executeBatch, getArtifacts, getOutputStream, getRawArtifact, removeAll, removeAll, removeDescriptor, removeDescriptor, removeDescriptor, removeDescriptor, removeDescriptors, removeDescriptors, removeDescriptors, removeDescriptors
-
-
-
-
Constructor Detail
-
MavenBundlesArtifactRepository
public MavenBundlesArtifactRepository(MavenContext mavenContext)
-
-
Method Detail
-
addPublishedArtifact
public void addPublishedArtifact(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor baseDescriptor, IArtifactFacade mavenArtifact)
-
getInternalDescriptorForAdding
protected GAVArtifactDescriptor getInternalDescriptorForAdding(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
- Specified by:
getInternalDescriptorForAddingin classArtifactRepositoryBaseImpl<GAVArtifactDescriptor>
-
getComparableDescriptor
protected org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor getComparableDescriptor(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
- Specified by:
getComparableDescriptorin classArtifactRepositoryBaseImpl<GAVArtifactDescriptor>
-
internalGetArtifactStorageLocation
protected File internalGetArtifactStorageLocation(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor)
- Specified by:
internalGetArtifactStorageLocationin classArtifactRepositoryBaseImpl<GAVArtifactDescriptor>
-
getBaseDir
public File getBaseDir()
-
isFileAlreadyAvailable
public boolean isFileAlreadyAvailable(org.eclipse.equinox.p2.metadata.IArtifactKey artifact)
-
-