Interface OsgiManifest

  • All Superinterfaces:
    Manifest

    public interface OsgiManifest
    extends Manifest
    Represents a manifest file for a JAR containing an OSGi bundle.
    • Method Detail

      • getInstructions

        Map<String,​List<String>> getInstructions()
        Returns all existing instruction.
        Returns:
        A map with instructions. The key of the map is the instruction name, the value a list of arguments.
      • setSymbolicName

        void setSymbolicName​(String symbolicName)
        A convenient method for setting a Bundle-SymbolicName instruction.
        Parameters:
        symbolicName - the symbolicName to set
      • setName

        void setName​(String name)
        A convenient method for setting a Bundle-Name instruction.
        Parameters:
        name - the name to set
      • setVersion

        void setVersion​(String version)
        A convenient method for setting a Bundle-Version instruction.
        Parameters:
        version - the version to set
      • setDescription

        void setDescription​(String description)
        A convenient method for setting a Bundle-Description instruction.
        Parameters:
        description - the description to set
      • setLicense

        void setLicense​(String license)
        A convenient method for setting a Bundle-License instruction.
        Parameters:
        license - The license to set
      • setVendor

        void setVendor​(String vendor)
        A convenient method for setting a Bundle-Vendor instruction.
        Parameters:
        vendor - The vendor to set
      • setDocURL

        void setDocURL​(String docURL)
        A convenient method for setting a Bundle-DocURL instruction.
        Parameters:
        docURL - the docURL to set.
      • setClassesDir

        void setClassesDir​(File classesDir)
        Sets the classes dir. This directory is the major source of input for generation the OSGi manifest. All classes are analyzed for its packages and package dependencies. Based on this the Import-Package value is set. This auto generated value can be overwritten by explicitly setting an instruction.
        See Also:
        instruction(String, String...)
      • setClasspath

        void setClasspath​(FileCollection classpath)
        A convenient method for setting a Bundle-Classpath instruction. The information of the classpath elements are only used if they are OSGi bundles. In this case for example the version information provided by the bundle is used in the Import-Package of the generated OSGi bundle.
        Parameters:
        classpath - The classpath elements