0

我知道如何设置初始捆绑级别,以便部署捆绑:

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_id 和 [bundle_id],甚至是 bundle 名称。

让我举个例子。假设我想将捆绑包 5(书架 api)级别从 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.

任何帮助表示赞赏。

4

2 回答 2

1

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

bundlelevel -s NEW_LEVEL BUNDLE_ID

例如:对于级别 4 和捆绑包 10,执行

捆绑级别-s 4 10

也许您因为错过了 -s 而收到了投诉?

于 2011-02-24T10:19:36.647 回答
0

在 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 版本中尝试过(不知道您使用的是什么)?

于 2011-02-24T20:39:30.673 回答