Open shakanen opened 10 months ago
OSGi add-on is a commercial feature in Vaadin. License checking happens in dev mode at runtime. I'm not surely at the moment that we can safely make the license-checker optional, because of the above reasons. But I'd like to keep this issue opened for further analysis.
This request is not related to osgi-addon. If that addon requires the license-checker classes in runtime then it should have a dependency to them. Unless the flow-server itself requires the license-checker classes at runtime, it should not have dependency to them.
I looked at the headers of vaadin-osgi-integration 8.16.1 and it's not a fragment-bundle of flow-server and neither does it import the package com.vaadin.flow.server.frontend
that has the class that uses LicenseChecker. Based on this it seems that the package-dependency is not needed at runtime and could be optional.
If not, maybe the documentation should note that the bundle for license-checker is needed or the flow-feature could install it.
Ah, I see your point, so you're talking about flow-server
being deployed into OSGi container apart from/without Vaadin OSGi add-on. Then I think the license checker indeed should be optional. (except maybe for Vaadin 22.1, as it has requires Vaadin license, even for Flow).
Description of the bug
When deploying flow-feature and specifically flow-server bundle to OSGI-container there is a dependency to package
com.vaadin.pro.licensecheck
. Based on #13922 and https://github.com/vaadin/flow/issues/13922#issuecomment-1148483787 I understand that it's not a runtime dependency. If the runtime dependency can be excluded/is optional for other ways of deploying flow-server, it should be at least optional in OSGI.Without this package present installing flow-server feature fails with
I can maybe help with PR to omit/make this package dependency optional.
Expected behavior
The feature installation should not fail, at least because of something that is not even needed. Documentation in https://vaadin.com/docs/latest/integrations/osgi/karaf#karf.features does not mention the requirement to install license-checker, it's location or anything.
Minimal reproducible example
Follow documentation to install flow to karaf, https://vaadin.com/docs/latest/integrations/osgi/karaf#karf.features
Have a base apache-karaf e.g. 4.3.9 Install dependency features
feature:install spifly http-whiteboard
Install dependencybundle:install mvn:org.slf4j/slf4j-simple/1.7.36
Install flow-server features repo
feature:repo-add mvn:com.vaadin/flow/23.3.20/xml/features
Install flow-server featurefeature:install flow/23.3.20
Copy/paste
Versions