我正在使用Apache ServiceMix 6.1.0,其中包含:
我面临的问题是,当我从ServiceMix卸载个人功能时,Karaf控制台中的Camel命令(例如route-list
)也会被删除。
步骤:
feature.xml
放入ServiceMix的/deploy
。功能文件:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1" name="my.feature">
<feature name="my.feature" version="0.0.1-SNAPSHOT" description="my.feature">
<bundle>mvn:org.apache.ws.commons.axiom/axiom-api/1.2.15</bundle>
<bundle>mvn:org.apache.geronimo.specs/geronimo-activation_1.1_spec/1.1</bundle>
<bundle>mvn:commons-logging/commons-logging/1.2</bundle>
<bundle>mvn:jaxen/jaxen/1.1.6</bundle>
<bundle>mvn:org.apache.geronimo.specs/geronimo-stax-api_1.0_spec/1.0.1</bundle>
<bundle>mvn:org.apache.james/apache-mime4j-core/0.7.2</bundle>
<bundle>wrap:mvn:org.apache.ws.commons.axiom/axiom-impl/1.2.15</bundle>
<bundle>mvn:org.codehaus.woodstox/woodstox-core-asl/4.2.0</bundle>
<bundle>mvn:org.codehaus.woodstox/stax2-api/3.1.1</bundle>
<bundle>mvn:com.google.guava/guava/18.0</bundle>
<bundle>mvn:commons-io/commons-io/2.3</bundle>
<bundle>wrap:mvn:xerces/xercesImpl/2.11.0</bundle>
<bundle>wrap:mvn:xml-apis/xml-apis/1.4.01</bundle>
<bundle>wrap:mvn:xml-resolver/xml-resolver/1.2</bundle>
<bundle>mvn:org.slf4j/slf4j-api/1.7.12</bundle>
<bundle>mvn:org.slf4j/slf4j-log4j12/1.7.7</bundle>
</feature>
</features>
feature:install my.feature
bundle:list | grep -i camel
:136 |有效| 50 | 2.16.1 |骆驼核心
137 |有效| 50 | 2.16.1 | 骆驼目录
139 |有效| 50 | 2.16.1 |骆驼JMS
140 |有效| 50 | 2.16.1 |骆驼弹簧 141 |有效| 50 | 2.16.1 | 骆驼蓝图
142 |有效| 50 | 5.12.1 | ActiveMQ的驼
144 |有效| 50 | 6.1.0 |阿帕奇 ServiceMix :: ActiveMQ :: Camel
147 |有效| 80 | 2.16.1 | camelcommands核心
148 |有效| 80 | 2.16.1 |骆驼karaf的命令
234 |有效| 50 | 2.16.1 | 骆驼CXF运输
235 |有效| 50 | 2.16.1 |骆驼CXF
/deploy
文件夹bundle:list | grep - i camel
136 |有效| 50 | 2.16.1 |骆驼核心
137 |有效| 50 | 2.16.1 | 骆驼目录
139 |有效| 50 | 2.16.1 |骆驼JMS
140 |有效| 50 | 2.16.1 |骆驼弹簧 141 |有效| 50 | 2.16.1 | 骆驼蓝图
142 |有效| 50 | 5.12.1 | ActiveMQ的驼
144 |有效| 50 | 6.1.0 |阿帕奇 ServiceMix :: ActiveMQ :: Camel
234 |有效| 50 | 2.16.1
| camel-cxf-transport 235 |有效| 50 | 2.16.1 |骆驼CXF
我们可以看到 camel-commands-core 和 camel-karaf-commands 捆绑包也已被删除。
servicemix.log:
2016-03-04 10:11:54,164 | INFO | l for user karaf | FeaturesServiceImpl | 20 - org.apache.karaf.features.core - 3.0.5 | Installing feature my.feature 0.0.1-SNAPSHOT
2016-03-04 10:11:54,165 | WARN | l for user karaf | AetherBasedResolver | 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.4 | interval1: null, interval2: daily
2016-03-04 10:11:54,165 | WARN | l for user karaf | AetherBasedResolver | 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.4 | interval1: null, interval2: daily
2016-03-04 10:11:54,165 | WARN | l for user karaf | AetherBasedResolver | 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.4 | interval1: daily, interval2: daily
2016-03-04 10:11:54,165 | WARN | l for user karaf | AetherBasedResolver | 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.4 | interval1: daily, interval2: daily
2016-03-04 10:11:54,165 | WARN | l for user karaf | AetherBasedResolver | 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.4 | interval1: daily, interval2: daily
2016-03-04 10:11:54,165 | WARN | l for user karaf | AetherBasedResolver | 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.4 | interval1: daily, interval2: daily
...
2016-03-04 10:11:54,794 | INFO | l for user karaf | FeaturesServiceImpl | 20 - org.apache.karaf.features.core - 3.0.5 | Found installed feature camel-core-condition-shell_0_0_0 2.16.1
2016-03-04 10:15:28,584 | INFO | mix-6.1.0/deploy | fileinstall | 7 - org.apache.felix.fileinstall - 3.5.0 | Uninstalling bundle 272 (feature.xml)
2016-03-04 10:15:56,846 | INFO | lixDispatchQueue | FeaturesServiceImpl | 20 - org.apache.karaf.features.core - 3.0.5 | Uninstalling feature my.feature 0.0.1-SNAPSHOT
2016-03-04 10:15:56,849 | INFO | lixDispatchQueue | FeaturesServiceImpl | 20 - org.apache.karaf.features.core - 3.0.5 | Uninstalling feature camel-core-condition-shell_0_0_0 2.16.1
2016-03-04 10:15:56,875 | INFO | lixDispatchQueue | BlueprintExtender | 15 - org.apache.aries.blueprint.core - 1.4.4 | Destroying BlueprintContainer for bundle org.apache.camel.karaf.camel-karaf-commands/2.16.1
你知道为什么这些骆驼束会被移除吗?