Wednesday 25 August 2010

SCPing multiple files with Ant

Firstly SCP and SSH aren't included with Ant by default. We need to get the jsch.jar and include it

Please remember that wildcards dont work in Ant. We should use a fileset instead:

Example Ant code:

<scp todir="user:password@somehost:/home/somewhere">
  <fileset dir="src_dir">
    <include name="**/*.java"/>
  </fileset>
</scp>


... and finally a lovely list of Ant Tasks

No comments:

Post a Comment