【问题标题】:Service Builder not adding some dependencies?Service Builder 没有添加一些依赖项?
【发布时间】:2019-08-02 12:01:14
【问题描述】:

我正在关注tutorial 在我的项目中创建一个服务构建器。当我从 Gradle 执行“buildService”时,所有类都按应有的方式创建。我的问题是某些类的导入错误。

我设法解决了一些导入,但特别是一个我无法解决。有问题的导入是:

com.liferay.portal.aop.AopService;

它无法解析此导入。我的 build.gradle 有以下依赖:

dependencies {
    compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel"
    compileOnly group: "org.osgi", name: "org.osgi.annotation.versioning"
    compileOnly group: "org.osgi", name: "org.osgi.core"
    compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations"
    compileOnly group: "com.liferay", name: "com.liferay.petra.string"
    compileOnly group: "com.liferay", name: "com.liferay.petra.lang"
    compileOnly project(":modules:user-activities-service:user-activities-service-api")
}

我认为还需要一个依赖项才能找到此导入。但我在任何地方都找不到这是什么依赖。有没有人有同样的问题?我该如何解决这个问题?

【问题讨论】:

    标签: java gradle dependencies liferay-7


    【解决方案1】:

    我设法找到了我需要的依赖项:

    compileOnly group: "com.liferay", name: "com.liferay.portal.aop.api"
    

    【讨论】:

      猜你喜欢
      • 2012-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-12
      相关资源
      最近更新 更多