Given this api deploy
http://wiki.jfrog.org/confluence/display/RTF/Artifactory's+REST+API#Artifactory%27sRESTAPI-DeployArtifact
 
documentation , how would I use HTTPBuilder and Groovy to construct my
query? I've tried multiple things but I'm not getting it right.


def http = new HTTPBuilder()
http.request('http://artifactory:8888/libs-snapshot-local/my/jar/1.0/test-jar-1.0.jar',
PUT, JSON ) { req ->

        body = [
            uri:
"http://artifactory:8888/libs-snapshot-local/my/jar/1.0/test-jar-1.0.jar";,
            downloadUri:
"http://artifactory:8888/libs-snapshot-local/my/jar/1.0/test-jar-1.0.jar";,
            repo: "libs-snapshot-local",
            path: "c:\\pathtojarfile\\test.jar",
            created: "2012-02-03T08:37:12.599-0800",
            createdBy: "someuser",
            size: "1024",
            mimeType: "application/java-archive"

        ]

    response.success = { resp, json ->


    }

  }


This seems to get me part way there, but it uploads an empty jar file. Seems
like the body is completely ignored. Removing it produces the same result. I
can't seem to find a good reference on how this is done.


--
View this message in context: 
http://forums.jfrog.org/Using-Artifactory-s-REST-API-and-Groovy-Gradle-to-deploy-jar-file-tp7271186p7271186.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to