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
private static class
TargetPlatformBundlePublisher.WrappedArtifact
-
Field Summary
Fields Modifier and Type Field Description private MavenLogger
logger
private ReactorProject
project
private TargetPlatformBundlePublisher.PublishedBundlesArtifactRepository
publishedArtifacts
private static java.lang.String
WRAPPED_CLASSIFIER
-
Constructor Summary
Constructors Constructor Description TargetPlatformBundlePublisher(java.io.File localMavenRepositoryRoot, ReactorProject project, MavenLogger logger, MavenRepositorySystem repositorySystem)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) MavenBundleInfo
attemptToPublishBundle(IArtifactFacade mavenArtifact, boolean wrapIfNessesary)
Generate p2 data for an artifact, if the artifact is an OSGI bundle.static aQute.bnd.version.Version
createOSGiVersionFromArtifact(IArtifactFacade artifact)
(package private) IRawArtifactFileProvider
getArtifactRepoOfPublishedBundles()
private boolean
isAvailableAsLocalFile(IArtifactFacade artifact)
-
-
-
Field Detail
-
WRAPPED_CLASSIFIER
private static final java.lang.String WRAPPED_CLASSIFIER
- See Also:
- Constant Field Values
-
logger
private final MavenLogger logger
-
publishedArtifacts
private final TargetPlatformBundlePublisher.PublishedBundlesArtifactRepository publishedArtifacts
-
project
private ReactorProject project
-
-
Constructor Detail
-
TargetPlatformBundlePublisher
public TargetPlatformBundlePublisher(java.io.File localMavenRepositoryRoot, ReactorProject project, MavenLogger logger, MavenRepositorySystem repositorySystem)
-
-
Method Detail
-
attemptToPublishBundle
MavenBundleInfo attemptToPublishBundle(IArtifactFacade mavenArtifact, boolean wrapIfNessesary)
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)
-
getArtifactRepoOfPublishedBundles
IRawArtifactFileProvider getArtifactRepoOfPublishedBundles()
-
createOSGiVersionFromArtifact
public static aQute.bnd.version.Version createOSGiVersionFromArtifact(IArtifactFacade artifact)
-
-