From 98108d26940db94bdeb7b8669ee6d661c2f11a35 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Sun, 22 Aug 2010 22:41:41 +0100 Subject: [PATCH] Add support for ant.scp to TarUpload task. --- buildSrc/src/main/groovy/TarUpload.groovy | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/buildSrc/src/main/groovy/TarUpload.groovy b/buildSrc/src/main/groovy/TarUpload.groovy index 62480536f2..e1f4126a69 100644 --- a/buildSrc/src/main/groovy/TarUpload.groovy +++ b/buildSrc/src/main/groovy/TarUpload.groovy @@ -16,6 +16,17 @@ class TarUpload extends Tar { TarUpload() { compression = Compression.BZIP2 + if (project.configurations.findByName('antjsch') == null) { + project.configurations.add('antjsch') + project.dependencies { + antjsch 'org.apache.ant:ant-jsch:1.8.1' + } + def classpath = project.configurations.antjsch.asPath + project.ant { + taskdef(name: 'scp', classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp', classpath: classpath) + taskdef(name: 'sshexec', classname: 'org.apache.tools.ant.taskdefs.optional.ssh.SSHExec', classpath: classpath) + } + } } @TaskAction