Osgi 未解决的需求:导入包:com.fasterxml.jackson.annotation;版本=";[2.8.0,3.0.0)”;

Osgi 未解决的需求:导入包:com.fasterxml.jackson.annotation;版本=";[2.8.0,3.0.0)”;,osgi,build.gradle,liferay-7,Osgi,Build.gradle,Liferay 7,在我的Liferay 7项目中,当我试图在build.gradle中添加以下依赖项时出现错误 编译组:“com.fasterxml.jackson.core”,名称:“jackson annotations”,版本:“2.8.8” 错误: org.osgi.framework.BundleException:无法解析模块: 未解决的需求:导入包:com.fasterxml.jackson.annotation;version=“[2.8.0,3.0.0)”从下载jackson-annotatio

在我的Liferay 7项目中,当我试图在build.gradle中添加以下依赖项时出现错误

编译组:“com.fasterxml.jackson.core”,名称:“jackson annotations”,版本:“2.8.8”

错误:

org.osgi.framework.BundleException:无法解析模块:
未解决的需求:导入包:com.fasterxml.jackson.annotation;version=“[2.8.0,3.0.0)”

从下载jackson-annotations-2.8.8.jar、jackson-core-2.8.8.jar和jackson-databind-2.8.8.jar捆绑包,并将其放入liferay home\deploy文件夹。检查它们是否正确安装在GoGo shell中。

从下载jackson-annotations-2.8.8.jar、jackson-core-2.8.8.jar和jackson-databind-2.8.8.jar捆绑包,并将其放入liferay home\部署文件夹。检查它们是否正确安装在GoGo shell中。

听起来您需要在运行时使用fasterxml。请详细说明一下@Christianschneiders通过在bnd.bnd Bundle类路径中添加以下代码行解决了此问题:\,\lib/jackson annotations.jar、\lib/jackson databind.jar、\lib/jackson core.jar-includeresource:\lib/jackson annotations.jar=jackson-annotations-2.8.8.jar\lib/jackson-databind.jar=jackson-databind-2.8.8.jar\lib/jackson-core.jar=jackson-core-2.8.8.jar在添加代码行之前,下载jars会将jackson依赖项嵌入到您的包中。或者您可以尝试将它们作为包安装。Em如果这是唯一一个使用它们的捆绑包,那么bedding就很好。如果您计划有许多这样的捆绑包,单独安装会更好。听起来您需要在运行时使用fasterxml。您能详细说明一下吗@Christianschneiders通过在bnd.bnd捆绑包类路径中添加以下代码行解决了这个问题:\,\lib/jackson-annotations.jar,\lib/jackson-databind.jar\lib/jackson-core.jar-includeresource:\lib/jackson annotations.jar=jackson-annotations-2.8.8.jar\lib/jackson-databind.jar=jackson-core-2.8.8.jar在添加代码行之前,下载jars会将jackson依赖项嵌入到包中。Al或者,您可以尝试将它们作为捆绑包安装。如果这是唯一使用它们的捆绑包,则嵌入是好的。如果您计划有许多这样的捆绑包,则单独安装更好。