Created
February 24, 2012 23:59
-
-
Save vegetableman/1904725 to your computer and use it in GitHub Desktop.
scp with groovy and ant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.util.AntBuilder; | |
import groovy.grape.Grape | |
Grape.grab(group:"org.apache.ant", module:"ant-jsch", version:"1.8.1", classLoader:this.class.classLoader.rootLoader) | |
Grape.grab(group:"com.jcraft", module:"jsch", version:"0.1.42", classLoader:this.class.classLoader.rootLoader) | |
def ant = new AntBuilder(); | |
ant.scp( | |
trust:"true", | |
file:"vignesh@localhost:/home/vignesh/Documents/files/file.txt", | |
todir:"/home/vignesh/Documents", | |
password:"toor", | |
verbose:true, | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment