vaadin / framework

Vaadin 6, 7, 8 is a Java framework for modern Java web applications.
http://vaadin.com/
Other
1.78k stars 730 forks source link

Vaadin framework 8.18.0 has dependency to old Liferay version #12569

Closed mikke-alekstra closed 1 year ago

mikke-alekstra commented 1 year ago

The vaadin-server-8.18.0 has a dependency: com.liferay.portal.kernel.util;resolution:=optional;version="[7.0.0,49.0.0)"

The new vaadin-portlet-8.18.0 has a dependency: com.liferay.portal.kernel.util;version="[7.0,8)"

Deploying vaadin-portlet to Liferay causes an exception

2023-01-04 11:57:46.307 ERROR [fileinstall-directory-watcher][DirectoryWatcher:1173] Unable to start bundle: file:/opt/liferay/osgi/modules/vaadin-portlet-8.18.0.jar
liferay-dev_1  | com.liferay.portal.kernel.log.LogSanitizerException: org.osgi.framework.BundleException: Could not resolve module: vaadin-portlet [1504]_  Unresolved requirement: Import-Package: com.liferay.portal.kernel.util; version="[7.0.0,8.0.0)"_ [Sanitized]

I'm using Liferay CE 7.4.3.22 that was released last April. Liferay 7.4.3.22 contains the following versions: com.liferay.portal.kernel bundle version 47.0.1 com.liferay.portal.kernel.util version 35.0.0

I edited MANIFEST.MF in vaadin-portlet by setting dependency com.liferay.portal.kernel.util;version="[7.0,36)" and vaadin-portlet seemed to start properly in my test bench.

Latest Liferay version is 7.4.3.57 and it contains versions: com.liferay.portal.kernel bundle version 92.1.1 com.liferay.portal.kernel.util version 51.0.0

At least vaadin-portlet Liferay dependency should be updated to a more recent version. Preferrarly update all Vaadin framework's Liferay dependencies close to the latest version of Liferay.

Cheers!

TatuLund commented 1 year ago

Hi, have you checked our release notes

Separated portlet support code out of vaadin-server into its own package, vaadin-portlet. This will break your build if your application makes use of Portlet classes and you do not import the vaadin-portlet dependency.

So you need to add dependency to vaadin-portlet in pom.xml.

But, if it is not about that, maybe something has went wrong when we did this.

mikke-alekstra commented 1 year ago

Hi, yes I have, thanks.

I got the error just by deploying Vaadin 8.18.0 to an empty Liferay 7.4.3.22 Docker environment. There seems to be a dependency to an old Liferay version in vaadin-portlet package.

If you update vaadin-portlet's old dependency I might be worth in updating all Liferay dependencies in Vaadin 8 framework as Liferay throws out a new release every week and 7.4.3.22 is ~30 releases old.

TatuLund commented 1 year ago

I think this issue is happening because there is no bnd.bnd in vaadin-portlet and one in the vaadin-server does reflect current architecture correctly. I think liferay kernel etc. versions should be defined in bnd.bnd of vaadin-portlet instead of vaadin-servlet etc.