0

我创建了一个服务构建器并将其添加到我的 springmvc-portlet 中。部署后,我的服务构建器无法正确启动。

日志:

18:26:10,309 WARN  [fileinstall-C:/Users/administrator/Projects/Portal/liferay-ce-portal-7.0-ga4/osgi/modules][org_apache_felix_fileinstall:103] Error while starting bundle: file:/C:/Users/administrator/Projects/Portal/liferay-ce-portal-7.0-ga4/osgi/modules/vp.data.access.service.jar 
org.osgi.framework.BundleException: Could not resolve module: vp.data.access.service [563]_  Unresolved requirement: Import-Package: com.vt.data.access.exception_ [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:1253)
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225)
    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:312)

springmvc-portlet build.gradle

buildscript {
    repositories {
        maven {
            url "https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public"
        }
    }

    dependencies {
        classpath group: "com.liferay", name: "com.liferay.gradle.plugins.css.builder", version: "2.0.0"
    }
}

apply plugin: "com.liferay.css.builder"

dependencies {
    compile group: "org.springframework", name: "spring-webmvc-portlet", version: "4.1.9.RELEASE"

    compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.6.0"
    compileOnly group: "javax.portlet", name: "portlet-api", version: "2.0"
    compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"
    compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.3.0"
    compile project(":modules:vp-data-access:vp-data-access-api")
}

服务构建.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"
    compile project(":modules:vp-data-access:vp-data-access-api")
}

buildService {
    apiDir = "../vp-data-access-api/src/main/java"  
}

group = "vp.data.access"

有人可以帮我解决我的问题吗?

4

0 回答 0