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
Package range version definition
Hi all. I opened MANIFEST.MF file inside the portal-kernel.jar. I found this declaration:
[...] Import-Package: com.liferay.announcements.kernel.exception;version="[1.0,2)",com.liferay.announcements.kernel.model; version="[1.0,1.1)",com.liferay.asset.kernel;version="[1.1,2)"[...]
How is the range version created? Why is defined the range version for the package "com.liferay.announcements.kernel.model"? Why the upper limit is 1.1 and not 2?
Thanks in advance.
Enrico
Typically the range is created by Bnd. It inspects the code and figures out what packages give package uses. Then it finds the packages on the classpath and tries to determine what is the version in use. If the package is versioned the range is generated. Depending on whether the package contains only consumer types (default) or also provider types it will either create the upper limit to be next major or next minor version. The idea here is that providers may brake on minor changes while consumers should never do so.
Thanks Milen, if I implement a module for 7.0.5-GA6 platform I hope that the same module will work on 7.0.6-GA7? or the minor version
of the provider type package could be change?
That is a good question. In theory it should not change between GA releases. But as those versions (7.0, 7.1, ...) are more of marketing versions than semantically versioned product releases, the reality is sometime bundles get updated in between GA releases. So I'd say you should treat next GA release more or less as next minor version update which means assume bundles and packages will be updated.
Powered by Liferay™