Pax-import-bundle 和 Spring DM 包
我正在遵循 Modular Java 中的示例,但我遇到了问题第 6 章并将 Spring DM 模块添加到我的项目中。
我跑:
pax-import-bundle -g org.springframework.osgi -a spring-osgi-extender -v 1.2 -- -DwidenScope -DimportTransitive
运行 pax-provision 时,Spring DM 捆绑包未解析。我收到关于缺少 spring.osgi.extender 和其他两个未解析包的导入包的投诉。我的预配置包列表如下所示:
0 ACTIVE org.eclipse.osgi_3.5.0.v20090520 1 ACTIVE org.eclipse.osgi.util_3.2.0.v20090520-1800 2 ACTIVE org.eclipse.osgi.services_3.2.0.v20090520-1800 3 ACTIVE org.ops4j.pax.logging.pax-logging-api_1.3.0 4 ACTIVE org.ops4j.pax.logging.pax-logging-service_1.3.0 5 INSTALLED org.springframework.osgi.extender_1.2.0 6 INSTALLED org.springframework.osgi.core_1.2.0 7 INSTALLED org.springframework.osgi.io_1.2.0 8 ACTIVE com.springsource.slf4j.org.apache.commons.logging_1.5.0 9 ACTIVE com.springsource.slf4j.api_1.5.0 Fragments=10 10 RESOLVED com.springsource.slf4j.log4j_1.5.0 Master=9 11 ACTIVE com.springsource.org.aopalliance_1.0.0 12 ACTIVE com.springsource.edu.emory.mathcs.backport_3.1.0 13 ACTIVE com.springsource.org.apache.log4j_1.2.15 14 ACTIVE com.springsource.javax.jms_1.1.0 15 ACTIVE com.springsource.javax.mail_1.4.0 16 ACTIVE com.springsource.javax.transaction_1.1.0 17 ACTIVE com.springsource.javax.activation_1.1.0
diag 5
给出以下输出:
initial@reference:file:../bundles/org.springframework.osgi.extender_1.2.0.jar/ [5] Direct constraints which are unresolved: Missing imported package org.springframework.beans_[2.5.6,4.0.0). Missing imported package org.springframework.beans.factory_[2.5.6,4.0.0). Missing imported package org.springframework.beans.factory.config_[2.5.6,4.0.0). Missing imported package org.springframework.beans.factory.xml_[2.5.6,4.0.0). Missing imported package org.springframework.context_[2.5.6,4.0.0). Missing imported package org.springframework.context.event_[2.5.6,4.0.0). Missing imported package org.springframework.core_[2.5.6,4.0.0). Missing imported package org.springframework.core.enums_[2.5.6,4.0.0). Missing imported package org.springframework.core.io_[2.5.6,4.0.0). Missing imported package org.springframework.core.task_[2.5.6,4.0.0). Missing imported package org.springframework.osgi_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.context_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.context.event_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.context.support_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.extensions.annotation_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.service.importer_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.service.importer.event_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.service.importer.support_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.util_[1.2.0,1.2.0]. Missing imported package org.springframework.scheduling.timer_[2.5.6,4.0.0). Missing imported package org.springframework.util_[2.5.6,4.0.0). ...
I'm following the examples from Modular Java but I'm having trouble with chapter 6 and adding the Spring DM modules to my project.
I run:
pax-import-bundle -g org.springframework.osgi -a spring-osgi-extender -v 1.2 -- -DwidenScope -DimportTransitive
When running pax-provision the Spring DM bundles are not resolved. I get complaints about missing imported packages from the spring.osgi.extender and the other two unresolved bundles. My list of provisioned bundles look like this:
0 ACTIVE org.eclipse.osgi_3.5.0.v20090520 1 ACTIVE org.eclipse.osgi.util_3.2.0.v20090520-1800 2 ACTIVE org.eclipse.osgi.services_3.2.0.v20090520-1800 3 ACTIVE org.ops4j.pax.logging.pax-logging-api_1.3.0 4 ACTIVE org.ops4j.pax.logging.pax-logging-service_1.3.0 5 INSTALLED org.springframework.osgi.extender_1.2.0 6 INSTALLED org.springframework.osgi.core_1.2.0 7 INSTALLED org.springframework.osgi.io_1.2.0 8 ACTIVE com.springsource.slf4j.org.apache.commons.logging_1.5.0 9 ACTIVE com.springsource.slf4j.api_1.5.0 Fragments=10 10 RESOLVED com.springsource.slf4j.log4j_1.5.0 Master=9 11 ACTIVE com.springsource.org.aopalliance_1.0.0 12 ACTIVE com.springsource.edu.emory.mathcs.backport_3.1.0 13 ACTIVE com.springsource.org.apache.log4j_1.2.15 14 ACTIVE com.springsource.javax.jms_1.1.0 15 ACTIVE com.springsource.javax.mail_1.4.0 16 ACTIVE com.springsource.javax.transaction_1.1.0 17 ACTIVE com.springsource.javax.activation_1.1.0
diag 5
gives the following output:
initial@reference:file:../bundles/org.springframework.osgi.extender_1.2.0.jar/ [5] Direct constraints which are unresolved: Missing imported package org.springframework.beans_[2.5.6,4.0.0). Missing imported package org.springframework.beans.factory_[2.5.6,4.0.0). Missing imported package org.springframework.beans.factory.config_[2.5.6,4.0.0). Missing imported package org.springframework.beans.factory.xml_[2.5.6,4.0.0). Missing imported package org.springframework.context_[2.5.6,4.0.0). Missing imported package org.springframework.context.event_[2.5.6,4.0.0). Missing imported package org.springframework.core_[2.5.6,4.0.0). Missing imported package org.springframework.core.enums_[2.5.6,4.0.0). Missing imported package org.springframework.core.io_[2.5.6,4.0.0). Missing imported package org.springframework.core.task_[2.5.6,4.0.0). Missing imported package org.springframework.osgi_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.context_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.context.event_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.context.support_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.extensions.annotation_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.service.importer_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.service.importer.event_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.service.importer.support_[1.2.0,1.2.0]. Missing imported package org.springframework.osgi.util_[1.2.0,1.2.0]. Missing imported package org.springframework.scheduling.timer_[2.5.6,4.0.0). Missing imported package org.springframework.util_[2.5.6,4.0.0). ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是缺少存储库和工件版本错误(1.2.0 而不是 1.2)的组合。
解决了这个问题。
The problem was a combination of missing repositories and wrong version of the artifact (1.2.0 instead of 1.2).
Fixed the problem.