Class TargetPlatformBundlePublisher
- java.lang.Object
-
- org.eclipse.tycho.p2.target.TargetPlatformBundlePublisher
-
public class TargetPlatformBundlePublisher extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
TargetPlatformBundlePublisher.PublishedBundlesArtifactRepository
p2 artifact repository providing the POM dependency Maven artifacts.private static class
TargetPlatformBundlePublisher.PublisherRun
-
Field Summary
Fields Modifier and Type Field Description private MavenLogger
logger
private TargetPlatformBundlePublisher.PublishedBundlesArtifactRepository
publishedArtifacts
-
Constructor Summary
Constructors Constructor Description TargetPlatformBundlePublisher(java.io.File localMavenRepositoryRoot, MavenLogger logger, MavenRepositorySystem repositorySystem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
logger
private final MavenLogger logger
-
publishedArtifacts
private final TargetPlatformBundlePublisher.PublishedBundlesArtifactRepository publishedArtifacts
-
-
Constructor Detail
-
TargetPlatformBundlePublisher
public TargetPlatformBundlePublisher(java.io.File localMavenRepositoryRoot, MavenLogger logger, MavenRepositorySystem repositorySystem)
-
-
Method Detail
-
attemptToPublishBundle
org.eclipse.equinox.p2.metadata.IInstallableUnit attemptToPublishBundle(IArtifactFacade mavenArtifact)
Generate p2 data for an artifact, if the artifact is an OSGI bundle.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.
- Parameters:
mavenArtifact
- An artifact in local file system.- Returns:
- the p2 metadata of the artifact, or
null
if the artifact isn't a valid OSGi bundle.
-
isAvailableAsLocalFile
private boolean isAvailableAsLocalFile(IArtifactFacade artifact)
-
isCertainlyNoBundle
private boolean isCertainlyNoBundle(IArtifactFacade artifact)
-
getArtifactRepoOfPublishedBundles
IRawArtifactFileProvider getArtifactRepoOfPublishedBundles()
-
-