我正在尝试将示例 OSGI 捆绑包部署到我在 Karaf 中加载的本地 maven 存储库并收到错误
karaf@root> features:addurl mvn:io.spray/on-karaf/1.2-M8
[Fatal Error] :1:1: Content is not allowed in prolog.
Error executing command: Unable to add repositories:
Content is not allowed in prolog.
这是我的features.xml
文件
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="io.spray.examples.karaf">
<feature name="io.spray.examples.karaf" version="1.2-M8">
<bundle>mvn:io.spray/on-karaf/1.2-M8</bundle>
<bundle>mvn:com.typesafe.akka/akka-osgi_2.10/2.2.0-RC2</bundle>
<bundle>mvn:com.typesafe/config/1.0.1</bundle>
<bundle>wrap:mvn:com.chuusai/shapeless_2.10.0-RC5/1.2.3</bundle>
<bundle>mvn:org.parboiled/parboiled-core/1.1.5</bundle>
<bundle>mvn:org.parboiled/parboiled-scala_2.10/1.1.5</bundle>
<bundle>mvn:org.scala-lang/scala-library/2.10.0</bundle>
<bundle>mvn:org.scala-lang/scala-reflect/2.10.0</bundle>
<bundle>mvn:io.spray/spray-util/1.2-M8</bundle>
<bundle>mvn:com.googlecode.concurrentlinkedhashmap/concurrentlinkedhashmap-lru/1.3.2</bundle>
<bundle>mvn:io.spray/spray-caching/1.2-M8</bundle>
<bundle>mvn:io.spray/spray-http/1.2-M8</bundle>
<bundle>mvn:io.spray/spray-io/1.2-M8</bundle>
<bundle>mvn:io.spray/spray-can/1.2-M8</bundle>
<bundle>mvn:org.jvnet.mimepull/mimepull/1.9.2</bundle>
<bundle>mvn:io.spray/spray-httpx/1.2-M8</bundle>
<bundle>mvn:io.spray/spray-routing/1.2-M8</bundle>
<bundle>wrap:mvn:io.spray/spray-json/1.2.5</bundle>
</feature>
</features>
这是MANIFEST.MF
Manifest-Version: 1.0
Implementation-Vendor: io.spray
Implementation-Title: on-karaf
Implementation-Version: 1.2-M8
Implementation-Vendor-Id: io.spray
Specification-Vendor: io.spray
Specification-Title: on-karaf
Implementation-URL: http://spray.io
Specification-Version: 1.2-M8
我认为我的MANIFEST.MF
可能不正确,这可能是原因吗?我是 Karaf、OSGI 和 maven 的新手,所以我可能错过了重要的一步。