0

I'm just starting to develop a new eclipse plugin where I want a web application server running in Eclipse. I found a nice blog, OSGi as a Web Application Server, that describes how to do this. The author suggests creating a target environment for my bundle requirements, and some of those bundles get pulled in from the Equinox Project SDK (now called Equinox Target Components in Juno). I notice that the tutorial project runs fine when my target platform is the platform I created in the tutorial, but fails to start when it is the default platform. So, now for my question...

If I need bundles that are not part of the default, how will my plugin project get access to those bundles? Will I need to deploy them along with my plugin? How would I know if the user's eclipse does or does not already have those required bundles?

harschware
  • 13,006
  • 17
  • 55
  • 87

2 Answers2

1

You was not much clear about what kind of application you are developing. Running a web server in an Eclipse IDE as a plugin don't make any sense to me. This kind of server application is best just running on top of Equinox.

Anyway, the right path is to create a "Product Configuration" file and add categories that contains the needed bundles (go to File/Plug-in Development/Product Configuration).

With this file you can run an instance of the product (inside the IDE) and can export it (create a zip containing all needed bundles)

And if you want to able your user to install plugin inside his IDE you must create a P2 repository (using a Target Definition File) and expose the exported directory within a Http server. You could research about Tycho to build this kind of components in a maven style.

Cristiano
  • 1,414
  • 15
  • 22
  • There are good reasons for the app server within the plugin, but you answered the crux of the question: Product Configuration plus p2 is probably sufficient to get me back on the right track... thanks! – harschware May 10 '13 at 21:06
0

Well, I'm not sure if re-inventing the wheel again is really sufficient. You might take a look at Pax-Web for inspiration on how to do it, or take a look Apache Karaf as a OSGi-Container (using Pax-Web). Or even better start contributing to one of the two :-)

Achim Nierbeck
  • 5,265
  • 2
  • 14
  • 22
  • Thanks, but you misunderstood my question, the point is not what kind of plugin am I building but what do I do for my users, when an eclipse plugin I build requires bundles that are not part of the default target platform. The fact that I am running a servlet in the plugin is only material to the problem, in that if one wants to read the tutorial they can verify the issue I described (the tutorial includes bundles from the Elipse Project SDK not found in the default target platform). – harschware May 10 '13 at 16:53