Class TargetPlatformBundlePublisher


  • public class TargetPlatformBundlePublisher
    extends java.lang.Object
    • 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)
      • createOSGiVersionFromArtifact

        public static aQute.bnd.version.Version createOSGiVersionFromArtifact​(IArtifactFacade artifact)