How to upload to Ivy repository using scp

(Tim Dudgeon) #1

Can someone point me to an example of how to set up uploadArchives to allow things to be uplaoded to an Ivy repository using scp or sftp? I have it working using a file URL, but can’t figure out how to use other prototcols. Thanks Tim

(richard murray) #2

You can use ssh with an SshResolver like this (we do this using gradle-1.0-milestone-3). I’m not sure how about scp or sftp.

repositories {
                     add(new org.apache.ivy.plugins.resolver.SshResolver()) {
         name = 'ivy_repo'
                    user = 'xxxuser'
                  userPassword = 'xxxpasword'
         addArtifactPattern "/xxxserver/ivy-repo/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"
                    host = "xxxhost"
   //upload jar to Ivy repository
uploadArchives {
            repositories {
        add project.repositories.ivy_repo

(Tim Dudgeon) #3

Thanks. I got it working with this (actually using sftp)

(Jason Zwolak) #4

This answer is over 2 years old, is this still the best way to configure ssh upload for a remote ivy repository?