我正在使用一个自定义的特性文件在我的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
即使我删除了功能url,捆绑包也不会发生任何变化。当我卸载我的自定义功能时,我希望所有的功能/包都从karaf中删除。有没有人能告诉我是不是漏掉了什么?我使用的是Fuse 6.3GA。
发布于 2018-01-10 21:40:14
不幸的是,feature:uninstall命令只卸载目标特性,而不是特性依赖项。
您的解决方案是列出您想要卸载的所有功能。例如:
features:uninstall example-features-myFeature camel-http jndi jdbc camel-sql
还有另一个问题,如果一个功能没有被其他功能使用,它可以自己卸载。
发布于 2018-01-11 16:37:32
feature:uninstall命令应该删除所有包,包括依赖项。好像有个bug。解决方法如下:
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这样,feature:uninstall example-features-myFeature就可以工作了。
实际的问题是,jdbc特性有两个先决条件,它们以某种方式将内部状态搞乱了一点。之前安装jdbc功能似乎解决了这个问题。请提出一个JIRA,以便修复此问题。
https://stackoverflow.com/questions/48181546
复制相似问题