e.msidor.maven.plugins.groovy2ssh-maven-plugin.1.0.0.source-code.hello.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of groovy2ssh-maven-plugin Show documentation
Show all versions of groovy2ssh-maven-plugin Show documentation
Maven plugin that allows to execute shell commands via groovy script on remote host through ssh connection.
This is basically only the maven plugin wrapper for com.googlecode.msidor.groovy2ssh library whereas the SSH connection is handled by JSCH library.
println "Starting script"
outputLine = '';
while ((outputLine = os.readBuffer()) != '$')
{
print outputLine;
}
print outputLine;
is.sendCommand("ls\n");
while ((outputLine = os.readBuffer()) != '$')
{
print outputLine;
}
print outputLine;
println
println "Ending script"