středa 9. dubna 2014

Kai Tödter's modular application on Eclipse Virgo

Kai Tödter's modular application on Eclipse Virgo

We are looking for suitable technologies for our new project - modular web platform.
Because we like Vaadin and OSGi, we did some research and look ups for technologies based on these frameworks.

We have found two nice things on the internet:

I decided to do some modifications for our project purposes:
  • Maven based project
  • Eclipse Virgo development and deployment ready
  • Get rid of HttpService, use standard WAB (web application bundle)
  • Get rid of Declarative services use Gemini blueprint
I also made some simplifications: I didn't adopt all of original modules and I integrated additional vaadin bundles (org.vaadin.osgi.staticres, org.vaadin.osgi) into main application bundle. Result of my efforts you can download here:

>> Download example  <<

Note: This example has some imperfections (some pom.xml refactiong is needed, old vaadin version, some strange behaviors in example....) but for learning purposes is enought, I guess:).

Guide 1 - simple deploy

  1. Download eclipse virgo with jetty 3.6.2 -
  2. Unzip virgo.
  3. Download
  4. unzip
  5. mvn clean install (in <sample_dir>)
  6. Start virgo via <virgo_dir>\bin\startup.bat (wait till virgo is ready)
  7. Copy into <virgo_dir>\pickup those files (KEEP ORDER!!!)
    1. <sample_dir>\vaadin-6.7.6.jar
    2. <sample_dir>\main\target\
    3. <sample_dir>\printaction\target\
    4. <sample_dir>\runoaction\target\
    5. <sample_dir>\bundleview\target\
  8. open url http://localhost:8080/producer/main
  9. Enjoy

Guide 2 - Eclipse tool

  1. Download eclipse virgo with jetty 3.6.2 -
  2. Unzip virgo.
  3. Download
  4. mvn clean install in <sample_dir>
  5. Copy into <virgo_dir>\repository\usr file <sample_dir>\vaadin-6.7.6.jar
  6. Start Eclipse (Kepler), install Virgo Eclipse Tool according to
  7. Import via  "Existing maven project" projects from directory <sample_dir>. Use project template "groupId"."artefactId"
  8. Add Virgo Nature to imported projects (except project
    1. Select projects in "Package Explorer", right click for context menu -> Virgo -> Add bundle project nature.
  9. Add new server Runtime (Windows -> Preferences -> Server -> Runtime -> Add "EclipseRT\Virgo Runtime". Put <virgo_dir>
  10. Add new server in "Servers" window ->Create New Server -> "EclipseRT\Virgo Runtime", host name "localhost", select your runtime from step 8 as runtime.
  11. Next button
  12. Add application"" only!.
  13. Start your server in "Servers" window.
  14. open url http://localhost:8080/producer/main
  15. Add other applications (right click on your server in "Servers" window)

Žádné komentáře: