我想在Karaf重启时从maven安装一个包(如果还没有安装)。为此,我将其添加到/etc/startup.properties中,如下所示:
# add here bundles you want to install while system startup, e.g.
# joda-time/joda-time/2.9/joda-time-2.9.jar=10
mvn\:com.fasterxml.jackson.core/jackson-annotations/2.7.4 = 10但是当我尝试开始空手道的时候,我得到了以下例外:-
jabongs-MacBook-Pro-4:apache-servicemix-6.1-2.0 debraj$ bin/servicemix
Please wait while Apache ServiceMix is starting...
Error installing bundle listed in startup.properties with url: mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.4 and startlevel: 10
Exception in thread "main" java.lang.NullPointerException
at org.apache.karaf.main.Main.destroy(Main.java:533)
at org.apache.karaf.main.Main.main(Main.java:173)在Karaf启动后,当我尝试通过下面的命令安装它时,相同的包安装得很好:-
karaf@root>bundle:install mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.4
Bundle ID: 237有人能帮我做以下几件事吗?
startup.properties中安装该包?#2的回答是肯定的,那么在Karaf中是否还有其他地方可以放置包名,以便Karaf每次(如果还没有安装)重新启动时都尝试安装它?环境:-
Karaf 3.0.5Apache Serviemix 6.1.0发布于 2016-05-09 21:43:07
mvn: url解析器可能没有连接。尝试在不使用mvn的情况下添加jar :并确保jar位于系统/文件夹中。
如果这是用于业务代码而不是容器/产品扩展类型代码,那么最好的方法是构建一个特性并将其添加到etc/org.apache.karaf.properties ures.cfg featuresBoot中。
https://stackoverflow.com/questions/37117049
复制相似问题