| Use of plain old Eclipse Plugins with Virgo Tooling [message #872469] |
Wed, 16 May 2012 03:28  |
Thorsten Schlathölter Messages: 179 Registered: February 2012 Location: Düsseldorf |
Senior Member |
|
|
Hi,
I wonder if it is by some chance possible to use plain old eclipse plugin bundles within virgo tooling?
Background: I have an RCP application that communicates with a database via a server layer installed in a tomcat. I have some common code that is used on both sides, client and server. In order to run this code on RCP it is wrapped in a simple Eclipse plugin bundle.
Now I would like to OSGI-ify the server component and I need to run these eclipse plugin bundles as OSGI bundles in the Virgo server. Of course this works when I use a compiled bundle and drop it into the virgo repository. The problem arises when I try to use this bundle using virgo tooling from within eclipse.
I have tried to add the OSGI Bundle nature to the respective plugin project. This enables me to add the plugin to an OSGI Plan Bundle. But if I start the server I get an exception indicating that the manifest is not available.
[2012-05-16 08:52:55.420] TCP Connection(6)-127.0.0.1 <DE0002E> Installation of par 'TestWS.par' version '1.0.0' failed. java.lang.UnsupportedOperationException: Cannot open an input stream for 'C:\Programme_wa\virgo\virgo-tomcat-server-3.0.3.RELEASE\work\org.eclipse.virgo.kernel.deployer_3.0.3.RELEASE\staging\TestWS.par-1\bundle\TestWS.par-1-TestEclipsePlugin\0.0.0\TestEclipsePlugin.jar\META-INF\MANIFEST.MF' as it does not exist
I noticed that within the OSGI Bundles the META-INF/Manifest.mf is always part of a source folder whereas in eclispe plugins, the META-INF/Manifest is always located in the plugin-root. If I move the META-INF folder into a source folder, the bundle is started correctly in virgo but in that case the eclipse plugin is not recognized from the eclipse application launcher any more.
Has anybody a solution for this?
Regards,
Thorsten
|
|
|
|
|
| Re: Use of plain old Eclipse Plugins with Virgo Tooling [message #875483 is a reply to message #874622] |
Tue, 22 May 2012 16:31   |
Thorsten Schlathölter Messages: 179 Registered: February 2012 Location: Düsseldorf |
Senior Member |
|
|
Finally I "solved" this issue by declaring an xml builder that copies the META-INF\MANIFEST.MF into the bin folder.
This is not very practical because the builder is for sure only executed when the project is build. (I have got to admit that I never used an external builders before, so maybe I am missing something). But at least it works. If somebody tries this, make sure that you tell the builder to refresh the bin folder after completion. For plugins that make use of the Virgo BundleClasspathContainer (org.eclipse.virgo.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER) it is important to note that this container only works if the META-INF folder is located in a source folder. So in this case the META-INF folder might have to be copied from the source folder to the root of the plugin (I have not yet tried that).
I assume that this is only a temporary work around until the bug gets fixed.
Regards,
Thorsten
[Updated on: Tue, 22 May 2012 16:33] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01873 seconds