Getting started with Virgo (Virgin Project???) [message #791567] |
Sun, 05 February 2012 20:34  |
Eclipse User |
|
|
|
Hello again all,
With the help of forum users, I was able to get Greenpages 2.5 up and running in eclipse. With this experience and some additional documentation, I was able to get a web bundle up and running and serving up some simple pages.
My newest dilemma is this: Some time ago I created a series of plug-in projects for use in an equinox runtime. It worked well. I'm moving to Virgo for several reasons however I am running into problems, the biggest of which is how to reference other projects correctly. For example, I have one library project that provides a series of interfaces for other bundles. The problem I have is that I cannot reference those interfaces from within another project.
For testing purposes I created two very simple bundle projects (tried both Spring bundle and EclipseRT bundles). I added a package to each project and exported the packages. Naturally I also created a simple class in each of the packages. I import the a package in only one project and attempt to use the class in the package and get an error. Both bundles are added to my virgo runtime configuration.
I suspect that this has something to do with my project or environment setup but I have scoured google and I just can't find anything to help me with this.
Any help is greatly appreciated. I have posted the project just in case any info can be gleaned from them. Thanks!
|
|
|
|
|
|
|
Re: Getting started with Virgo (Virgin Project???) [message #793152 is a reply to message #793099] |
Tue, 07 February 2012 15:39   |
Eclipse User |
|
|
|
Miles,
Would it be possible for you to post your test project files? I've had a little time and still no joy. I was wondering specifically about the step where you mention creating the dependencies. Could you elaborate?
I've been creating Spring projects, adding the OSGi bundle nature to the project, adding and configuring a src/META-INF/MANIFEST.MF (I even tried template.mf in the root), enable the bundle classpath container, export the packages, and add the projects to my virgo server runtime. Very similar to my previous attempts with the exception of the Spring items.
I can still manage to view and add the "other" projects package to the MANIFEST.MF through the manifest graphical editor dependency tab - it finds the package but then complains about not being able to resolve it.
I'm using Indigo and I've only installed the Virgo Tools, subclipse, and m2e v1.0 if that means anything. I'm not sure what state I left my projects in so I'll create two new ones in a bit and post them.
Thanks - Brian
[Updated on: Tue, 07 February 2012 15:48] by Moderator
|
|
|
Re: Getting started with Virgo (Virgin Project???) [message #793338 is a reply to message #793152] |
Tue, 07 February 2012 21:43   |
Eclipse User |
|
|
|
Hi Brian,
Leo and I walked both through the same process you have, and we think it is a (serious) bug. We tried creating two new Bundle Projects and defining the dependencies exactly as you have. We couldn't get the dependencies to work either. Could you please file a bug against Virgo tooling on this?
The solution I was using uses the PDE build mechanism (plugin-in manifest editor with "Reguired Bundles"), but until we have support for deploying PDE bundles, that's not going to be of much help to you as you'll be able to build your bundles, but then you'll need to manually deploy them.
The good news is that greenpages does work, so it seems likely that we at least have a project structure that does work, but it isn't clear yet what is making that work that isn't working for this much simpler case. (For one thing, greenpages uses the Maven classpath mechanism.) Sorry I don't have better news, but we're working on it.
cheers,
Miles
|
|
|
|
|
|
Re: Getting started with Virgo (Virgin Project???) [message #797633 is a reply to message #791567] |
Mon, 13 February 2012 13:25   |
Eclipse User |
|
|
|
OK Brian,
This is kind of embarrassing, but I think that you can I were both making an assumption that is a natural one for an Eclipse PDE developer, but not from a Virgo or Springs developer POV.
That is that just because a project is in the workspace, does not mean that it is available for dependencies. To make it so, you need to create a par or a plan to allow those bundles to be discovered:
http://www.eclipse.org/virgo/documentation/virgo-documentation-3.0.2.RELEASE/docs/virgo-programmer-guide/htmlsingle/virgo-programmer-guide.html#developing-applications-plans
Unfortunately, I didn't figure out that my basic assumption was incorrect until I spent a lot of time going through the code and determining that there was no way that it ever could have supported what we both were thinking it should have. So I think this may fall under the "feature, not bug" category, but I'm still testing things so I can't say for sure that everything is working as it should be yet.
cheers,
Miles
|
|
|
|
|
Re: Getting started with Virgo (Virgin Project???) [message #880161 is a reply to message #798347] |
Fri, 01 June 2012 10:44   |
Eclipse User |
|
|
|
Hi Folks..
Sorry, but I dont belive that you cant refer two projects, and import packages from each other.
With the Spring IDE Plugins + Virgo Tooling 2.x it was possible. I always work like that.
First I create a Bundle Project, after, other, so I put a "Project Reference" between them, and so, I added the two projects inside the Virgo Server!
All works. I can import packages, deploy packages, with no problem.
Why this does not work anymore with the new Virgo Tooling?
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.10961 seconds