[英]How to use Artifactory REST API to deploy new artifact using Groovy HttpBuilder?
http://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-DeployArtifact describes the REST API as: http://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-DeployArtifact将REST API描述为:
PUT /libs-release-local/my/jar/1.0/jar-1.0.jar
{
"uri": "http://localhost:8080/artifactory/libs-release-local/my/jar/1.0/jar-1.0.jar",
"downloadUri": "http://localhost:8080/artifactory/libs-release-local/my/jar/1.0/jar-1.0.jar",
"repo": "libs-release-local",
"path": "/my/jar/1.0/jar-1.0.jar",
"created": ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ),
"createdBy": "userY",
"size": "1024", //bytes
"mimeType": "application/java-archive",
"checksums":
{
"md5" : string,
"sha1" : string
},
"originalChecksums":{
"md5" : string,
"sha1" : string
}
}
How does one provide the contents of the file when using Groovy's HttpBuilder? 使用Groovy的HttpBuilder时如何提供文件内容?
If you need to interact with Artifactory from Java (or Groovy for that matter), I suggest using Artifactory Java client . 如果您需要与Java的Artifactory交互(或者与Groovy交互),建议您使用Artifactory Java客户端 。
If it misses some features you need, please let us know, we'll be glad to implement them. 如果它缺少您需要的某些功能,请告诉我们,我们将很高兴实现它们。
If you still prefer to do it by yourself, take a look at the sources, that's exactly what we do. 如果您仍然喜欢自己做,请查看源,这就是我们所做的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.