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: Liferay 7.1 problem with bundle's versions on BOM
Hi All,
in my portlet I import
import com.liferay.portlet.display.template.exportimport.portlet.preferences.processor.PortletDisplayTemplateRegister;
when I build a jar it's MANIFEST.MF has Import-Package entry (i use dependency-managment plugin)
com.liferay.portlet.display.template.exportimport.portlet.preferences.processor;version= "[1.1,2)"
After deploy my portlet has Installed status with error:
Unresolved requirement: Import-Package: com.liferay.portlet.display.template.exportimport.portlet.preferences.processor; version="[1.1.0,2.0.0)"
There is only 1.0.0 version available on server
g! packages
com.liferay.portlet.display.template.exportimport.portlet.preferences.processor
osgi.wiring.package;
bundle-symbolic-name="com.liferay.portlet.display.template.api";
bundle-version:Version="1.0.3";
version:Version="1.0.0";
osgi.wiring.package="com.liferay.portlet.display.template.exportimport.portlet.preferences.processor";
uses:="com.liferay.exportimport.kernel.lar,javax.portlet"<com.liferay.portlet.display.template.api_1.0.3 [856]>
Analyzing my dipendencies I found 2 jars that export the same packages with different package version
com.liferay.portlet.display.template.api-1.0.3.jar with
Export-Package:
com.liferay.portlet.display.template;version="1.0.0";Export-Package:
com.liferay.portlet.display.template;version="1.0.0";
com.liferay.portlet.display.template-2.2.3.jar with Export-Package: com.liferay.portlet.display.template;version="1.1.0";
Bundle com.liferay.portlet.display.template-2.2.3.jar is not deployed on server and after deploy jar manually it state is Installed with
Unresolved requirement: Import-Package: com.liferay.portal.kernel.model; version="[1.0.0,2.0.0)"
which is range of versions for Liferay 7.0x and not for Liferay 7.1.x.
Since both jars com.liferay.portlet.display.template.api-1.0.3.jar and com.liferay.portlet.display.template-2.2.3.jar are on the bom of Liferay 7.1.0 it is possible to use them both simultaneosly, is it?
If i can't use com.liferay.portlet.display.template-2.2.3.jar why is it on bom?
Thanks in advance!
Aleksey Kashytsa:If i can't use com.liferay.portlet.display.template-2.2.3.jar why is it on bom?
I assume you are using the
com.liferay:com.liferay.ce.portal.bom:7.1.0 dependency?
Unfortunately, that BOM is invalid, and sadly, all of the existing
Liferay BOMs (there are several with different group names and
artifact names) are just proof of concepts, generated with different
Groovy scripts.
As far as usable BOMs go, Liferay IDE is waiting on
com.liferay.portal:release.portal.bom:7.1.0 to become
official so that the Managing
the Target Platform for Liferay Workspace article can be used;
right now, because the BOM is still in a proof of concept stage, the
article is treated as provisional. However, since it's a more recent
proof of concept and doesn't list any invalid module dependencies in
it, I would try it out since it's better than nothing.