Virgo Bundlor + Maven [message #902430] |
Fri, 17 August 2012 10:41  |
Eclipse User |
|
|
|
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 #1061923 is a reply to message #905320] |
Tue, 04 June 2013 13:57  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04529 seconds