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
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'
addIvyPattern
"/xxxserver/ivy-repo/[organisation]/[module]/ivys/ivy-[revision].xml"
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
}
}
Thanks. I got it working with this (actually using sftp)
This answer is over 2 years old, is this still the best way to configure ssh upload for a remote ivy repository?