However, after some debugging with Vaadin 8.14.3 server's checkProductionMode method it seemed that there are (at least) two options to choose from to get a Liferay OSGi portlet with Annotations to turn productionMode on.
Turn on production mode globally by adding JVM parameter
-Dvaadin.productionMode=true
or
Turn on production mode for a single portlet by adding productionMode property into @Component annotation. A sample @Component annotation with production mode turned on would look like this:
@VaadinLiferayPortletConfiguration does not support productionMode parameter and adding productionMode property into the @Component annotation when using @VaadinLiferayPortletConfiguration had no affect.
I also noticed that if a Liferay page contained multiple Vaadin portlets, turning productionMode to false in one portlet enabled debug mode for all portlets on that page.
I used Liferay 7.3.5 & Vaadin 8.14.3 and Liferay 7.4.3.10 & Vaaadin 8.16.0 in my tests.
I was unable to find documentation about how to turn productionMode on with Vaadin 8 OSGi Liferay Portlets using Annotations. The document I refer to is https://vaadin.com/docs/v8/framework/portal/portal-osgi.
However, after some debugging with Vaadin 8.14.3 server's checkProductionMode method it seemed that there are (at least) two options to choose from to get a Liferay OSGi portlet with Annotations to turn productionMode on.
or
@Component
annotation. A sample@Component
annotation with production mode turned on would look like this:@VaadinLiferayPortletConfiguration
does not support productionMode parameter and adding productionMode property into the@Component
annotation when using@VaadinLiferayPortletConfiguration
had no affect.I also noticed that if a Liferay page contained multiple Vaadin portlets, turning productionMode to false in one portlet enabled debug mode for all portlets on that page.
I used Liferay 7.3.5 & Vaadin 8.14.3 and Liferay 7.4.3.10 & Vaaadin 8.16.0 in my tests.