我正在使用自定义功能文件在我的karaf中部署多个功能和捆绑包。
我的feature.xml文件看起来像这样
<?xml version="1.0" encoding="UTF-8"?>
<features name="MyFeaturesRepo">
<feature name="example-features-myFeature">
<feature>activemq-camel</feature>
<feature>hawtio</feature>
<feature>cxf</feature>
<feature>camel-sql</feature>
<feature>jdbc</feature>
<feature>jndi</feature>
<feature>camel-http</feature>
<bundle>wrap:mvn:commons-dbcp/commons-dbcp/1.4</bundle>
<bundle>wrap:mvn:org.xerial/sqlite-jdbc/3.8.7</bundle>
<bundle>wrap:mvn:dom4j/dom4j/1.6.1</bundle>
<bundle>wrap:mvn:jaxen/jaxen/1.1.6</bundle>
</feature>
</features>
我使用以下命令安装该功能:
`features:addurl file:D:/Softwares/jboss-fuse-6.3.0.redhat-187/MySampleFeatures.xml`
`features:install example-features-myFeature`
我的捆绑包和功能安装在karaf中但是当我卸载相同的功能时,我没有任何反应。所有捆绑包都处于活动/创建状态。
features:uninstall example-features-myFeature
即使我删除了功能网址,捆绑也没有任何问题。 我希望在卸载自定义功能时从karaf中删除所有功能/包。有人能说出我在这里遗失了什么吗? 我使用的是Fuse 6.3GA。
答案 0 :(得分:1)
不幸的是feature:uninstall
命令只卸载目标功能,而不是功能依赖项。
您的解决方案是列出要卸载的所有功能。例如:
features:uninstall example-features-myFeature camel-http jndi jdbc camel-sql
还有另一个问题,如果其他功能没有使用,则可以自行卸载某个功能。
答案 1 :(得分:1)
The feature:uninstall
command should remove all your bundles, including the dependencies. It seems there's a bug. A workaround is the following:
feature:repo-add enterprise
feature:repo-add hawtio
feature:repo-add activemq
feature:repo-add camel
feature:repo-add spring-legacy
feature:repo-add file:test.xml
feature:install wrap jdbc shell-compat
feature:install example-features-myFeature
That way, the feature:uninstall example-features-myFeature
will work.
The actual problem is that the jdbc
feature has 2 prerequisites and they somehow mess the internal state a bit. Installing the jdbc
feature before seems to work around the problem.
Please raise a JIRA so that this issue can be fixed.