Executing remote script via ant

Following ant build script to help you to execute command in remote server.

<?xml version="1.0"?>
    <project basedir="." default = "build">
        <target name="build" description="Running test" >
            <path id="jsch.class.path">    
                <pathelement location="/usr/share/ant/lib/ant-jsch-1.9.2.jar" />
                <pathelement location="/usr/share/ant/lib/jsch-0.1.51.jar" />
            </path>
            <taskdef name="scp" classname="org.apache.tools.ant.taskdefs.optional.ssh.Scp"...