简体   繁体   English

更改felix中的捆绑包级别?

[英]Change Bundle level in felix?

I know how to set an initial bundle level, for just to be deployed bundle: 我知道如何为要部署的捆绑包设置初始捆绑包级别:

bundlelevel -i 5

But how do I change the level of an existing bundle? 但是,如何更改现有捆绑包的级别? Help for bundlelevel says: 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

I have no idea what "Bundle[]" argument is. 我不知道“ Bundle []”参数是什么。 I tried just bundle_id and [bundle_id], and even bundle name. 我只尝试了bundle_id和[bundle_id],甚至尝试了包名。

Let me show an example. 让我举一个例子。 Let's say I want to change bundle 5 (bookshelf api) level from 1 to 2. 假设我想将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)

I tried the following: 我尝试了以下方法:

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.

Any help is appreciated. 任何帮助表示赞赏。

Not the clearest of syntax messages I guess :) Bundle[] refers to bundle IDs. 我猜不是最清晰的语法消息:) Bundle []指的是包ID。 Do lb, get the ID for the bundle you want, then run lb,获取所需捆绑的ID,然后运行

bundlelevel -s NEW_LEVEL BUNDLE_ID bundlelevel -s NEW_LEVEL BUNDLE_ID

eg: for level 4 and bundle 10, do 例如:对于第4级和捆绑包10,请执行

bundlelevel -s 4 10 捆绑级别-s 4 10

Maybe you were getting complaints because you missed the -s? 也许是因为错过了-s而引起投诉?

Made some experience in FUSE ESB but never used felix. 在FUSE ESB上有一些经验,但从未使用过felix。 Just downloaded felix 3.0.8 and tried: 刚刚下载了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!

I tried hard to reproduce your problem but could not. 我尽力重现您的问题,但没有。 It seams to work as specified. 它按照指定的方式工作。 Did you tried it in a fresh installation or with a newer felix version (do not know what you are using)? 您是在全新安装中还是在更新的felix版本中尝试过(不知道您在使用什么)?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM