1

I have come across this answer How to integrate Liferay DXP with Apache POI? regarding my question but i have a couple more unanswered questions :

How did you manage to find all the required packages to exclude from importing in bnd.bnd file ?

I tried the same thing in ECLIPSE IDE with Liferay 7.0 Workspace only with 'poi','poi-ooxml' and 'poi-ooxml-schemas', version: '3.17' and all dependencies of these 3 jars and got me nowhere.

I had to do a lot of compile, deploy, go to gogo shell and try to start the bundle and get a new missing import package and add it to exclusion list, and by doing this i wasted 8-9 hours and got a huge list of excluded packages but the bundle still not working.

I want to know what did you use (IDE or other programs) and how did you find the unnecessary dependencies and removed them?

This would be very helpful for future cases like this one with POI.

Thank you,

1 Answers1

0

The way I usually find them is to build a bundle, deploy it, log into gogo and try to start it, then deal with what it reports.

That will point to a dependency, either direct or transitive, that you either need to include or exclude (using the !package syntax).

Wash, rinse, repeat until your bundle starts.

dnebing
  • 335
  • 2
  • 6
  • So you basically say you did the exact same thing as me, but you got it faster to work :D ? I thought there is a tool, or mode to test a bundle to see all the required dependencies at once, not one after another as you resolve them. Also how do you know when to exclude and when to add a required dependency ? – Bilcan Costinel-Bogdan Sep 07 '18 at 17:47
  • https://community.liferay.com/blogs/-/blogs/finding-bundle-dependencies – dnebing Sep 08 '18 at 20:09