How can I use Phing to SCP directory with symlinks inside it?

852 Views Asked by At

I'm just playing around with Phing, and I've setup a task like this:

<scp .... >
    <fileset dir="/my/dir">
        <include name="**" />
    </fileset>
</scp>

But it fails when it gets to a symlink within my directory (the symlink is a relative symlink pointing at another directory inside /my/dir structure.

How can I have Phing transfer these symbolic links? Or should I use another method?

1

There are 1 best solutions below

1
On

Not sure what the expected behaviour is. Whether you want to transfer the actual symbolic link or the dereferenced file. However this might not be a problem of the actual scp task but rather of the fileset.

Have a look at http://phing.info/docs/guide/stable/chapters/appendixes/AppendixD-CoreTypes.html#Fileset and try playing around with the expandsymboliclinks flag.