lunes, 10 de enero de 2011

How to copy my directory to remote host with ant?

You should use the scp command, like in the example:

<target name="copyMyDir"  description="Copying directories to your remote host">
        <scp todir="username:password@myhostname.com:/home/directoryIn yourremoteHostWhereYouWantToCopyYourStuff">
            <fileset dir="./dirIWantToCopy">
                <exclude name="build/**"/>
                <exclude name="src/"/>
                <exclude name="build.xml"/>
                <exclude name="otherStuffIWantToExclude"/>
            </fileset>
        </scp>
    </target>

If you are interested in this ant command you should read his specification that you can find here:
http://ant.apache.org/manual/Tasks/scp.html

No hay comentarios:

Publicar un comentario