By arunraj
Often it may be required to transfer files from Windows to Linux for web application deployment.
It can be configured in ANT build.xml file as follows
<target name="ftpsend">
<ftp action="send"
server="1.2.3.4"
userid="<userName>"
password="<passWord>"
remotedir="/serverLoc/jboss-5.1.0.GA/server/default/deploy/"
depends="no"
binary="no"
chmod="755">
<fileset dir="basedir/war/">
<include name="tdd.war"/>
</fileset>
</ftp>
</target>
<ftp action="send"
server="1.2.3.4"
userid="<userName>"
password="<passWord>"
remotedir="/serverLoc/jboss-5.1.0.GA/server/default/deploy/"
depends="no"
binary="no"
chmod="755">
<fileset dir="basedir/war/">
<include name="tdd.war"/>
</fileset>
</ftp>
</target>
Using the above configuration, a war will be transferred to the JBoss location in the given Server machine IP from the current machine.