我試圖在我的features.xml中使用保險絲應用程序捆綁工具,如http://fuse.fusesource.org/bundle/faq.html底部所述,並在啓動時安裝該功能,但是我相信我有一個啓動順序問題。使用Fab安裝包 - 未知協議:fab
我相信這是布束的功能,包括我在我的org.apache.karaf.features.cfg文件作爲保險絲應用程序捆綁包:是指類似於
#
# Comma separated list of features to install at startup
#
featuresBoot=fabric-bundle,(some other features),myfeature
我的特點以下:
<feature name="myfeature" version="${project.version}">
<bundle>fab:mvn:com.company/mybundle/${project.version}</bundle>
</feature>
,但啓動時,我注意到這在我的日誌:
16:31:20,785 | DEBUG | t-60024-thread-1 | FeaturesServiceImpl | 22 - org.apache.karaf.features.core - 2.3.0.redhat-60024 | Installing feature myfeature 2.0.0-SNAPSHOT
16:31:20,786 | DEBUG | t-60024-thread-1 | FeaturesServiceImpl | 22 - org.apache.karaf.features.core - 2.3.0.redhat-60024 | Checking fab:mvn:com.company/mybundle/2.0.0-SNAPSHOT
16:31:20,789 | WARN | t-60024-thread-1 | FeaturesServiceImpl | 22 - org.apache.karaf.features.core - 2.3.0.redhat-60024 | Error when installing feature myfeature: java.net.MalformedURLException: Unknown protocol: fab
我注意到,保險絲應用程序捆綁包(FAB-OSGi的)實際上是開始3秒後:
16:31:23,436 | DEBUG | lixDispatchQueue | fab-osgi | 61 - org.fusesource.fabric.fab.fab-osgi - 7.2.0.redhat-024 | BundleEvent STARTED - org.fusesource.fabric.fab.fab-osgi
所以現在一旦服務器在shell啓動,我可以運行
features:install myfeature
和功能已成功安裝。
所以我相信我需要確保Fuse Application Bundles軟件包已安裝並在啓動時在嘗試安裝並啓動我的功能之前啓動。我怎樣才能做到這一點?
乾杯,
湯姆