public class TargetPlatformBundlePublisher
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
TargetPlatformBundlePublisher.PublishedBundlesArtifactRepository
p2 artifact repository providing the POM dependency Maven artifacts.
|
private static class |
TargetPlatformBundlePublisher.PublisherRun |
Modifier and Type | Field and Description |
---|---|
private MavenLogger |
logger |
private TargetPlatformBundlePublisher.PublishedBundlesArtifactRepository |
publishedArtifacts |
Constructor and Description |
---|
TargetPlatformBundlePublisher(java.io.File localMavenRepositoryRoot,
MavenLogger logger,
MavenRepositorySystem repositorySystem) |
Modifier and Type | Method and Description |
---|---|
(package private) org.eclipse.equinox.p2.metadata.IInstallableUnit |
attemptToPublishBundle(IArtifactFacade mavenArtifact)
Generate p2 data for an artifact, if the artifact is an OSGI bundle.
|
(package private) IRawArtifactFileProvider |
getArtifactRepoOfPublishedBundles() |
private boolean |
isAvailableAsLocalFile(IArtifactFacade artifact) |
private boolean |
isCertainlyNoBundle(IArtifactFacade artifact) |
private final MavenLogger logger
private final TargetPlatformBundlePublisher.PublishedBundlesArtifactRepository publishedArtifacts
public TargetPlatformBundlePublisher(java.io.File localMavenRepositoryRoot, MavenLogger logger, MavenRepositorySystem repositorySystem)
org.eclipse.equinox.p2.metadata.IInstallableUnit attemptToPublishBundle(IArtifactFacade mavenArtifact)
The p2 metadata produced by this method is only determined by the artifact, and the function used for this conversion must not change (significantly) even in future versions. This is required because the resulting metadata can be included in p2 repositories built by Tycho, and hence may be propagated into the p2 universe. Therefore the metadata generated by this method shall fulfill the basic assumption of p2 that ID+version uniquely identifies a unit/artifact. Assuming that distinct bundle artifacts specify unique ID+versions in their manifest (which should be mostly true), and the p2 BundlesAction used in the implementation doesn't change significantly (which can also be assumed), these conditions specified above a met.
In slight deviation on the principles described in the previous paragraph, the implementation adds GAV properties to the generated IU. This is justified by the potential benefits of tracing the origin of artifact.
mavenArtifact
- An artifact in local file system.null
if the artifact isn't a valid OSGi
bundle.private boolean isAvailableAsLocalFile(IArtifactFacade artifact)
private boolean isCertainlyNoBundle(IArtifactFacade artifact)
IRawArtifactFileProvider getArtifactRepoOfPublishedBundles()