未解决的需求:导入包:com.liferay.util.dao.orm;版本=";[6.2.0,7.0.0)“;

未解决的需求:导入包:com.liferay.util.dao.orm;版本=";[6.2.0,7.0.0)“;,liferay,liferay-7,Liferay,Liferay 7,我创建了一个服务生成器,在*-服务中我需要com.liferay.util.dao.orm.CustomSQLUtil来执行自定义sql。我创建了*FinderImpl并创建了一个使用CustomSQLUtil的方法。我成功地构建并部署了*-api和*-service。但是,当我将*-api和*-service拖放到正在运行的服务器上时上面提到的错误就出来了。 我的bnd.bnd文件如下:- Bundle-SymbolicName: customuser-service Bundle-Versi

我创建了一个服务生成器,在*-服务中我需要com.liferay.util.dao.orm.CustomSQLUtil来执行自定义sql。我创建了*FinderImpl并创建了一个使用CustomSQLUtil的方法。我成功地构建并部署了*-api和*-service。但是,当我将*-api和*-service拖放到正在运行的服务器上时上面提到的错误就出来了。 我的bnd.bnd文件如下:-

Bundle-SymbolicName: customuser-service
Bundle-Version: 1.0.0
Liferay-Require-SchemaVersion: 1.0.0
Liferay-Service: true
Bundle-ClassPath:\
   .,\
   lib/util-java.jar,\
dependencies {
    compile group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
    compile group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0"
    compile group: "com.liferay", name: "com.liferay.portal.spring.extender", version: "2.0.0"
    compile group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.6.0"
    compile project(":modules:customuser:customuser-api")

    compile group: 'com.liferay.portal', name: 'portal-kernel', version: '5.2.3'

    compile group: 'com.liferay.portal', name: 'util-java', version: '6.2.4'

}

buildService {
    apiDir = "../customuser-api/src/main/java"
    osgiModule = true
    propsUtil = "com.example.service.util.PropsUtil"
}
和build.gradle如下所示:-

Bundle-SymbolicName: customuser-service
Bundle-Version: 1.0.0
Liferay-Require-SchemaVersion: 1.0.0
Liferay-Service: true
Bundle-ClassPath:\
   .,\
   lib/util-java.jar,\
dependencies {
    compile group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
    compile group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0"
    compile group: "com.liferay", name: "com.liferay.portal.spring.extender", version: "2.0.0"
    compile group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.6.0"
    compile project(":modules:customuser:customuser-api")

    compile group: 'com.liferay.portal', name: 'portal-kernel', version: '5.2.3'

    compile group: 'com.liferay.portal', name: 'util-java', version: '6.2.4'

}

buildService {
    apiDir = "../customuser-api/src/main/java"
    osgiModule = true
    propsUtil = "com.example.service.util.PropsUtil"
}
请提前帮助…thanx..

尝试添加此行

provided group: "com.liferay", name: "com.liferay.portal.dao.orm.custom.sql", version: "1.0.0"
您的build.gradle依赖项。例如:

dependencies {
    compile group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
    compile group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0"
    compile group: "com.liferay", name: "com.liferay.portal.spring.extender", version: "2.0.0"
    compile group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.6.0"
    compile project(":modules:customuser:customuser-api")
    compile group: 'com.liferay.portal', name: 'portal-kernel', version: '5.2.3'
    compile group: 'com.liferay.portal', name: 'util-java', version: '6.2.4'

    provided group: "com.liferay", name: "com.liferay.portal.dao.orm.custom.sql", version: "1.0.0"

}

你不需要那个导入,它永远也解决不了


使用gradle dep中的“com.liferay.portal.dao.orm.custom.sql.CustomSQLUtil”替换“com.liferay:com.liferay.portal.dao.orm.custom.sql:1.0.0”。

您能用bnd文件的完整内容和生成的MANIFEST.MF文件的内容更新您的问题吗?