找不到命令:dev:watch

Command not found: dev:watch

根据Karaf 3.0.3 user guidedev:watch命令:

The following command:

  karaf@root> dev:watch *

will monitore all bundles that have a location matching mvn:* and having '-SNAPSHOT' in their URL.

当我输入 dev:watch * 时,出现此错误:

Command not found: dev:watch

该命令在3.0.0 change log的一些问题中仍然提到,但在以后的版本中没有提到。它是否已被删除,是否有替代命令或任何类似功能来更新快照包?

它尝试了 bundle:watch * 但出现以下异常:

karaf@root()> Exception in thread "Thread-32" java.lang.NoClassDefFoundError: org/apache/karaf/util/maven/Parser
        at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.getBundleExternalLocation(BundleWatcherImpl.java:195)
        at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.updateBundleIfNecessary(BundleWatcherImpl.java:144)
        at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.run(BundleWatcherImpl.java:100)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.karaf.util.maven.Parser not found by org.apache.karaf.bundle.core [31]
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
        at org.apache.felix.framework.BundleWiringImpl.access0(BundleWiringImpl.java:75)
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 4 more

命令已重命名为 bundle:watch。参见 developer commands