Skip to content

Instantly share code, notes, and snippets.

@yurfuwa-chan
Created January 27, 2012 09:44
Show Gist options
  • Save yurfuwa-chan/1688006 to your computer and use it in GitHub Desktop.
Save yurfuwa-chan/1688006 to your computer and use it in GitHub Desktop.
ssh for ant task
<project basedir="." default="svnup">
<property name="lib.dir" value="/usr/share/java/ant-1.8.2/lib" />
<path id="jsch.path">
<pathelement location="${lib.dir}/ant-jsch-1.6.2.jar" />
<pathelement location="${lib.dir}/jsch-0.1.45.jar" />
</path>
<taskdef name="sshexec" classname="org.apache.tools.ant.taskdefs.optional.ssh.SSHExec" classpathref="jsch.path" />
<target name="svnup">
<sshexec host="" username="" password="" command="" />
<echo message="svn updated" />
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment