我有一个依赖于捆绑包 B 的捆绑包 A。当捆绑包 A 中的代码运行并从捆绑包 B 访问一个类时,捆绑包 B 的状态被解析(4)而不是活动(32)并且捆绑包 B 的激活器没有也跑。我认为捆绑 B 的清单有问题,但我不能完全发现它。
这是捆绑 B 的清单,由 bnd 生成。
Manifest-Version: 1.0
Export-Package: org.jboss.logging;uses:="org.osgi.framework,org.eclips
e.equinox.log,org.jboss.logmanager,org.apache.log4j,org.slf4j.spi,org
.slf4j";version="3.2.0.Beta1-SNAPSHOT"
Build-Timestamp: Sun, 17 Mar 2013 15:07:31 +0100
Tool: Bnd-0.0.357
Bundle-Name: JBoss Logging 3
Created-By: 1.7.0_10 (Oracle Corporation)
Bundle-Vendor: JBoss by Red Hat
Scm-Revision: 9e799bac390dbbf9c7cd55afe93dff9265fbed05
Bundle-Version: 3.2.0.Beta1-SNAPSHOT
Bnd-LastModified: 1363529254048
Bundle-ManifestVersion: 2
Bundle-Activator: org.jboss.logging.Activator
Bundle-Description: The JBoss Logging Framework
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-SymbolicName: org.jboss.logging.jboss-logging
Import-Package: org.apache.log4j;resolution:=optional,org.eclipse.equi
nox.log;resolution:=optional;version="1.0",org.jboss.logging;version=
"3.2",org.jboss.logmanager;resolution:=optional,org.osgi.framework;ve
rsion="1.7",org.slf4j;resolution:=optional;version="1.6",org.slf4j.sp
i;resolution:=optional;version="1.6"
Bundle-DocURL: http://www.jboss.org
这是使用 PDE 生成的 bundle A 的清单。
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Sample-view
Bundle-SymbolicName: sample-view; singleton:=true
Bundle-Version: 1.0.0.qualifier
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui,
org.jboss.logging.jboss-logging
Bundle-RequiredExecutionEnvironment: JavaSE-1.7