Tej*_*jas 5 build.gradle github-package-registry
我在 gitHub 包注册表中有一个名为 test.jar(版本:1.0.5)的 jar,存储库名称是 testRepo,所有者名称:tejas3108。
我正在尝试将此 jar 作为依赖项添加到我的其他 gradle 项目中,但是使用正确的凭据,我仍然收到此消息:Could not GET 'https://maven.pkg.github.com/tejas3108/com.tejas/1.0.5/testRepo-1.0.5.pom'. Received status code 422 from server: Unprocessable Entity.
在浏览器中粘贴相同内容会给出消息:maven 文件的路径无效。
我如何成功地将这个 jar 从 github 注册表添加到我的 build.gradle 中?这是我现在所拥有的:
repositories {
mavenCentral()
maven{
url = "https://maven.pkg.github.com/tejas3108"
credentials {
username = "tejas3108"
password = "<my_github_token>"
}
}
}
dependencies {
compile "com.tejas:testRepo:1.0.5"
}
Run Code Online (Sandbox Code Playgroud)
根据文档,该 URL 应包含存储库名称。所以,在你的情况下,写:
url = "https://maven.pkg.github.com/tejas3108/testRepo"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1822 次 |
| 最近记录: |