0

I'm trying to create a Vaadin protlet and deploy it on a liferay portal with OSGI. I'm new to this so sorry if its very simple but I don't understand what I'm missing.

OSGi Portlets on Liferay 7 is the tutorial that I found in Vaadin's site.

Tutorial says :

Publishing an OSGi portlet on Liferay 7+ can be done in two ways: using annotations or using properties. Annotating a UI class with @VaadinLiferayPortletConfiguration (available in vaadin-liferay-integration) and making it an OSGi service of type UI is the easiest way to automatically publish the UI as a portlet and configure it to use the correct static resources.

@Theme(MyTheme.THEME_NAME)
@VaadinLiferayPortletConfiguration(name = "Vaadin.Tutorial.1", displayName =
"Vaadin Tutorial App")
@Component(service = UI.class, scope = ServiceScope.PROTOTYPE)
public class MyUI extends UI {
...
}

I created a maven project with vaadin-liferay-integration but Eclipse does not recognize annotations in this tutorial (@VaadinLiferayPortletConfiguration AND @Component ) Does any one have any idea what the problem is?

Fatemeh Abdollahei
  • 3,040
  • 1
  • 20
  • 25
Navid
  • 157
  • 2
  • 2
  • 14

1 Answers1

0

Better place to start is official Vaadin archetype:

Moreover, this a sample portlet I wrote for Liferay 7, very basic but with some tricks:

CT Liv
  • 319
  • 2
  • 6
  • I've downloaded your project but I don't see any bnd files needed for deploying to an OSGI container.Any way can you provide me more information on how I can deploy it on Liferay. And a documentation about the project structure would be much appreciated – Navid Nov 25 '17 at 12:50
  • There are two ways to create a bundle using Maven. First is to use "bnd.bnd" file and the "biz.aQute.bnd":"bnd-maven-plugin" (as in official archetype). Second is to use [Apache Felix Maven Bundle Plugin] (http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html), which does not use "bnd.bnd" but lists all OSGi manifest entries in the pom. For the documentation, I'll check if I can do something, but first I'd suggest to read here: https://vaadin.com/docs/v8/framework/portal/portal-osgi.html – CT Liv Nov 27 '17 at 11:46