Osgi 更改felix中的捆绑级别?

Osgi 更改felix中的捆绑级别?,osgi,apache-felix,Osgi,Apache Felix,我知道如何为即将部署的捆绑包设置初始捆绑包级别: bundlelevel -i 5 但是如何更改现有捆绑包的级别?bundlelevel的帮助说明: bundlelevel - set bundle start level or initial bundle start level scope: felix flags: -i, --setinitial set the initial bundle start level -s, --setleve

我知道如何为即将部署的捆绑包设置初始捆绑包级别:

bundlelevel -i 5
但是如何更改现有捆绑包的级别?bundlelevel的帮助说明:

  bundlelevel - set bundle start level or initial bundle start level
   scope: felix
   flags:
      -i, --setinitial   set the initial bundle start level
      -s, --setlevel   set the bundle's start level
   parameters:
      int   target level
      Bundle[]   target identifiers

bundlelevel - query bundle start level
   scope: felix
   parameters:
      Bundle   bundle to query
我不知道“Bundle[]”参数是什么。我尝试了bundle\u id和[bundle\u id],甚至bundle name

让我举个例子。假设我想将bundle 5(bookshelfapi)级别从1更改为2

g! lb
START LEVEL 5
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (3.0.7)
    1|Active     |    1|Apache Felix Bundle Repository (1.6.2)
    2|Active     |    1|Apache Felix Gogo Command (0.6.1)
    3|Active     |    1|Apache Felix Gogo Runtime (0.6.1)
    4|Active     |    1|Apache Felix Gogo Shell (0.6.1)
    5|Active     |    1|Bookshelf Inventory API (1.5.0)
我尝试了以下方法:

g! bundlelevel -s 2 [5]
gogo: IllegalArgumentException: Cannot coerce 
    bundlelevel(String, String, ArrayList) to any of 
    [(boolean, boolean, int, Bundle[]), (Bundle)] 

g! bundlelevel -s 2 5
Must specify target bundles.

非常感谢您的帮助。

我想这不是最清晰的语法消息:)Bundle[]指的是Bundle id。执行lb,获取所需捆绑包的ID,然后运行

bundlelevel-s新的\u级别BUNDLE\u ID

e、 g:对于级别4和捆绑包10,请执行以下操作

束级-s 4 10


也许你因为错过了-s而受到抱怨?

在FUSE ESB中积累了一些经验,但从未使用过felix。 刚刚下载felix 3.0.8并尝试:

g! lb
START LEVEL 1
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (3.0.8)
    1|Active     |    1|Apache Felix Bundle Repository (1.6.2)
    2|Active     |    1|Apache Felix Gogo Command (0.8.0)
    3|Active     |    1|Apache Felix Gogo Runtime (0.8.0)
    4|Active     |    1|Apache Felix Gogo Shell (0.8.0)

g! bundlelevel -s 10 4

g! lb
START LEVEL 1
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (3.0.8)
    1|Active     |    1|Apache Felix Bundle Repository (1.6.2)
    2|Active     |    1|Apache Felix Gogo Command (0.8.0)
    3|Active     |    1|Apache Felix Gogo Runtime (0.8.0)
    4|Resolved   |   10|Apache Felix Gogo Shell (0.8.0)
g!

我试图重现你的问题,但没有成功。必须按规定工作。您是否在新安装或更新的felix版本中尝试过它(不知道您在使用什么)?

没有,这仍然不起作用。如果我有一个id为5、级别为1的bundle,我想将它更改为级别2并执行:“bundlelevel-s2 5”,felix说“必须指定目标bundle”。