Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Virgo Tooling - Third party bundles(Tooling, import packages from thirdy party bundles, that is not on the default repository)
Virgo Tooling - Third party bundles [message #784403] Fri, 27 January 2012 13:20 Go to next message
Eduardo Frazão is currently offline Eduardo Frazão
Messages: 118
Registered: January 2012
Senior Member
Hi all.
Im new to Virgo, and reading the tooling help, Ive installed the Eclipse IDE Plugin (2.7.1), Eclipse Virgo Tools 1.0.0, on a Eclipse Indigo SR1. Im using Virgo Tomcat 3.02 as Runtime.

I can create and deploy bundles normally. But I can't do a simple task. Import a package from a bundle that I have locally (As EclipseLink 2.3 for example). I can only import packages from bundles of the Virgo ext/ repository, or download it from Spring OBR Repo.

I already try to put this bundle on the virgo repository, but it is not found on the Bundle Repository Browser on Eclipse. Later, I found a topic that confirms that it will not work.

So, how can I use thirdy party bundles on my project, adding them as dependencies to the tools deploy them together on the runtime?

Sorry by the noob question (and bad english too). I try to search something in the forum, but I cant.

Thanks for any help!
Eduardo

[Updated on: Fri, 27 January 2012 16:27]

Report message to a moderator

Re: Virgo Tooling - Third party bundles [message #784590 is a reply to message #784403] Fri, 27 January 2012 18:39 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1340
Registered: July 2009
Senior Member
Eduardo Frazão wrote on Fri, 27 January 2012 08:20
Hi all.
Im new to Virgo, and reading the tooling help, Ive installed the Eclipse IDE Plugin (2.7.1), Eclipse Virgo Tools 1.0.0, on a Eclipse Indigo SR1. Im using Virgo Tomcat 3.02 as Runtime.

I can create and deploy bundles normally. But I can't do a simple task. Import a package from a bundle that I have locally (As EclipseLink 2.3 for example). I can only import packages from bundles of the Virgo ext/ repository, or download it from Spring OBR Repo.


Hi Eduardo,

Do you mean that the bundles aren't available within Eclipse? I'm not sure if this is answering your question, but you might be unfamiliar with how Eclipse builds and dependencies are organized. In order to use an import from a bundle within an Eclipse (PDE) plugin project, you need to explicitly create a dependency on the bundle that contains the imported packages. You can do that through the manifest, by opening META-INF/MANIFEST.MF and adding the bundle to required plugins.

hth,

Miles
Re: Virgo Tooling - Third party bundles [message #784605 is a reply to message #784590] Fri, 27 January 2012 19:09 Go to previous messageGo to next message
Eduardo Frazão is currently offline Eduardo Frazão
Messages: 118
Registered: January 2012
Senior Member
Hi @Miles Parker. Thank you by your answer.
This is what I wanna do. Put a dependency on my Bundle, to another. But this another bundle is not a project on my Workspace, because on this case, I can use a Project Dependency, and it works nice Smile.
I wanna simply put a dependency on any other Bundle, and the Virgo Tooling deploy it automatically. The problem is because I can only import classes from Bundles that are avaliable on the SpringSource OBR Repositorys. Is not possible to put a dependency on a bundle that I have locally, or even, inside the usr/ virgo repository?
The BndTools have a similar approach. I can inform the bundles that may be loaded on the OSGI container with my bundle. I dont need to Require-Bundle, or use the bundle on my BundleClassPath, putting unecessary information on my MF. I only tell the tooling that I need this bundle to be loaded on the container.
Before inform the bundles that I need to deploy, I can use a Import-package with no alerts of package not found, etc.

Sorry by this noob question. I'm searching on the forum and over web, but whitout success.

[Updated on: Fri, 27 January 2012 19:38]

Report message to a moderator

Re: Virgo Tooling - Third party bundles [message #784636 is a reply to message #784605] Fri, 27 January 2012 20:14 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1340
Registered: July 2009
Senior Member
Eduardo Frazão wrote on Fri, 27 January 2012 14:09
Hi @Miles Parker. Thank you by your answer.
This is what I wanna do. Put a dependency on my Bundle, to another. But this another bundle is not a project on my Workspace, because on this case, I can use a Project Dependency, and it works nice Smile.


OK, once you use the PDE mechanisms, you can't do project dependencies. Smile The bundle dependency either has to a) live in your workspace as a project or b) exist a plugin (bundle) in your target platform. I realize that this is very much an Eclipse way kind of thing, but if you look at it from a build and runtime support point of view, it provides a clean way to always know you have a path to provision something. Is the issue that you don't have the project that you want to bring in? If you do have the project, you can very easily convert it to PDE. Just right-click and choose "Configure: Convert to PDE Projects.."

Quote:
I wanna simply put a dependency on any other Bundle, and the Virgo Tooling deploy it automatically. The problem is because I can only import classes from Bundles that are avaliable on the SpringSource OBR Repositorys. Is not possible to put a dependency on a bundle that I have locally,


It *should* be, no question. That's what we're trying to address under: https://bugs.eclipse.org/bugs/show_bug.cgi?id=329198 If this doesn't seem to make much sense form the perspective of "the tooling is supposed to make your life easier" that's because it doesn't make sense. We're trying to adapt stuff to more of an Eclipse approach, but we're really in the middle of that process right now.

Quote:
or even, inside the usr/ virgo repository?


Definitely not. Smile In my opinion at least, that should be a one-way trip. You don't want to mix development and deployment sources with their targets.

Quote:
The BndTools have a similar approach. I can inform the bundles that may be loaded on the OSGI container with my bundle. I dont need to Require-Bundle, or use the bundle on my BundleClassPath, putting unecessary information on my MF. I only tell the tooling that I need this bundle to be loaded on the container.
Before inform the bundles that I need to deploy, I can use a Import-package with no alerts of package not found, etc.


Right but there is magic going on back there I think. That information *does* end up in a OSGi manifest, but you just don't have to maintain it.

Quote:
Sorry by this noob question. I'm searching on the forum and over web, but whitout success.


Not at all. These don't seem like noobie questions to me anyway. But maybe that's because I'm a noobie to some of this as well. Smile
Re: Virgo Tooling - Third party bundles [message #784637 is a reply to message #784636] Fri, 27 January 2012 20:16 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1340
Registered: July 2009
Senior Member
Oh, I should say. The current solution for you once you get things into PDE build is to create a plan.xml (you have to do this manually I believe) and manually copy that along with your plugins to the virgo server. Again, if it seems like something is missing from the tooling, that's because it is.

Here's a (probably out of date) quick and dirty explanation of how you can do that, at least to the "getting something up and running" stage:

http://milesparker.blogspot.com/2010/12/emf-and-rap-and-virgo-oh-my.html

[Updated on: Fri, 27 January 2012 20:17]

Report message to a moderator

Re: Virgo Tooling - Third party bundles [message #786384 is a reply to message #784637] Mon, 30 January 2012 10:55 Go to previous messageGo to next message
Eduardo Frazão is currently offline Eduardo Frazão
Messages: 118
Registered: January 2012
Senior Member
Miles Parker, tank you again for so mutch help!

I will read your post about EMF and RAP and Virgo right now!

But only a small focused question. How can I use by example, a project like Eclipse Link 2.3.x, and Gemini JPA? Is possible to import it on my Workspace? Projects like Eclipse Gemini does not have a OBR repository that I can add to Virgo Tooling?

Att,
Eduardo
Re: Virgo Tooling - Third party bundles [message #786679 is a reply to message #786384] Mon, 30 January 2012 17:57 Go to previous message
Eduardo Frazão is currently offline Eduardo Frazão
Messages: 118
Registered: January 2012
Senior Member
@Miles Parker,
I solved this issue (not with the best pratices), creating a new repository in Virgo, like that:

eclipselink.type=external
eclipselink.searchPattern=repository/eclipselink/{artifact}

chain=ext,eclipselink,usr


This repository appear right on Eclipse, and I can import classes from Bundles without problem!

This mode can be useful in my devepment structure, because is easy to redistribute the runtime dependencies to another developers..

I wanna thank you by your time and atention!

Att,
Previous Topic:Virgo Repository
Next Topic:Error @Autowired Service in Virgo
Goto Forum:
  


Current Time: Wed Sep 17 15:56:01 GMT 2014

Powered by FUDForum. Page generated in 0.11121 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software