Class BundlesAction

java.lang.Object
org.eclipse.equinox.p2.publisher.AbstractPublisherAction
org.eclipse.tycho.p2maven.tmp.BundlesAction
All Implemented Interfaces:
org.eclipse.equinox.p2.publisher.IPublisherAction
Direct Known Subclasses:
BundleDependenciesAction

public class BundlesAction extends org.eclipse.equinox.p2.publisher.AbstractPublisherAction
Publish IUs for all of the bundles in a given set of locations or described by a set of bundle descriptions. The locations can be actual locations of the bundles or folders of bundles. This action consults the following types of advice:
  • IAdditionalInstallableUnitAdvice
  • IBundleShapeAdvice
  • ICapabilityAdvice
  • IPropertyAdvice
  • ITouchpointAdvice
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.eclipse.equinox.p2.metadata.IProvidedCapability
     
    static final int
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    protected org.eclipse.core.runtime.MultiStatus
     
    static final String
     
    static final String
    Manifest header directive for specifying how optional runtime requirements shall be handled during installation.
    static final String
    Value for INSTALLATION_DIRECTIVE indicating that an optional requirement shall be installed unless this is prevented by other mandatory requirements.
    static final String
     
    static final String
     
    static final String
    Attribute used to store an attribute on an exported package
    static final String
    Attribute used to store an directive on an exported package
    static final org.eclipse.equinox.p2.metadata.IProvidedCapability
     
    static final String
    A suffix used to match a bundle IU to its source
    static final String
    A capability name in the PublisherHelper.NAMESPACE_ECLIPSE_TYPE namespace representing and OSGi bundle resource
    static final String
    A capability name in the PublisherHelper.NAMESPACE_ECLIPSE_TYPE namespace representing a source bundle

    Fields inherited from class org.eclipse.equinox.p2.publisher.AbstractPublisherAction

    CONFIG_ANY, CONFIG_SEGMENT_SEPARATOR, info
  • Constructor Summary

    Constructors
    Constructor
    Description
    BundlesAction(File[] locations)
     
    BundlesAction(org.eclipse.osgi.service.resolver.BundleDescription[] bundles)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addCapability(List<org.eclipse.equinox.p2.metadata.IProvidedCapability> caps, org.eclipse.osgi.service.resolver.GenericDescription provideCapDesc, org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription iu, int capNo)
     
    protected void
    addImportPackageRequirement(ArrayList<org.eclipse.equinox.p2.metadata.IRequirement> reqsDeps, org.eclipse.osgi.service.resolver.ImportPackageSpecification importSpec, org.eclipse.osgi.util.ManifestElement[] rawImportPackageHeader)
    Deprecated.
    protected void
    addImportPackageRequirement(List<org.eclipse.equinox.p2.metadata.IRequirement> reqsDeps, org.eclipse.osgi.service.resolver.ImportPackageSpecification importSpec, org.eclipse.osgi.util.ManifestElement[] rawImportPackageHeader)
     
    protected void
    addRequireBundleRequirement(ArrayList<org.eclipse.equinox.p2.metadata.IRequirement> reqsDeps, org.eclipse.osgi.service.resolver.BundleSpecification requiredBundle, org.eclipse.osgi.util.ManifestElement[] rawRequireBundleHeader)
    Deprecated.
    protected void
    addRequireBundleRequirement(List<org.eclipse.equinox.p2.metadata.IRequirement> reqsDeps, org.eclipse.osgi.service.resolver.BundleSpecification requiredBundle, org.eclipse.osgi.util.ManifestElement[] rawRequireBundleHeader)
     
    protected void
    addRequirement(List<org.eclipse.equinox.p2.metadata.IRequirement> reqsDeps, org.eclipse.osgi.service.resolver.GenericSpecification requireCapSpec, org.eclipse.osgi.util.ManifestElement[] rawRequireCapabilities)
     
    protected void
    addRequirement(List<org.eclipse.equinox.p2.metadata.IRequirement> reqsDeps, org.eclipse.osgi.service.resolver.GenericSpecification requireCapSpec, org.eclipse.osgi.util.ManifestElement[] rawRequireCapabilities, org.eclipse.osgi.service.resolver.BundleDescription bd)
     
    basicLoadManifest(File bundleLocation)
     
    Deprecated.
    protected void
    createAdviceFileAdvice(org.eclipse.osgi.service.resolver.BundleDescription bundleDescription, org.eclipse.equinox.p2.publisher.IPublisherInfo publisherInfo)
    Adds advice for any p2.inf file found in this bundle.
    static org.eclipse.equinox.p2.metadata.IArtifactKey
     
    static org.eclipse.equinox.p2.metadata.IInstallableUnit
    createBundleConfigurationUnit(String hostId, org.eclipse.equinox.p2.metadata.Version cuVersion, boolean isBundleFragment, org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo configInfo, String configurationFlavor, org.eclipse.equinox.p2.metadata.expression.IMatchExpression<org.eclipse.equinox.p2.metadata.IInstallableUnit> filter)
     
    static org.eclipse.osgi.service.resolver.BundleDescription
    createBundleDescription(File bundleLocation)
     
    static org.eclipse.osgi.service.resolver.BundleDescription
    createBundleDescription(Dictionary<String,String> enhancedManifest, File bundleLocation)
     
    static org.eclipse.osgi.service.resolver.BundleDescription
    Deprecated.
    static org.eclipse.equinox.p2.metadata.IInstallableUnit
    createBundleIU(org.eclipse.osgi.service.resolver.BundleDescription bd, org.eclipse.equinox.p2.metadata.IArtifactKey key, org.eclipse.equinox.p2.publisher.IPublisherInfo info)
     
    static org.eclipse.equinox.p2.metadata.IInstallableUnit
    createDefaultBundleConfigurationUnit(org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo configInfo, org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo unconfigInfo, String configurationFlavor)
     
    protected org.eclipse.equinox.p2.metadata.IInstallableUnit
    doCreateBundleIU(org.eclipse.osgi.service.resolver.BundleDescription bd, org.eclipse.equinox.p2.metadata.IArtifactKey key, org.eclipse.equinox.p2.publisher.IPublisherInfo publisherInfo)
     
    protected void
    generateBundleIUs(org.eclipse.osgi.service.resolver.BundleDescription[] bundleDescriptions, org.eclipse.equinox.p2.publisher.IPublisherInfo publisherInfo, org.eclipse.equinox.p2.publisher.IPublisherResult result, org.eclipse.core.runtime.IProgressMonitor monitor)
    Publishes bundle IUs to the p2 metadata and artifact repositories.
    protected void
    generateBundleIUs(org.eclipse.osgi.service.resolver.BundleDescription[] bundleDescriptions, org.eclipse.equinox.p2.publisher.IPublisherResult result, org.eclipse.core.runtime.IProgressMonitor monitor)
    protected org.eclipse.osgi.service.resolver.BundleDescription[]
    getBundleDescriptions(File[] bundleLocations, org.eclipse.core.runtime.IProgressMonitor monitor)
     
    static String[]
    getExternalizedStrings(org.eclipse.equinox.p2.metadata.IInstallableUnit iu)
     
    getHostLocalizations(File bundleLocation, String[] hostBundleManifestValues)
     
    static String[]
     
    protected static boolean
    isOptional(org.eclipse.osgi.service.resolver.ImportPackageSpecification importedPackage)
     
    static boolean
     
    loadManifest(File bundleLocation)
     
    Deprecated.
    use loadManifest(File) instead.
    org.eclipse.core.runtime.IStatus
    perform(org.eclipse.equinox.p2.publisher.IPublisherInfo publisherInfo, org.eclipse.equinox.p2.publisher.IPublisherResult results, org.eclipse.core.runtime.IProgressMonitor monitor)
     
    protected void
    publishArtifact(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor, File base, File[] inclusions, org.eclipse.equinox.p2.publisher.IPublisherInfo publisherInfo)
     
    protected void
    publishArtifact(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor, File jarFile, org.eclipse.equinox.p2.publisher.IPublisherInfo publisherInfo)
     

    Methods inherited from class org.eclipse.equinox.p2.publisher.AbstractPublisherAction

    addSelfCapability, createConfigSpec, createCUIdString, createFilterSpec, createIdString, createIURequirements, createIUShell, createLDAPString, createParentIU, createParentPrefixComputer, createRootPrefixComputer, createSelfCapability, filterMatches, getArrayFromString, getVersionRange, parseConfigSpec, processAdditionalInstallableUnitsAdvice, processArtifactPropertiesAdvice, processCapabilityAdvice, processInstallableUnitPropertiesAdvice, processTouchpointAdvice, processTouchpointAdvice, processUpdateDescriptorAdvice, publishArtifact, queryForIU, queryForIUs, setPublisherInfo, toRequiredCapability

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • FILTER_PROPERTY_INSTALL_SOURCE

      public static final String FILTER_PROPERTY_INSTALL_SOURCE
      See Also:
    • INSTALL_SOURCE_FILTER

      public static final String INSTALL_SOURCE_FILTER
    • SOURCE_SUFFIX

      public static final String SOURCE_SUFFIX
      A suffix used to match a bundle IU to its source
      See Also:
    • TYPE_ECLIPSE_BUNDLE

      public static final String TYPE_ECLIPSE_BUNDLE
      A capability name in the PublisherHelper.NAMESPACE_ECLIPSE_TYPE namespace representing and OSGi bundle resource
      See Also:
    • TYPE_ECLIPSE_SOURCE

      public static final String TYPE_ECLIPSE_SOURCE
      A capability name in the PublisherHelper.NAMESPACE_ECLIPSE_TYPE namespace representing a source bundle
      See Also:
    • OSGI_BUNDLE_CLASSIFIER

      public static final String OSGI_BUNDLE_CLASSIFIER
      See Also:
    • CAPABILITY_NS_OSGI_BUNDLE

      public static final String CAPABILITY_NS_OSGI_BUNDLE
      See Also:
    • CAPABILITY_NS_OSGI_FRAGMENT

      public static final String CAPABILITY_NS_OSGI_FRAGMENT
      See Also:
    • BUNDLE_CAPABILITY

      public static final org.eclipse.equinox.p2.metadata.IProvidedCapability BUNDLE_CAPABILITY
    • SOURCE_BUNDLE_CAPABILITY

      public static final org.eclipse.equinox.p2.metadata.IProvidedCapability SOURCE_BUNDLE_CAPABILITY
    • BUNDLE_LOCALIZATION_INDEX

      public static final int BUNDLE_LOCALIZATION_INDEX
    • DIR

      public static final String DIR
      See Also:
    • JAR

      public static final String JAR
      See Also:
    • BUNDLE_SHAPE

      public static final String BUNDLE_SHAPE
      See Also:
    • PACKAGE_ATTRIBUTE_PROPERTY_PREFIX

      public static final String PACKAGE_ATTRIBUTE_PROPERTY_PREFIX
      Attribute used to store an attribute on an exported package
      See Also:
    • PACKAGE_DIRECTIVE_PROPERTY_PREFIX

      public static final String PACKAGE_DIRECTIVE_PROPERTY_PREFIX
      Attribute used to store an directive on an exported package
      See Also:
    • INSTALLATION_DIRECTIVE

      public static final String INSTALLATION_DIRECTIVE
      Manifest header directive for specifying how optional runtime requirements shall be handled during installation.
      See Also:
    • INSTALLATION_GREEDY

      public static final String INSTALLATION_GREEDY
      Value for INSTALLATION_DIRECTIVE indicating that an optional requirement shall be installed unless this is prevented by other mandatory requirements. Optional requirements without this directive value are ignored during installation.
      See Also:
    • finalStatus

      protected org.eclipse.core.runtime.MultiStatus finalStatus
  • Constructor Details

    • BundlesAction

      public BundlesAction(File[] locations)
    • BundlesAction

      public BundlesAction(org.eclipse.osgi.service.resolver.BundleDescription[] bundles)
  • Method Details

    • createBundleArtifactKey

      public static org.eclipse.equinox.p2.metadata.IArtifactKey createBundleArtifactKey(String bsn, String version)
    • createBundleConfigurationUnit

      public static org.eclipse.equinox.p2.metadata.IInstallableUnit createBundleConfigurationUnit(String hostId, org.eclipse.equinox.p2.metadata.Version cuVersion, boolean isBundleFragment, org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo configInfo, String configurationFlavor, org.eclipse.equinox.p2.metadata.expression.IMatchExpression<org.eclipse.equinox.p2.metadata.IInstallableUnit> filter)
    • createBundleIU

      public static org.eclipse.equinox.p2.metadata.IInstallableUnit createBundleIU(org.eclipse.osgi.service.resolver.BundleDescription bd, org.eclipse.equinox.p2.metadata.IArtifactKey key, org.eclipse.equinox.p2.publisher.IPublisherInfo info)
    • doCreateBundleIU

      protected org.eclipse.equinox.p2.metadata.IInstallableUnit doCreateBundleIU(org.eclipse.osgi.service.resolver.BundleDescription bd, org.eclipse.equinox.p2.metadata.IArtifactKey key, org.eclipse.equinox.p2.publisher.IPublisherInfo publisherInfo)
    • addImportPackageRequirement

      @Deprecated protected void addImportPackageRequirement(ArrayList<org.eclipse.equinox.p2.metadata.IRequirement> reqsDeps, org.eclipse.osgi.service.resolver.ImportPackageSpecification importSpec, org.eclipse.osgi.util.ManifestElement[] rawImportPackageHeader)
      Deprecated.
    • addImportPackageRequirement

      protected void addImportPackageRequirement(List<org.eclipse.equinox.p2.metadata.IRequirement> reqsDeps, org.eclipse.osgi.service.resolver.ImportPackageSpecification importSpec, org.eclipse.osgi.util.ManifestElement[] rawImportPackageHeader)
    • addRequireBundleRequirement

      @Deprecated protected void addRequireBundleRequirement(ArrayList<org.eclipse.equinox.p2.metadata.IRequirement> reqsDeps, org.eclipse.osgi.service.resolver.BundleSpecification requiredBundle, org.eclipse.osgi.util.ManifestElement[] rawRequireBundleHeader)
      Deprecated.
    • addRequireBundleRequirement

      protected void addRequireBundleRequirement(List<org.eclipse.equinox.p2.metadata.IRequirement> reqsDeps, org.eclipse.osgi.service.resolver.BundleSpecification requiredBundle, org.eclipse.osgi.util.ManifestElement[] rawRequireBundleHeader)
    • addRequirement

      protected void addRequirement(List<org.eclipse.equinox.p2.metadata.IRequirement> reqsDeps, org.eclipse.osgi.service.resolver.GenericSpecification requireCapSpec, org.eclipse.osgi.util.ManifestElement[] rawRequireCapabilities)
    • addRequirement

      protected void addRequirement(List<org.eclipse.equinox.p2.metadata.IRequirement> reqsDeps, org.eclipse.osgi.service.resolver.GenericSpecification requireCapSpec, org.eclipse.osgi.util.ManifestElement[] rawRequireCapabilities, org.eclipse.osgi.service.resolver.BundleDescription bd)
    • addCapability

      protected void addCapability(List<org.eclipse.equinox.p2.metadata.IProvidedCapability> caps, org.eclipse.osgi.service.resolver.GenericDescription provideCapDesc, org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription iu, int capNo)
    • createDefaultBundleConfigurationUnit

      public static org.eclipse.equinox.p2.metadata.IInstallableUnit createDefaultBundleConfigurationUnit(org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo configInfo, org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo unconfigInfo, String configurationFlavor)
    • isOptional

      protected static boolean isOptional(org.eclipse.osgi.service.resolver.ImportPackageSpecification importedPackage)
    • getExternalizedStrings

      public static String[] getExternalizedStrings(org.eclipse.equinox.p2.metadata.IInstallableUnit iu)
    • getManifestCachedValues

      public static String[] getManifestCachedValues(Map<String,String> manifest)
    • getHostLocalizations

      public static Map<Locale,Map<String,String>> getHostLocalizations(File bundleLocation, String[] hostBundleManifestValues)
    • createBundleDescription

      public static org.eclipse.osgi.service.resolver.BundleDescription createBundleDescription(Dictionary<String,String> enhancedManifest, File bundleLocation)
    • createBundleDescriptionIgnoringExceptions

      @Deprecated public static org.eclipse.osgi.service.resolver.BundleDescription createBundleDescriptionIgnoringExceptions(File bundleLocation)
      Deprecated.
    • createBundleDescription

      public static org.eclipse.osgi.service.resolver.BundleDescription createBundleDescription(File bundleLocation) throws IOException, org.osgi.framework.BundleException
      Throws:
      IOException
      org.osgi.framework.BundleException
    • loadManifestIgnoringExceptions

      @Deprecated public static Dictionary<String,String> loadManifestIgnoringExceptions(File bundleLocation)
      Deprecated.
      use loadManifest(File) instead.
    • loadManifest

      public static Dictionary<String,String> loadManifest(File bundleLocation) throws IOException, org.osgi.framework.BundleException
      Throws:
      IOException
      org.osgi.framework.BundleException
    • basicLoadManifestIgnoringExceptions

      @Deprecated public static Dictionary<String,String> basicLoadManifestIgnoringExceptions(File bundleLocation)
      Deprecated.
    • basicLoadManifest

      public static Dictionary<String,String> basicLoadManifest(File bundleLocation) throws IOException, org.osgi.framework.BundleException
      Throws:
      IOException
      org.osgi.framework.BundleException
    • perform

      public org.eclipse.core.runtime.IStatus perform(org.eclipse.equinox.p2.publisher.IPublisherInfo publisherInfo, org.eclipse.equinox.p2.publisher.IPublisherResult results, org.eclipse.core.runtime.IProgressMonitor monitor)
      Specified by:
      perform in interface org.eclipse.equinox.p2.publisher.IPublisherAction
      Specified by:
      perform in class org.eclipse.equinox.p2.publisher.AbstractPublisherAction
    • publishArtifact

      protected void publishArtifact(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor, File base, File[] inclusions, org.eclipse.equinox.p2.publisher.IPublisherInfo publisherInfo)
    • publishArtifact

      protected void publishArtifact(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor descriptor, File jarFile, org.eclipse.equinox.p2.publisher.IPublisherInfo publisherInfo)
      Overrides:
      publishArtifact in class org.eclipse.equinox.p2.publisher.AbstractPublisherAction
    • generateBundleIUs

      @Deprecated protected void generateBundleIUs(org.eclipse.osgi.service.resolver.BundleDescription[] bundleDescriptions, org.eclipse.equinox.p2.publisher.IPublisherResult result, org.eclipse.core.runtime.IProgressMonitor monitor)
      Publishes bundle IUs to the p2 metadata and artifact repositories.
      Parameters:
      bundleDescriptions - Equinox framework descriptions of the bundles to publish.
      result - Used to attach status for the publication operation.
      monitor - Used to fire progress events.
    • generateBundleIUs

      protected void generateBundleIUs(org.eclipse.osgi.service.resolver.BundleDescription[] bundleDescriptions, org.eclipse.equinox.p2.publisher.IPublisherInfo publisherInfo, org.eclipse.equinox.p2.publisher.IPublisherResult result, org.eclipse.core.runtime.IProgressMonitor monitor)
      Publishes bundle IUs to the p2 metadata and artifact repositories.
      Parameters:
      bundleDescriptions - Equinox framework descriptions of the bundles to publish.
      publisherInfo - Configuration and publication advice information.
      result - Used to attach status for the publication operation.
      monitor - Used to fire progress events.
    • createAdviceFileAdvice

      protected void createAdviceFileAdvice(org.eclipse.osgi.service.resolver.BundleDescription bundleDescription, org.eclipse.equinox.p2.publisher.IPublisherInfo publisherInfo)
      Adds advice for any p2.inf file found in this bundle.
    • getBundleDescriptions

      protected org.eclipse.osgi.service.resolver.BundleDescription[] getBundleDescriptions(File[] bundleLocations, org.eclipse.core.runtime.IProgressMonitor monitor)
    • isValidValueType

      public static boolean isValidValueType(Object prop)