我无法让 Karaf 3.0.0-RC1 使用 .m2/settings.xml。这是我在 org.ops4j.pax.url.mvn.cfg 中更改的设置
org.ops4j.pax.url.mvn.proxySupport=true
org.ops4j.pax.url.mvn.disableAether=true
org.ops4j.pax.url.mvn.defaultRepositories= \
http://my-repository.com/nexus/content/groups/my-group@id=my-group@snapshots
在我的 settings.xml 中,我定义了服务器、存储库(与上面相同的值,没有 @id 等)和代理。
在卡拉夫,当我 repo-add mvn:my-repository.com/my-app/0.6.0.SNAPSHOT/xml/features
Adding feature url mvn:my-repository.com/my-app/0.6.0.SNAPSHOT/xml/features
Error executing command: Error resolving artifact
my-repository.com:my-app:xml:features:0.6.0.SNAPSHOT:
Could not find artifact my-repository.com:my-app:xml:features:0.6.0.SNAPSHOT
in defaultlocal (file:/var/karaf/.m2/repository/)
我已经更改了实际的存储库、应用程序名称等,所以请忽略任何拼写错误,它们不应该是相关的。我错过了什么?
在此先感谢您的帮助。
编辑
我也在我的日志中看到了这个,即使我有这个设置,似乎也正在调用以太org.ops4j.pax.url.mvn.disableAether=true
这是日志的片段
org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact my-repository.com:my-app:xml:features:0.6.0.SNAPSHOT in defaultlocal (file:/var/karaf/.m2/repository/)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:250)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolveFile(AetherBasedResolver.java:239)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:223)
at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:122)