Java Reference
In-Depth Information
You first specify the deployment package's symbolic name and version. Next, you specify
the list of resources contained in the JAR file. You specify the name of a resource, its sym-
bolic name, and its version; you must do this for each resource. For this example, you
only have bundle resources. To finish, you need to use the jar tool to create the JAR file
with the appropriate content, and you're finished with your first deployment package.
Signing deployment packages
In this example, you don't sign your deployment package, nor is it required for you to
do so. If you want to create a signed deployment package, you use the jarsigner
tool from the standard Java SDK. The signing process is no different than signing a
normal JAR file; it results in the signatures being placed in the deployment package
JAR file in the META-INF directory and after the MANIFEST.MF file. Additionally, each
entry section in the manifest contains a digest entry.
Now you need to create the manifest for your fix package containing the shape bun-
dles. This manifest is as follows:
Manifest-Version: 1.0
DeploymentPackage-Symbolicname: org.foo.paint
DeploymentPackage-Version: 2.0
DeploymentPackage-FixPack: [1,2)
Name: paint-4.0.jar
Bundle-SymbolicName: org.foo.paint
Bundle-Version: 4.0.0
DeploymentPackage-Missing: true
Name: shape-4.0.jar
Bundle-SymbolicName: org.foo.shape
Bundle-Version: 4.0.0
DeploymentPackage-Missing: true
Name: triangle-4.0.jar
Bundle-SymbolicName: org.foo.shape.triangle
Bundle-Version: 4.0.0
Name: circle-4.0.jar
Bundle-SymbolicName: org.foo.shape.circle
Bundle-Version: 4.0.0
Name: square-4.0.jar
Bundle-SymbolicName: org.foo.shape.square
Bundle-Version: 4.0.0
Because the fix package is an update to your core package, the symbolic name stays
the same, but the version is upgraded to 2.0.0 . The DeploymentPackage-FixPack
header indicates that this is a fix package; you use version-range syntax to indicate that
the fix package can be applied to any previously installed version of the deployment
package from 1.0.0 inclusive to 2.0.0 exclusive. This version-numbering scheme
expresses the assumption that only major version-number changes indicate added
Search WWH ::




Custom Search