Uploading to an ivy repository via SSH has been deprecated in Gradle 1.8

Upgrading to Gradle 1.8 gives following warning: “The ArtifactRepositoryContainer.add(DependencyResolver, Closure) method has been deprecated and is scheduled to be removed in Gradle 2.0.” - don’t know how to add Ivy SSH publisher (type org.apache.ivy.plugins.resolver.SshResolver) to repositories.

Currently I’m adding this SSH resolver to the repositories the artifact should get published to like so:

uploadArchives {

repositories {

add( new org.apache.ivy.plugins.resolver.SshResolver() ) {

name = ‘publish-repository’

host = ‘some.host’

user = ‘some.user’

keyFile = someKeyFile

keyFilePassword = ‘key.file.password’

checksums = ‘sha1, md5’

addIvyPattern ‘~/ivy-repository/[organisation]/[module]/[revision]/ivy.xml’

addArtifactPattern ‘~/ivy-repository/[organisation]/[module]/[revision]/artifact.[ext]’

}

} }

In Gradle 1.8, all direct use of Ivy DependencyResolver implementations has been deprecated. We’ve done this as part of our early preparations for Gradle 2.0.

Unfortunately, resolving and publishing via SSH is one use case that does not yet have a non-deprecated replacement. This is something we’ll need to tackle in the lead up to Gradle 2.0.

(One reason for early deprecation is to discover what use cases currently require the use of a direct Ivy DependencyResolver, through user reports such as this. Thanks.)

I’ve raised GRADLE-2910 to track this issue. Thanks for the report.

Hi Daz,

thanks for your immediate reply and clarification.

Christian

This would make an excellent community contribution, if anyone is interested

I’m interested in ivy interaction via sftp as my org is stuck pre 2.0. The “solved” status on this post and 2910 lead me to believe this was done, but the source is still focused on password credentials. Hopefully the work to get S3 support will open things up to make it easier to contribute other auth types.