Hi for adding the third party libraries, I followed the article https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/adding-third-party-libraries-to-a-module#embedding-libraries-in-a-module. Now the generated bundle has a lib directory with all the dependencies which are configured in the build.gradle. When I deploy the bundle the status of the bundle is installed. When I try to start the bundle I am getting the below error
org.osgi.framework.BundleException: Could not resolve module: com.test..api [564]
Unresolved requirement: Import-Package: com.ibm.wsdl.extensions.soap
This is not even a transitive dependency for any of my dependency jars that I configured in the build.gradle Can you please help me to resolve this.
Now I am able to start my bundle.
When we configure the dependencies in the build.gradle file and do a gradle refresh, gradle downloads all the dependencies ( including transitive dependencies ). The problem is with these transitive dependencies. Gradle is not downloading all transitive dependencies. It is missing few jars, We have to configure missing jars again in build.gradle and do a gradle refresh.
Work around to find the missing jars :
Configure the dependencies in build.gradle, do a gradle refresh and the deploy. Go to the gogo shell and check for the bundle. Now the bundle will get deployed and will be in installed state. try to start the bundle from gogo shell. Now you will get error similar to
Unresolved requirement:Import-Package: com.poi.extractor
google the package and try to find out the respective jar in maven repository. Configure the new jar in build.gradle. Continue the same process till the bundle gets activated.