我正在尝试使用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(并增加登录调用等...)
谢谢!