如何将Stash用作Gradle项目的Maven远程存储库? [英] How to use Stash as a Maven remote repository for a Gradle project?
问题描述
如何引用托管于上的自定义远程 Maven存储库隐藏(又名Bitbucket服务器)?以下是我在根目录 build.gradle
中试过的内容:
allprojects {
存储库{
jcenter()
maven {
//此存储路径不起作用
urlhttps://存储.company.lan / projects / AP / repos / internal-repository
}
maven {
//此GitHub路径正常工作
urlhttps://github.com / user / mvn-repo / tree / master
}
}
}
我无法弄清Stash的 raw 文件夹结构的正确路径,所以Gradle可以理解。当我引用存储在存储库中的库时,会引发以下错误:
错误:原因:无法找到所需目标的有效证书路径
Jeroen Mols在他的文章中描述了一个设置:
- Git作为安全的私有Maven存储库(05.02.2016)
我还没有尝试过,因为我决定安装本地的 Nexus 实例。如果它适合你,请在这里评论。
How can I reference a custom remote Maven repository which is hosted on Stash (aka. Bitbucket Server)? Here is what I tried in the root build.gradle
:
allprojects {
repositories {
jcenter()
maven {
// This Stash path does not work
url "https://stash.company.lan/projects/AP/repos/internal-repository"
}
maven {
// This GitHub path works fine
url "https://github.com/user/mvn-repo/tree/master"
}
}
}
I cannot figure out the correct path to the raw folder structure for Stash so Gradle understands. When I reference a library stored in the repository the following error is thrown:
Error:Cause: unable to find valid certification path to requested target
Jeroen Mols describes a setup in his article:
- Git as a secure private Maven repository (05.02.2016)
I have not tried it yet since I decided to install a local Nexus instance meanwhile. Please comment here if it worked for you.
这篇关于如何将Stash用作Gradle项目的Maven远程存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!