Reputation: 447
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!
Upvotes: 1
Views: 630
Reputation: 447
I got an answer from github support that they have fixed that issue :)
Hi Mark, Sorry about the delay in getting back to you! I've been working through some tickets that were left on-hold.
This issue has now been fixed!
You can't use https://maven.pkg.github.com/ORG, but you can use the following URL for normal and SNAPSHOT versions.
url = uri("https://maven.pkg.github.com/ORG/*")
We'd like to have allowed https://maven.pkg.github.com/ORG, but there would have been no way to distinguish between the groupId and repo name
Regards, Jamie.
P.S. Thanks to Jamie for the update :)
Upvotes: 2