0

I'm trying to use Github packages as a maven repository.

When I point directly to a repo like this :

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

And pulling the dependency like this:

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

It works.

But if I don't want to limit maven url to specific repo , and use ORG url directly

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

It won't find the same artifcat saying:

Could not find groupId:artifcatId:1.0.0-snapshot.

I have tried adding REPO name to dependency declaration

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

It still wont work.

Anyone has a clue how to use ORG url as a MAVEN REPOSITORY , instead of adding multiple urls to each repo (and multiplying the login calls etc... )

Thanks!

4

1 回答 1

0

我从 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 名称

问候,杰米。

PS感谢杰米的更新:)

于 2021-02-10T13:17:28.787 回答