今天在karaf利用features发布bundle,它不在本地仓库寻找bundle(项目开发的),而去中心仓库寻找,
结果出现如下异常信息:
java.io.IOException: Error resolving artifact
com.xxxx.xxxx:logmgr:jar:1.0.0-SNAPSHOT: Could not transfer artifact com.xxxx.xxxx:logmgr:jar:1.0.0-SNAPSHOT
from/to central (http://repo1.maven.org/maven2/):
Error transferring file: repo1.maven.org
一直困扰了整个下午,终于在晚上找到解决办法
解决办法:
karaf_home/etc/org.ops4j.pax.url.mvn.cfg文件中添加,如下:
org.ops4j.pax.url.mvn.localRepository=D:/mvnrepos
注:
D:/mvnrepos为maven的settings中<localRepository>D:/mvnrepos</localRepository>所配置的本地仓库路径