Reputation: 2183
My problem is web-fragment bundle is not working.
I have two projects:
One where I create a web bundle with Virgo Server with this manifest.mf:
Manifest-Version: 1.0
Bnd-LastModified: 1381358185168
Build-Jdk: 1.6.0_37
Built-By: juliocesarreymendez
Bundle-ClassPath: .,WEB-INF/classes,WEB-INF/lib/commons-lang-2.6.jar
Bundle-Description: http://localhost:8090/system/console/bundles
Bundle-ManifestVersion: 2
Bundle-Name: first-maven-virgo-project
Bundle-SymbolicName: first-maven-virgo-project
Bundle-Version: 1.0.0
Created-By: Apache Maven Bundle Plugin
Embed-Dependency: *;scope=compile|runtime;
Embed-Directory: WEB-INF/lib
Embed-Transitive: true
Embedded-Artifacts: WEB-INF/lib/commons-lang-2.6.jar;g="commons-lang";a=
"commons-lang";v="2.6"
Export-Package: com.roshka.virgo.web;uses:="javax.servlet,javax.servlet.
annotation,javax.servlet.http";version="1.0.0"
Import-Package: javax.servlet,javax.servlet.annotation,javax.servlet.htt
p
Tool: Bnd-2.1.0.20130426-122213
Web-ContextPath: /hello
The project deployment on virgo server works find. I can even test it on localhost:8080/hello
.
However, when I create another bundle project (Web Fragment) with this manifest.mf:
Manifest-Version: 1.0
Bnd-LastModified: 1381357367000
Build-Jdk: 1.6.0_37
Built-By: juliocesarreymendez
Bundle-ClassPath: .,commons-lang-2.6.jar
Bundle-Description: http://localhost:8090/system/console/bundles
Bundle-ManifestVersion: 2
Bundle-Name: first-bundle-par
Bundle-SymbolicName: first-bundle-par
Bundle-Version: 1.0.0
Created-By: Apache Maven Bundle Plugin
Embed-Dependency: *;scope=compile|runtime;
Embed-Directory: .
Embed-Transitive: true
Embedded-Artifacts: commons-lang-2.6.jar;g="commons-lang";a="commons-lan
g";v="2.6"
Export-Package: com.roshka.servlet2;version="1.0.0";uses:="javax.servlet
,javax.servlet.annotation,javax.servlet.http"
Fragment-Host: first-maven-virgo-project
Import-Package: javax.servlet,javax.servlet.annotation,javax.servlet.htt
p
Tool: Bnd-2.1.0.20130426-122213
Deployment works, but has no binding with /hello context path or first-maven-virgo-project
web bundle.
What's wrong in my project? Does Virgo support Web-Fragment OSGI?
Thanks.
Upvotes: 1
Views: 634
Reputation: 181270
Make sure you are deploying your file with a jar extension and not a war extension.
Upvotes: 2