有没有办法将安全的 Nexus 存储库作为功能存储库添加到 Apache Karaf?
我尝试运行命令:
karaf@root()> feature:repo-add http://<user>:<password>@<my-repository>
但我收到以下错误:
Adding feature url http://<user>:<password>@<my-repository> Error executing command: Server returned HTTP response code: 401 for URL: http://<user>:<password>@<my-repository>
我正在使用 Apache Karaf 3.0.0。
谢谢, 米凯尔
最佳答案
解决方案很简单。
在运行 Karaf 的服务器上安装 Maven 并进行配置。通常,您将通过 ~/.m2
中的 settings.xml
文件进行配置。文件中指示了用于访问 Nexus 存储库的凭据。
最后,不要使用 HTTP URL 来引用您的功能,而是使用以下形式的 Maven URL:
mvn:<groupId>/<artifactId>/<version>/xml/features
该功能将通过 Maven 解决。
关于java - 使用 Nexus 作为功能存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22629744/