掲示板

Unable to retrieve transitive dependencies in liferay 7+ gradle

thumbnail
6年前 に nitish tyagi によって更新されました。

Unable to retrieve transitive dependencies in liferay 7+ gradle

New Member 投稿: 9 参加年月日: 12/10/23 最新の投稿
build.gradle

dependencies {
compileOnly group: 'com.liferay.portal', name: 'com.liferay.portal.kernel', version: '2.0.0', transitive: true
compileOnly group: 'com.liferay.portal', name: 'com.liferay.util.taglib', version: '2.0.0', transitive: true
compileOnly group: 'javax.portlet', name: 'portlet-api', version: '2.0', transitive: true
compileOnly group: 'javax.servlet', name: 'servlet-api', version: '2.5', transitive: true
compileOnly group: 'jstl', name: 'jstl', version: '1.2', transitive: true
compileOnly group: 'org.osgi', name: 'org.osgi.compendium', version: '5.0.0', transitive: true

runtime group: 'com.microsoft.ews-java-api', name: 'ews-java-api', version: '2.0', transitive: true
runtime group: 'org.apache.commons', name: 'commons-lang3', version: '3.4', transitive: true
runtime group: 'commons-codec', name: 'commons-codec', version: '1.9', transitive: true
runtime group: 'commons-logging', name: 'commons-logging', version: '1.2', transitive: true
runtime group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.4.1', transitive: true
runtime group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.1', transitive: true
runtime group: 'joda-time', name: 'joda-time', version: '2.8', transitive: true
runtime group: 'org.apache.avalon.framework', name: 'avalon-framework-api', version: '4.3.1', transitive: true

}

bnd.bnd

Bundle-SymbolicName: sample.servicepoc
Bundle-Version: 1.0.0
Include-Resource:\
@commons-codec-1.9.jar,\
@httpclient-4.4.1.jar,\
@httpcore-4.4.1.jar,\
@ews-java-api-2.0.jar,\
@commons-lang3-3.4.jar,\
@commons-logging-1.2.jar,\
@joda-time-2.8.jar,\
@avalon-framework-api-4.3.1.jar


ERROR:-

org.osgi.framework.BundleException: Could not resolve module: sample.servicepoc [530]
Unresolved requirement: Import-Package: org.apache.log
thumbnail
6年前 に Andy Wu によって更新されました。

RE: Unable to retrieve transitive dependencies in liferay 7+ gradle

Regular Member 投稿: 195 参加年月日: 15/05/05 最新の投稿
hey Nitish , I think you should include org.apache.log related jar manually , cause gradle and bnd.bnd will not include transitive dependencies for you.
5年前 に Anonymous Anonymous によって更新されました。

RE: Unable to retrieve transitive dependencies in liferay 7+ gradle

Regular Member 投稿: 127 参加年月日: 19/09/16 最新の投稿

Hi All ,

 

Facing similar issue with Liferay DXP Tomcat.

Error: 

org.osgi.framework.BundleException: Could not resolve module: xxxx.portlet [1097]
  Unresolved requirement: Import-Package: org.apache.avalon.framework.logger

I am using the dependency :

    compile group: 'commons-logging', name: 'commons-logging', version: '1.0.4' and added to bnd.bnd file as well

 

 

 

 

thumbnail
5年前 に James Hinkey によって更新されました。

RE: Unable to retrieve transitive dependencies in liferay 7+ gradle

Junior Member 投稿: 62 参加年月日: 11/02/15 最新の投稿

Hi Enayath,

Transitive dependencies can be tedious to address. This article explains a process for resolving them: https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-1/adding-third-party-libraries-to-a-module

thumbnail
5年前 に Gregory Amerson によって更新されました。

RE: Unable to retrieve transitive dependencies in liferay 7+ gradle

Liferay Legend 投稿: 1123 参加年月日: 10/02/16 最新の投稿

Thanks Jim for your response, that is exactly correct, likely `compileInclude` instruction would work here.