Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Virgo Bundlor + Maven
Virgo Bundlor + Maven [message #902430] Fri, 17 August 2012 14:41 Go to next message
Armin P is currently offline Armin P
Messages: 1
Registered: July 2012
Junior Member
Hi there,

I have some issue getting a Virgo Bundle Project working correctly with Maven Dependencies. I first thought that it has something to do with my Eclipse installation so I started from scratch.

1. Installed clean Eclipse IDE for Java EE Developers ( 4.2.0 Version )
2. Installed Spring STS, Virgo Toolkit and Eclipse Virgo Bundlor Plugin with Maven integration.
3. Configured the Eclipse Virgo Server (3.5.0) in Eclipse and started it. (worked like a charm)
4. Created a new Virgo Bundle Project and deployed it to the server via drag and drop. (also worked without any issues, I can see the bundle in the Admin Web Console with all the correct information's : Version 1.0.0 , Name TestBundle etc. )
5. After Converting the Project to a Maven Project the MANIFEST of the bundle, while redeploying it to the server, gets corrupted. The Version is shown as 0.0.0. I checked in the VIRGO_HOME/stage/TestBundle.jar/ but the manifest I found looked like this :

Manifest-Version: 1.0
Build-By: armin
Build-Jdk: 1.7.0_05-icedtea
Tool: Bundlor 1.1.1.RELEASE
Created-By: Maven Integration for Eclipse


So I started digging and found out that I should specify a template.mf File so that Bundlor picks it up and generates a MANIFEST.MF basing on it. So I added a simple template.mf file to the root dir of my project.

Manifest-Version: 1.0
Bundle-Version: 1.0.0
Bundle-Name: TestBundle
Bundle-ManifestVersion: 2
Bundle-SymbolicName: test.bundle



After using the Virgo -> Run Generation of MANIFEST.MF File the MANIFEST.MF located in src/META-INF/ got updated and I get :

Manifest-Version: 1.0
Build-Jdk: 1.7.0_05-icedtea
Build-By: armin
Bundle-Version: 1.0.0
Tool: Bundlor 1.1.1.RELEASE
Bundle-Name: TestBundle
Bundle-ManifestVersion: 2
Created-By: Maven Integration for Eclipse
Bundle-SymbolicName: test.bundle


But the deployment version of the Bundle doesn't change... Its still the same like before I added the template.MF.

I tried to google a solution but I cannot find any working tutorial on how to proper use Maven with Virgo Bundles but I'm stuck atm. Each site points me to Virgo Bundlor, but the Project is using it ( obviously ) but it somehow is been deployed wrong.

Can somebody tell me what I'm doing wrong ?

Kind regards,

Armin
Re: Virgo Bundlor + Maven [message #905320 is a reply to message #902430] Thu, 30 August 2012 06:58 Go to previous messageGo to next message
Barbara Rosi-Schwartz is currently offline Barbara Rosi-Schwartz
Messages: 448
Registered: July 2009
Senior Member
Armin,

I am not sure I understand your problem, but if you are expecting Bundlor to increment the bundle version number automatically, this does not happen. Since bundle versions have semantic meaning, it is up to you to update the version number when appropriate.

HTH,
Barbara
Re: Virgo Bundlor + Maven [message #1061923 is a reply to message #905320] Tue, 04 June 2013 17:57 Go to previous message
Sandile Keswa is currently offline Sandile Keswa
Messages: 3
Registered: May 2013
Junior Member
Armin,

I have had a similar experience with my MANIFEST.MF not updating in the packaged (JAR) version of the bundle. I discovered after a lot of confusion that it was mostly because of weirdness introduced to the maven build cycle by M2E. For reasons I have not yet discovered, M2E will sometimes neglect to invoke bundlor for packaging the JAR, but it will still generate the correct MANFEST.MF after-the-fact. I would try to run the maven build for your bundle outside of eclipse as a litmus test to see if you are having a similar issue.

Good luck,
Sandile
Previous Topic:Reading XML file from external location
Next Topic:Virgo doesn't comeup restart of machine
Goto Forum:
  


Current Time: Mon Sep 22 08:32:36 GMT 2014

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

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