Liferay Uber模块:包不存在
我编写了一个Liferay 7模块,它使用 所需的OSGi组件: 优步模块 现在,我正在尝试构建一个包含这些JAR和我的代码的Uber模块 因此,我手动将这两个JAR下载到我的项目中,然后将其添加到我的Liferay Uber模块:包不存在,liferay,osgi,build.gradle,liferay-7,bnd,Liferay,Osgi,Build.gradle,Liferay 7,Bnd,我编写了一个Liferay 7模块,它使用 所需的OSGi组件: 优步模块 现在,我正在尝试构建一个包含这些JAR和我的代码的Uber模块 因此,我手动将这两个JAR下载到我的项目中,然后将其添加到我的build.gradle: runtime group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3' runtime group: 'org.apache.httpcomponents', name: 'htt
build.gradle
:
runtime group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3'
runtime group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.6'
。。。这是我的bnd.bnd
:
Include-Resource: @httpclient-osgi-4.5.3.jar
Include-Resource: @httpcore-osgi-4.4.6.jar
问题
当我尝试编译时,在compileJava
步骤中,我立即得到:
error: package org.apache.http does not exist
在build.gradle
中除了runtime
组之外,添加compileOnly
组似乎可以解决问题,但这是正确的做法吗?您可能想阅读以下内容:
tim在这里提到,您还需要将嵌入式jar添加到bundle类路径中
error: package org.apache.http does not exist