我需要以非交互方式发出 Karaf shell 命令,最好是从脚本中发出。更具体地说,我需要以feature:install
自动化的方式告诉 Karaf 一组特性。
# Attempt to install a feature in a way I could script
bash> bin/karaf feature:install myFeature
# Drops me into Karaf shell
karaf> feature:uninstall myFeature
Error executing command: Feature named 'myFeature' is not installed
# Feature wasn't installed
这可能吗?是否有其他方法可以解决我缺少的这个问题(自动安装一组 Karaf 功能)?