사용자 도구

사이트 도구


gradle:ssh

문서의 이전 판입니다!


Gradle SSH

Ant sshexec, scp

* Ant SCP

configurations {
    sshAntTask
}
 
dependencies {
    sshAntTask 'org.apache.ant:ant-jsch:1.9.4', 'com.jcraft:jsch:0.1.51'
}
 
ant.taskdef(name: 'scp',
        classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp',
        classpath: configurations.sshAntTask.asPath)
 
ant.taskdef(name: 'sshexec',
        classname: 'org.apache.tools.ant.taskdefs.optional.ssh.SSHExec',
        classpath: configurations.sshAntTask.asPath)
 
// SCP
ant.scp(file: "file-to-transfer.zip",
    todir: 'kwon37xi@hostname:/home/kwon37xi/dir',
    keyfile: "/home/kwon37xi/.ssh/id_rsa",
    passphrase: 'passphrase',
    verbose: true)
gradle/ssh.1403862993.txt.gz · 마지막으로 수정됨: 2014/06/27 18:56 저자 kwon37xi