rest - Web/Rest Api 获取 java 依赖元数据
问题描述
我正在寻找一些提供有关 java 库的元数据信息的 REST Api。
我的目标是自动化 3rd 方依赖项审批流程。我需要以下有关 java jar 的元数据:
- 执照
- 版权
- 主页网址
- 官方仓库 url(这部分不是必需的)
我正在研究 Sonatype RepoManager Rest 但它没有返回此类信息
GET /service/rest/v1/components/{id}
{
"id" : "bWF2ZW4tY2VudHJhbDo4ODQ5MWNkMWQxODVkZDEzNjYwYmUwMjE1MjI2NGUwZQ",
"repository" : "maven-central",
"format" : "maven2",
"group" : "org.apache.httpcomponents",
"name" : "httpcomponents-client",
"version" : "4.3.5",
"assets" : [ {
"downloadUrl" : "http://localhost:8081/repository/maven-central/org/apache/httpcomponents/httpcomponents-client/4.3.5/httpcomponents-client-4.3.5.pom",
"path" : "org/apache/httpcomponents/httpcomponents-client/4.3.5/httpcomponents-client-4.3.5.pom",
"id" : "bWF2ZW4tY2VudHJhbDozZjVjYWUwMTc2MDIzM2I2YTFhOGUxOGQxZmFkOGM3Mw",
"repository" : "maven-central",
"format" : "maven2",
"checksum" : {
"sha1" : "95d80a44673358a5dcbcc2f510770b9f93fe5eba",
"md5" : "f4769c4e60799ede664414c26c6c5c9d"
}
}, {
"downloadUrl" : "http://localhost:8081/repository/maven-central/org/apache/httpcomponents/httpcomponents-client/4.3.5/httpcomponents-client-4.3.5.pom.sha1",
"path" : "org/apache/httpcomponents/httpcomponents-client/4.3.5/httpcomponents-client-4.3.5.pom.sha1",
"id" : "bWF2ZW4tY2VudHJhbDpmODk4YjM5MDNjYjk5YzU5ZDU3YjFlYjE0MzM1ZTcwMQ",
"repository" : "maven-central",
"format" : "maven2",
"checksum" : {
"sha1" : "6b98f5cef5d7102f8f45215bdcf48dc843d060af",
"md5" : "f3b3ac640853fcb887621d13029a1747"
}
} ]
}
那么,有没有一种简单的方法来获取依赖元数据?
解决方案
推荐阅读
- typescript - 如何在打字稿中键入数字数组的数组?
- java - JGit 通过 .git-file 连接到单独的 git 存储库
- c# - 如何根据第一列的选择计算使用 CSV 中的项目?
- google-cloud-platform - GCP:将防火墙规则限制为一组 IP
- angular - Angular - 如何在 jasmin 中编写测试 true 或 false - 错误类型的参数不可分配给预期类型的参数
- javascript - 如何更新/更改本地存储中的值?
- python - 选项卡 kivy/KivyMD 中的 ScrollView
- google-app-engine - Google Cloud App Engine HTTP 请求可以有多个“响应”吗?
- ransack - 忽略 Ransack 搜索中的特定参数,但保留在搜索表单中
- android - 由于 icon_tree_shaker,Flutter 无法在 Android 上构建