Represents a manifest file for a JAR containing an OSGi bundle.
Type | Name and description |
---|---|
File |
getClassesDir() Returns the classes dir. |
FileCollection |
getClasspath() Returns the classpath. |
String |
getDescription() Returns the description. |
String |
getDocURL() Returns the docURL value. |
Map<String, List<String>> |
getInstructions() Returns all existing instruction. |
String |
getLicense() Returns the license. |
String |
getName() Returns the name. |
String |
getSymbolicName() Returns the symbolic name. |
String |
getVendor() Returns the vendor. |
String |
getVersion() Returns the version. |
OsgiManifest |
instruction(String name, String... values) Adds arguments to an instruction. |
OsgiManifest |
instructionFirst(String name, String... values) Adds arguments to an instruction. |
OsgiManifest |
instructionReplace(String name, String... values) Sets the values for an instruction. |
List<String> |
instructionValue(String instructionName) Returns the list of arguments for a particular instruction. |
void |
setClassesDir(File classesDir) Sets the classes dir. |
void |
setClasspath(FileCollection classpath) A convenient method for setting a Bundle-Classpath instruction. |
void |
setDescription(String description) A convenient method for setting a Bundle-Description instruction. |
void |
setDocURL(String docURL) A convenient method for setting a Bundle-DocURL instruction. |
void |
setLicense(String license) A convenient method for setting a Bundle-License instruction. |
void |
setName(String name) A convenient method for setting a Bundle-Name instruction. |
void |
setSymbolicName(String symbolicName) A convenient method for setting a Bundle-SymbolicName instruction. |
void |
setVendor(String vendor) A convenient method for setting a Bundle-Vendor instruction. |
void |
setVersion(String version) A convenient method for setting a Bundle-Version instruction. |
Methods inherited from class | Name |
---|---|
interface Manifest |
attributes, attributes, from, from, getAttributes, getEffectiveManifest, getSections, writeTo, writeTo |
Returns the classes dir.
Returns the classpath.
Returns the description.
Returns the docURL value.
Returns all existing instruction.
Returns the license.
Returns the name.
Returns the symbolic name.
Returns the vendor.
Returns the version.
Adds arguments to an instruction. If the instruction does not exists, it is created. If it does exists, the arguments are appended to the existing arguments.
Adds arguments to an instruction. If the instruction does not exists, it is created. If it does exists, the arguments are inserted before the existing arguments.
name
- Name of the instruction.values
- The values for the instruction.Sets the values for an instruction. If the instruction does not exists, it is created. If it does exists, the values replace the existing values.
name
- Name of the instruction.values
- The values for the instruction.Returns the list of arguments for a particular instruction.
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.
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.
classpath
- The classpath elementsA convenient method for setting a Bundle-Description instruction.
description
- the description to setA convenient method for setting a Bundle-DocURL instruction.
docURL
- the docURL to set.A convenient method for setting a Bundle-License instruction.
license
- The license to setA convenient method for setting a Bundle-Name instruction.
name
- the name to setA convenient method for setting a Bundle-SymbolicName instruction.
symbolicName
- the symbolicName to setA convenient method for setting a Bundle-Vendor instruction.
vendor
- The vendor to setA convenient method for setting a Bundle-Version instruction.
version
- the version to set