Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Correct usage of com.liferay.shared.dependencies.*
Hello
we want to add Excel support to a bundle with POI. I have found a shared library com.liferay.shared.dependencies.poi
I added this to build.grade
compileOnly group: 'com.liferay', name: ' com.liferay.shared.dependencies .poi'
but the packages provided in the library can't be found neither in eclipse nor in the gradle build
C:\projects\liferay\develop\..... error: package org.apache.poi.ss.usermodel does not exist
import org.apache.poi.ss.usermodel.Workbook;
^
C:\projects\liferay\develop\...... error: cannot find symbol
Workbook wb = null;
^
symbol: class Workbook
location: class RestCommerceService
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
What ist the correct way to use this library
br
Chris
It's less "how to use it" than "what's actually included":
If you look at your license/versions.html file, you'll see that this file includes (file/version)
- com.liferay.shared.dependencies.poi.jar!commons-collections4.jar 4.4
- com.liferay.shared.dependencies.poi.jar!poi-ooxml-lite.jar 5.2.2
- com.liferay.shared.dependencies.poi.jar!poi-ooxml.jar 5.2.2
- com.liferay.shared.dependencies.poi.jar!poi.jar 5.2.2
- com.liferay.shared.dependencies.poi.jar!xmlbeans.jar 5.0.3
So, just because it has "poi" in its name, it by far does not include all the libraries that poi offers, and not all of their transitive dependencies. You'll need to bring them in yourself.
Powered by Liferay™