Github Maven软件包在ORG中找不到

我正在尝试使用Github软件包作为Maven存储库。

当我直接指向这样的仓库时:

repositories {
    maven {
        url = uri("https://maven.pkg.github.com/ORG/REPO")
        credentials {
            username = 'some-user'
            password = 'github-token-with-repo-scope'
        }
    }
}

并像这样拉出依赖项:

dependencies{
    implementation 'groupId:artifcatId:1.0.0-snapshot'
}

有效。

但是如果我不想将Maven网址限制为特定的repo,而直接使用ORG网址

url = uri("https://maven.pkg.github.com/ORG')

找不到相同的artifcat话:

Could not find groupId:artifcatId:1.0.0-snapshot.

我尝试将REPO名称添加到依赖项声明中

dependencies{
    implementation 'REPO:groupId:artifcatId:1.0.0-snapshot'
}

它仍然无法正常工作。

任何人都知道如何将ORG url用作MAVEN REPOSITORY,而不是向每个repo添加多个url(并增加登录调用等...)

谢谢!

CHGXING 回答:Github Maven软件包在ORG中找不到

我从 github 支持那里得到了一个答案,他们已经解决了这个问题:)

嗨,马克, 很抱歉延迟回复您!我一直在处理一些被搁置的票。

此问题现已修复!

您不能使用 https://maven.pkg.github.com/ORG,但您可以将以下 URL 用于普通和 SNAPSHOT 版本。

url = uri("https://maven.pkg.github.com/ORG/*")

我们希望允许 https://maven.pkg.github.com/ORG,但无法区分 groupId 和 repo 名称

问候, 杰米。

附言感谢杰米的更新:)

本文链接:https://www.f2er.com/2711051.html

大家都在问