本文介绍了如何将Stash用作Gradle项目的Maven远程存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何引用托管于?以下是我在根目录 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在他的文章中描述了一个设置:


  • (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:

解决方案

Jeroen Mols describes a setup in his article:

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远程存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 22:41