在OSGI容器中访问tomcat lib / ext jar

时间:2019-06-19 08:45:30

标签: osgi classpath osgi-bundle bootclasspath embedded-osgi

我已将清单和清单文件放在jar的tomcat lib目录中

Manifest-Version: 1.0
Bnd-LastModified: 1560877899372
Bundle-ManifestVersion: 2
Bundle-Name: MyProject
Bundle-SymbolicName: MyProject
Bundle-Version: 1.0.0
Created-By: 1.8.0_191 (Oracle Corporation)
Export-Package: MyProject.api.scrap;version="1.0.0"
Javac-Debug: on
Javac-Deprecation: off
Javac-Encoding: Cp1252
Private-Package: MyProject,MyProject.api;version="1.0.0"
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
Tool: Bnd-3.5.0.201709291849

我想使用清单文件访问嵌入于osgi容器中的这个罐子

Manifest-Version: 1.0
Bnd-LastModified: 1560927114666
Bundle-ManifestVersion: 2
Bundle-Name: gty
Bundle-SymbolicName: gty
Bundle-Version: 1.0.0
Created-By: 1.8.0_191 (Oracle Corporation)
DynamicImport-Package: *
Export-Package: gty.constants;version="1.0.0"
Import-Package: MyProject.api.scrap;version="[1.0,2)",com.liferay.port
 al.kernel.portlet.bridges.mvc;version="[2.0,3)",javax.portlet;version
 ="[2.0,3)",javax.servlet;version="[3.0,4)",javax.servlet.http;version
 ="[3.0,4)"
Javac-Debug: on
Javac-Deprecation: off
Javac-Encoding: Cp1252
Private-Package: content,gty.portlet
Provide-Capability: osgi.service;objectClass:List<String>="javax.portl
 et.Portlet",liferay.resource.bundle;bundle.symbolic.name=gty;resource
 .bundle.base.name="content.Language"

我尝试了不同版本的import-package,dynamicimport-package,但是无法获得预期的效果

非常感谢

0 个答案:

没有答案