Liferay 7 Build Service缺失包com.liferay.util.dao.orm

时间:2017-02-22 01:09:40

标签: java liferay-7

我使用liferay 7来开发我的项目。当我构建服务时,我得到了一个例外:

    15:19:12,672 WARN  [fileinstall-/home/barrow/Tools/liferay-ce-portal-7.0-ga3/osgi/modules][org_apache_felix_fileinstall:103] Error while starting bundle: file:/home/barrow/Tools/liferay-ce-portal-7.0-ga3/osgi/modules/priv.barrow.service.jar 
org.osgi.framework.BundleException: Could not resolve module: priv.barrow.service [488]_  Unresolved requirement: Import-Package: com.liferay.util.dao.orm; version="[7.0.0,8.0.0)"_ [Sanitized]
    at org.eclipse.osgi.container.Module.start(Module.java:429)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402)
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1252)
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1224)
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512)
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:313)

我猜我的服务的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 group: "com.liferay.portal", name: "com.liferay.util.java", version: "2.0.0"
    compile group: 'com.liferay.portal', name: 'util-java', version: '6.2.4'

    compileOnly project(":modules:oes-service:oes-service-api")

}

buildService {
    apiDir = "../oes-service-api/src/main/java"
    osgiModule = false
}

group = "priv.barrow"

如果有人可以帮助我,我将非常感激。

0 个答案:

没有答案