我是liferay 7的新手,在阅读其教程时,当我尝试在部署期间使用服务生成器构建新服务时,我遇到了此捆绑包异常,
Unresolved requirement: Import-Package: com.liferay.portal.kernel.model; version="[1.0.0,1.1.0)"
在gogo shell中,我的服务显示为已安装,但是当我尝试启动它们时,它将抛出以上错误。
我尝试使用Google搜索,但找不到解决方案。非常感谢您的帮助。谢谢
Service-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"
}
group =“ com.demo”
答案 0 :(得分:0)
这些教程是为门户的早期版本制作的。您的模块已安装,但由于缺少依赖性而无法转换为活动模块。 您将需要遍历声明的依赖项并更新其版本号。