Skip to content

Instantly share code, notes, and snippets.

@vegetableman
Created February 24, 2012 23:59
Show Gist options
  • Save vegetableman/1904725 to your computer and use it in GitHub Desktop.
Save vegetableman/1904725 to your computer and use it in GitHub Desktop.
scp with groovy and ant
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