1

我的问题是网络片段包不起作用。

我有两个项目:

我使用此 manifest.mf 创建与 Virgo Server 的 Web 包的地方:

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

处女座服务器上的项目部署工作找到。我什至可以在localhost:8080/hello.

但是,当我使用此 manifest.mf 创建另一个捆绑项目(Web 片段)时:

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

部署工作,但与 /hello 上下文路径或first-maven-virgo-projectweb 包没有绑定。

我的项目有什么问题?Virgo 是否支持 Web-Fragment OSGI?

谢谢。

4

1 回答 1

2

确保您使用jar扩展名而不是war扩展名部署文件。

于 2013-10-11T12:49:51.557 回答