我有自定义karaf安装。我想做一个功能:安装odl-restconf。 为此,我已经完成了一项功能:在以下位置https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/controller/features-restconf/1.3.0-SNAPSHOT/重新添加功能文件 在此之后,我在karaf org.ops4j.pax.url.mvn.cfg文件中输入了条目并添加了以下url作为maven repo的一部分 http://nexus.opendaylight.org/content/repositories@id=public,\ http://nexus.opendaylight.org/content/repositories@id=opendaylight.snapshot,\
执行功能时:安装它不会检查此网址。它试图从其他位置下载它。
2016-02-27 21:21:19,451 | INFO | nsole user karaf | FeaturesServiceImpl | 9 - org.apache.karaf.features.core - 4.0.3 | Adding features: odl-restconf/[1.3.0.SNAPSHOT,1.3.0.SNAPSHOT]
2016-02-27 21:21:27,754 | WARN | ool-146-thread-1 | AetherBasedResolver | 5 - org.ops4j.pax.logging.pax-logging-api - 1.8.4 | Error resolving artifactorg.opendaylight.controller:sal-rest-connector:jar:1.3.0-SNAPSHOT:Could not find artifact org.opendaylight.controller:sal-rest-connector:jar:1.3.0-SNAPSHOT in apache (http://repository.apache.org/content/groups/snapshots-group/)
shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.opendaylight.controller:sal-rest-connector:jar:1.3.0-SNAPSHOT in apache (http://repository.apache.org/content/groups/snapshots-group/)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:573)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:528)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:506)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:481)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.apache.karaf.features.internal.download.impl.MavenDownloadTask.download(MavenDownloadTask.java:34)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:58)[9:org.apache.karaf.features.core:4.0.3]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_79]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_79]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]
Caused by: shaded.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.opendaylight.controller:sal-rest-connector:jar:1.3.0-SNAPSHOT in apache (http://repository.apache.org/content/groups/snapshots-group/)
at shaded.org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)[4:org.ops4j.pax.url.mvn:2.4.3]
... 16 more
2016-02-27 21:21:49,757 | WARN | ool-146-thread-1 | AetherBasedResolver | 5 - org.ops4j.pax.logging.pax-logging-api - 1.8.4 | Error resolving artifactorg.opendaylight.controller:sal-rest-connector:jar:1.3.0-SNAPSHOT:Could not find artifact org.opendaylight.controller:sal-rest-connector:jar:1.3.0-SNAPSHOT in apache (http://repository.apache.org/content/groups/snapshots-group/)
shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.opendaylight.controller:sal-rest-connector:jar:1.3.0-SNAPSHOT in apache (http://repository.apache.org/content/groups/snapshots-group/)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:573)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:528)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:506)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:481)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.apache.karaf.features.internal.download.impl.MavenDownloadTask.download(MavenDownloadTask.java:34)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:58)[9:org.apache.karaf.features.core:4.0.3]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_79]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_79]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]
Caused by: shaded.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.opendaylight.controller:sal-rest-connector:jar:1.3.0-SNAPSHOT in apache (http://repository.apache.org/content/groups/snapshots-group/)
at shaded.org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)[4:org.ops4j.pax.url.mvn:2.4.3]
... 16 more
2016-02-27 21:22:11,340 | WARN | ool-146-thread-1 | AetherBasedResolver | 5 - org.ops4j.pax.logging.pax-logging-api - 1.8.4 | Error resolving artifactorg.opendaylight.controller:sal-rest-connector:jar:1.3.0-SNAPSHOT:Could not find artifact org.opendaylight.controller:sal-rest-connector:jar:1.3.0-SNAPSHOT in apache (http://repository.apache.org/content/groups/snapshots-group/)
shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.opendaylight.controller:sal-rest-connector:jar:1.3.0-SNAPSHOT in apache (http://repository.apache.org/content/groups/snapshots-group/)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:573)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:528)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:506)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:481)[4:org.ops4j.pax.url.mvn:2.4.3]
at org.apache.karaf.features.internal.download.impl.MavenDownloadTask.download(MavenDownloadTask.java:34)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:58)[9:org.apache.karaf.features.core:4.0.3]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_79]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_79]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]
Caused by: shaded.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.opendaylight.controller:sal-rest-connector:jar:1.3.0-SNAPSHOT in apache (http://repository.apache.org/content/groups/snapshots-group/)
at shaded.org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)[4:org.ops4j.pax.url.mvn:2.4.3]
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)[4:org.ops4j.pax.url.mvn:2.4.3]
... 16 more
我的目标是安装odl-restconf,如果有其他方式请告诉我。
答案 0 :(得分:2)
要声明快照存储库,您应该添加@snapshots
(不会考虑示例中的.snapshot
以确定存储库是否可以包含快照):
http://nexus.opendaylight.org/content/repositories@id=public, \
http://nexus.opendaylight.org/content/repositories@id=opendaylight@snapshots, \