Liferay 7,mvc portlet的osgi模块没有找到依赖项

时间:2016-04-26 07:38:50

标签: liferay liferay-7

我使用

启动了Liferay 7 GA1的新模块
blade create -t portlet -p com.liferay.docs.portlet -c MyPortlet my-portlet-project

这是我的gradle.build

dependencies {
    compile group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.0.0"
    compile group: "javax.portlet", name: "portlet-api", version: "2.0"
    compile group: "javax.servlet", name: "servlet-api", version: "2.5"
    compile group: "org.osgi", name: "org.osgi.compendium", version: "5.0.0"

    compile group: "com.liferay", name: "com.liferay.my.account.web", version: "1.0.2"
    compile group: "com.liferay", name: "com.liferay.users.admin.web", version: "1.0.4"
}

在门户网站中,模块com.liferay.my.account.web的版本为1.0.2,但在存储库https://repository.liferay.com/nexus/content/repositories/liferay-ce/com/liferay/com.liferay.my.account.web/中版本仍为1.0.1

构建模块我有这个错误:

λ gradle build
:modules:my-mvc-portlet-project:compileJava

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':modules:my-mvc-portlet-project:compile'.
> Could not find com.liferay:com.liferay.my.account.web:1.0.2.
  Searched in the following locations:
      http://cdn.repository.liferay.com/nexus/content/groups/public/com/liferay/com.liferay.my.account.web/1.0.2/com.liferay.my.account.web-1.0.2.pom
      http://cdn.repository.liferay.com/nexus/content/groups/public/com/liferay/com.liferay.my.account.web/1.0.2/com.liferay.my.account.web-1.0.2.jar
  Required by:
  plugins-sdk-7.0.modules:my-mvc-portlet-project:1.0.0

为com.liferay.my.account.web设置版本1.0.1 gradle构建是可以的,但部署过程失败,但是:

λ blade deploy
stop 503
update 503 file:/C:/java/projects/LF7x/workspace/plugins-sdk-7.0/modules/my-mvc-portlet-project/build/libs/my.mvc.portlet.project-1.0.0.jar
Updated bundle 503
start 503
org.osgi.framework.BundleException: Could not resolve module: my.mvc.portlet.project [503]
  Unresolved requirement: Import-Package: com.liferay.my.account.web.portlet.action

这里的完整源代码: https://github.com/baxtheman/liferay7GA1-sandbox/tree/master/modules

Liferay论坛问题: https://web.liferay.com/it/community/forums/-/message_boards/message/73513613

怎么了?

1 个答案:

答案 0 :(得分:0)

问题由我自己解决,请看liferay论坛:

https://web.liferay.com/it/community/forums/-/message_boards/message/73382191