我有JBoss Fuse問題重新分配哪個maven倉庫來搜索示例項目工件。我終於固定它,它現在顯示以下錯誤..jboss fuse java.io.IOException:解決神器com錯誤:mycompany:1.0.0-SNAPSHOT:camel-activemq-blueprint:
Caused by: org.osgi.framework.BundleException: Unable to cache bundle: mvn:com/mycompany/camel-activemq-blueprint/1.0.0-SNAPSHOT
at org.apache.felix.framework.Felix.installBundle(Felix.java:2878)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:43)
... 18 more
Caused by: java.io.IOException: Error resolving artifact com:mycompany:1.0.0-SNAPSHOT:camel-activemq-blueprint: Could not find artifact com:mycompany:1.0.0-SNAPSHOT:camel-activemq-blueprint
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:661)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:598)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:576)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:550)
at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123)
at org.apache.felix.framework.util.SecureAction.getURLConnectionInputStream(SecureAction.java:524)
at org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:166)
at org.apache.felix.framework.cache.JarRevision.(JarRevision.java:77)
at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)
at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
at org.apache.felix.framework.cache.BundleArchive.(BundleArchive.java:153)
at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
at org.apache.felix.framework.Felix.installBundle(Felix.java:2874)
... 20 more
它曾表示,它正在考慮repo.maven.org的神器和失敗之前,我在org.ops4j.pax.url糾正它etc文件夾中的.mvn.cfg文件。我還注意到,如果我做了「runAs/maven clean」,然後是「runAS/maven install」,它會更新一個名爲repository.xml的文件,放在C:/ maven/repository中(這是我的maven工件去的地方局部地)
的的repository.xml是如下:
<repository lastmodified='20161024030208.517'>
<resource id='camel-route-cbr/1.0.0.SNAPSHOT' symbolicname='camel-route-cbr' presentationname='Camel AMQ Example using Blueprint [camel-route-cbr]' uri='com/mycompany/camel-activemq-blueprint/1.0.0-SNAPSHOT/camel-activemq-blueprint-1.0.0-SNAPSHOT.jar' version='1.0.0.SNAPSHOT'>
<description>Camel AMQ Example using Blueprint</description>
<size>10088</size>
<capability name='bundle'>
<p n='symbolicname' v='camel-route-cbr'/>
<p n='presentationname' v='Camel AMQ Example using Blueprint [camel-route-cbr]'/>
<p n='version' t='version' v='1.0.0.SNAPSHOT'/>
<p n='manifestversion' v='2'/>
</capability>
<capability name='package'>
<p n='package' v='com.mycompany.templates.camel.activemq'/>
<p n='version' t='version' v='1.0.0'/>
<p n='uses:' v='org.apache.camel'/>
</capability>
<require name='package' filter='(&(package=org.apache.activemq.camel.component)(version>=5.11.0)(!(version>=6.0.0)))' extend='false' multiple='false' optional='false'>Import package org.apache.activemq.camel.component;version="[5.11,6)"</require>
<require name='package' filter='(&(package=org.apache.camel)(version>=2.17.0)(!(version>=3.0.0)))' extend='false' multiple='false' optional='false'>Import package org.apache.camel;version="[2.17,3)"</require>
<require name='package' filter='(&(package=org.apache.camel.spi)(version>=2.17.0)(!(version>=3.0.0)))' extend='false' multiple='false' optional='false'>Import package org.apache.camel.spi;version="[2.17,3)" </require>
<require name='package' filter='(&(package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0)))' extend='false' multiple='false' optional='false'>Import package org.osgi.service.blueprint;version="[1.0.0,2.0.0)"</require>
</resource>
</repository>
的用戶// 2/settings.xml中已經指向正確的本地的倉庫位置。
如何過,當我去到本地主機:8181至保險絲終端輸入了
的OSGi:安裝-s MVN:COM/myCompany中/駱駝的ActiveMQ-藍圖/ 1.0.0-SNAPSHOT
它拋出上面的錯誤。保險絲錯誤日誌先前建議,安裝命令必須提供類似的路徑:
的OSGi:安裝-s MVN:![倉庫]組ID]/[神器-ID]/[版本]
我試圖傳遞[repository!]部分,但是當我通過它時,它不喜歡它。
我究竟做錯了什麼?
編輯:我剛剛發現了一些......有效POM的駱駝版本是從它的駱駝核心版本不同...
<properties>
<jboss.fuse.bom.version>6.3.0.redhat-187</jboss.fuse.bom.version>
<maven-bundle-plugin.version>3.2.0</maven-bundle-plugin.version>
<java.version>1.8</java.version>
<maven-resources-plugin.version>3.0.1</maven-resources-plugin.version>
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
<maven-clean-plugin.version>3.0.0</maven-clean-plugin.version>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<camel.version>2.15.1.redhat-621084</camel.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
<version>2.17.0.redhat-630187</version>
</dependency>
我以前發現保險絲容器這個駱駝束對什麼是在項目POM中可能會導致問題。我應該糾正這一點,如果是的話,怎麼樣?