A bundle is a group of Java classes and additional resources equipped with a detailed manifest
on all its contents, as well as additional services needed to give the included group of Java
classes more sophisticated behaviors, to the extent of deeming the entire aggregate a
component. 但它还是一个JAR文件。
1. Bundle Version,Bundle Manifest Version,Mainfest Version
(1)Bundle Version:每个Bundle都有一个版本,默认为:0;
(2)Bundle Manifest Version:对OSGi 3而言是:1,对OSGi4而言是:2;
(3)Mainfest Version:是JAR文件规范对JAR文件的要求。
2. OSGI MANIFEST HEADERS
(1) Bundle-Name: Bundle的一个简单的名字;
(2) Bundle-Description: Bundle的一个简单描述;
(3) Bundle-Version: 每个Bundle都有一个版本,默认为:0;
(4) Bundle-Activator: 指定一个当Bundle Activated时调用的类;
(5) Export-Package: 指定当前Bundle中那些Package可被Bundle外使用;
(6) Import-Package: 指定当前Bundle需要从外面获取的资源已满足自己的依赖;
3. SpringDM提供的Header
SpringExtender-Version: 1.1.0
默认情况下,当SpringDM extender安装后,SpringDM将检查每一个Bundle,而该HEader将允许应用Bundle
改变SpringDM该行为,即只有当一个确定版本的SpringDM extender存在时才执行该检查和处理的过程。
4. VTS提供的Header
(1)Application-Version:只用于PAR文件中MANIFEST.MF配置;
(2)Application-SymbolicName:该Header与Application-Version联合起来确保VTS中没有相同的PAR文件;
(3)Library-SymbolicName: org.aspectj
(4)Library-Version: 1.6.1
(5)Library-Name: Aspect
(6)Import-Bundle:
com.springsource.org.aspectj.runtime;version="[1.6.1 ,1.6.1]",
com.springsource.org.aspectj.weaver;version="[1.6.1, 1.6.1]"
(7)Import-Library: org.aspectj;version="1.6.1"