Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Maven plugin to deploy bundles to Virgo
Maven plugin to deploy bundles to Virgo [message #773806] Mon, 02 January 2012 15:39 Go to next message
Frieder Heugel is currently offline Frieder HeugelFriend
Messages: 61
Registered: October 2010
Location: Basel, CH
Member
Hi guys

During the holidays I spent some time to develop a small Maven plugin that is able to deploy/undeploy/refresh bundles via specific goals. It uses the Deployer MBean from Virgo. Maybe it's of some use to somebody.

The sourcecode can be found on Github. Unfortunately the plugin is not available in any Maven repository yet so one has to download the source and build it first.

I tested it with VTS 3.0.2/3.5M1 and Maven 3.0.3 even though I didn't do a lot of testing. If anyone hits a bug or has any suggestions please let me know.

Frieder
Re: Maven plugin to deploy bundles to Virgo [message #774094 is a reply to message #773806] Tue, 03 January 2012 08:49 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Thanks for sharing this code Frieder! If you want to add a section to the Virgo wiki, feel free. I suggest adding a section to the tooling page.
Re: Maven plugin to deploy bundles to Virgo [message #774465 is a reply to message #774094] Wed, 04 January 2012 00:44 Go to previous messageGo to next message
Frieder Heugel is currently offline Frieder HeugelFriend
Messages: 61
Registered: October 2010
Location: Basel, CH
Member
I didn't know that I have the privilege to edit the wiki. Anyway I added a section for the Maven plugin on the tooling page that should help people to use the plugin. When I find the time I'll prepare the final steps necessary to get this deployed to the Maven central repository (might take a while though).

[Updated on: Wed, 04 January 2012 07:40]

Report message to a moderator

Re: Maven plugin to deploy bundles to Virgo [message #774576 is a reply to message #774465] Wed, 04 January 2012 08:02 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Thanks Frieder. Nice work! If you decide at some point that there would be an advantage in contributing this project to Virgo, I would certainly be open to discussing that. The immediate benefits I can think of are uniformity of (a) license, (b) source code management, (c) documentation, (d) bug tracking, and (e) community feedback mechanisms such as this forum. If you prefer not, I quite understand.

For the benefit of others, the wiki section is here.

[Updated on: Wed, 04 January 2012 08:03]

Report message to a moderator

Re: Maven plugin to deploy bundles to Virgo [message #774577 is a reply to message #774576] Wed, 04 January 2012 08:02 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
(accidental post - sorry)

[Updated on: Wed, 04 January 2012 08:03]

Report message to a moderator

Re: Maven plugin to deploy bundles to Virgo [message #778245 is a reply to message #773806] Wed, 11 January 2012 22:18 Go to previous messageGo to next message
Rafal Krzewski is currently offline Rafal KrzewskiFriend
Messages: 10
Registered: July 2009
Junior Member
Thanks for sharing your work, Frieder!

I was wondering if you know about Cargo (cargo.codehaus.org). I believe that the code you've written could be integrated into Cargo to add support for Virgo as a J2EE container.

Cargo is quite popular and it supports OSGi bundle deployment support alongside with "traditional" J2EE artifacts, so this seems to be a natural match.

Deploying bundles is great, but I think it's also important to provide a mechanism for deploying other Virgo artifacts: plans and PARs. A first step towards that would be making them first class Maven artifacts by defining new packaging types. Unfortunately "par" is already taken (EJB 3.0 persistence archive) - "virgo-par" could serve as an alternative. For plans, "virgo-plan" could be used for symmetry. File name extensions of the actual artifacts could be .par and .xml respectively, it's just the packaging type that needs to be distinct to avoid clashing with other tools.

Supporting plans is rather trivial - there's nothing to do except in install and deploy lifecycle phases. PAR support is a bit more involved - constituent bundles should artifacts need to collected through Maven dependencies, .properties files should be added from src/main/resources (or src/main/configuration) and possibly a plan could be generated - PARs can contain a nested plan to determine startup ordering, if my memory serves me. Plan generation should be optional, and the required configuration should be minimal - usually there's only a few bundles for which the order matters, so it would be convenient to spell out only those and have the rest added after them automatically.

Cargo supports container type specific deployable types, so the PARs and plans could be deployed in an uniform way.

That's exciting stuff. I wish I had time to sit down and work on it myself Sad

Regards,
Rafał
Re: Maven plugin to deploy bundles to Virgo [message #778966 is a reply to message #778245] Sat, 14 January 2012 08:45 Go to previous messageGo to next message
Frieder Heugel is currently offline Frieder HeugelFriend
Messages: 61
Registered: October 2010
Location: Basel, CH
Member
Hi Rafal

I think it's an interesting idea to support plans/pars as well. As soon as I have some leisure time I'll check whether or not there is MBean support for these artefact types and in case there is support for it I'll start working on this.

I didn't know about Cargo until now. I had a quick look and it seems to be an interesting project but I have to read a little more about it. I talked to Glyn this week and I'm going to contribute the project to Virgo. For the moment that's my priority. Once this has been done I can also take a look on the Cargo integration but no promises on this.

Wish all of you a nice weekend.

Bye
Frieder

[Updated on: Sun, 15 January 2012 09:07]

Report message to a moderator

Re: Maven plugin to deploy bundles to Virgo [message #779502 is a reply to message #778966] Sun, 15 January 2012 22:59 Go to previous messageGo to next message
Rafal Krzewski is currently offline Rafal KrzewskiFriend
Messages: 10
Registered: July 2009
Junior Member
That's great! Custom Virgo Maven plugin is a good starting point. Once we have this working, The MBean client code could be factored out into a library, which coluld be shared between Maven plugin, Cargo extension, WTP/JST server adapter and other tools.

Regrds,
Rafał
Re: Maven plugin to deploy bundles to Virgo [message #780522 is a reply to message #779502] Wed, 18 January 2012 13:00 Go to previous messageGo to next message
Rafal Krzewski is currently offline Rafal KrzewskiFriend
Messages: 10
Registered: July 2009
Junior Member
I've started to work on extending Fireder's plugin with plan & PAR packaging functionality. I should have something to share after the weekend.
I'll also look into integrating the plugin with m2e.
For now I am working with a local clone of Frieder's repository, I'll make a github clone and synchronize it later.
I would like to contribute the code to Eclipse Virgo of course.

Cheers,
Rafał
Re: Maven plugin to deploy bundles to Virgo [message #780550 is a reply to message #780522] Wed, 18 January 2012 15:14 Go to previous messageGo to next message
Frieder Heugel is currently offline Frieder HeugelFriend
Messages: 61
Registered: October 2010
Location: Basel, CH
Member
Hi Rafal

I think we should be careful not doing the work twice as I'm also working on the plugin. Moreover Glyn told me to wait for the 2nd milestone beause this will probably require some refactoring of parts of the code.

I think we should discuss the work items and coordinate who is working on what part of the project. In case that you have Skype (friederheugel) or ICQ (63395941) please contact me.

Bye
Frieder
Re: Maven plugin to deploy bundles to Virgo [message #780607 is a reply to message #780550] Wed, 18 January 2012 18:29 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Hi all,

If you want to integrate this with any of the Virgo IDE, please raise a bug against Virgo Tooling. I'm not a Maven person, but Leo and I are working heavily on the Virgo IDE stuff and yes there will definitely be some major refactorings there. You can look at https://bugs.eclipse.org/bugs/show_bug.cgi?id=368890 to get some idea of what's happening there.

cheers,

Miles
Re: Maven plugin to deploy bundles to Virgo [message #783431 is a reply to message #780607] Wed, 25 January 2012 17:47 Go to previous message
Frieder Heugel is currently offline Frieder HeugelFriend
Messages: 61
Registered: October 2010
Location: Basel, CH
Member
Hi guys

I was thinking about Rafals suggestion regarding the par/plan support and following are my thoughts (sorry for the late response).

1.) I agree with Rafal that the maven-virgo-plugin should support the deployment of plan/par files but I don't think that the plugin should be responsible for building this kind of artifact. Otherwise there would be bundlor to create bundles and this plugin to create pars and plans.

2.) There already exists a maven plugin for creating par files that has been contributed to SpringSource back in 2009, see http://blog.springsource.org/2009/06/24/maven-par-plugin-100m1/. I couldn't find the creator's email address but maybe someone of the SpringSource team has it so it might be worth asking him/her to contribute that under the EPL to Virgo so we could improve this plugin instead of developing a new one.

3.) I'm not sure if plan/par support should be standalone or part of bundlor.

4.) I'm not sure what Rafal means with m2e integration as the Maven plugin already works just fine with m2e.

5.) Currently I don't know how we could integrate the Maven tooling to Virgo IDE. The only thing that came to my mind was to create a new Maven archetype that is creating a Maven project which at the same time is a VirgoIDE-enabled Eclipse project (pretty much like the current SpringSource OSGi archetype but with additional entries in the project files for the VirgoIDE nature).

What are your thoughts on this?

@Glyn
I already did some changes regarding the new directory layout to the current source (didn't check it in though) but I'd like to wait if anyone has some ideas regarding the above mentioned points as this might influence the plugin. I hope that's fine for you.

I have one more question. As the naming of the configuration folder has changed and the plugin is depending on the directory structure I'm wondering if I should either implement that the plugin is first checking for a configuration/ folder and then for a config/ folder or if people would prefer to have a configuration item (e.g. <legacy>true</legacy>) in the pom file.

Bye
Frieder
Previous Topic:FIRST GWT WAB
Next Topic:Class not found mystery
Goto Forum:
  


Current Time: Fri Mar 29 07:33:44 GMT 2024

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

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

Back to the top