我创建了一个服务构建器,在* -service中我需要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,\
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'
}
buildService {
apiDir = "../customuser-api/src/main/java"
osgiModule = true
propsUtil = "com.example.service.util.PropsUtil"
}
请提前帮助... thanx ..
答案 0 :(得分:0)
尝试添加此行
provided group: "com.liferay", name: "com.liferay.portal.dao.orm.custom.sql", version: "1.0.0"
到你的build.gradle依赖项。 E.g:
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"
}
答案 1 :(得分:0)
您不需要导入,它将永远不会解析。
从gradle dep中使用“ com.liferay.portal.dao.orm.custom.sql.CustomSQLUtil”代替:“ com.liferay:com.liferay.portal.dao.orm.custom.sql:1.0.0”。