0

我是 liferay 7 的新手,在阅读它的教程时,当我在部署期间尝试使用服务构建器构建新服务时,我遇到了这个捆绑异常,

Unresolved requirement: Import-Package: com.liferay.portal.kernel.model; version="[1.0.0,1.1.0)"

在 gogo shell 中,我的服务显示为已安装,但是当我尝试启动它们时,它会抛出上述错误。

我试过用谷歌搜索它,但找不到它的解决方案。非常感谢任何帮助。谢谢

服务-api build.gradle

dependencies {
    compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
    compileOnly group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0"
    compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.0.0"
    compileOnly group: "org.osgi", name: "org.osgi.core", version: "6.0.0"
}

服务-服务 build.gradle

dependencies {
    compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
    compileOnly group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0"
    compileOnly group: "com.liferay", name: "com.liferay.portal.spring.extender", version: "2.0.0"
    compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.6.0"
    compileOnly project(":modules:SampleService:SampleService-api")
}

buildService {
    apiDir = "../SampleService-api/src/main/java"
}

组=“com.demo”

4

1 回答 1

0

很有可能这些教程是为早期版本的门户制作的。您的模块已安装,但由于缺少依赖项而无法转换为活动状态。您将需要检查您声明的依赖项并更新它们的版本号。

于 2019-01-14T15:57:36.957 回答