我是OSGI的新手。我正在尝试将一个新的库FreeMarker添加到一个使用Spring3的现有应用程序中。下面是我所做的更改,
在pom.xml中添加了Freemarker依赖项。
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>com.springsource.freemarker</artifactId>
<version>2.3.18</version>
</dependency>我希望这个jar是OSGI抱怨的。
在Import-Package部分,我添加了com.springsource.freemarker;version="2.3.18"
在Bundle-ClassPath中,我添加了lib/com.springsource.freemarker-2.3.18.jar
当我部署应用程序时,我得到下面的错误,
org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: com.springsource.freemarker; version="2.3.18"请让我知道缺少的配置。
提前感谢,SD
发布于 2013-05-07 06:50:37
捆绑包com.springsource.freemarker不会导出同名的包。您正在将Bundle-SymbolicName与要导入的包名混合在一起。
请参阅http://ebr.springsource.com/repository/app/bundle/version/detail?name=com.springsource.freemarker&version=2.3.18上的导出包部分,了解您可以在另一个包中导入哪些内容。
https://stackoverflow.com/questions/16406189
复制相似问题