ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Error using exec to perform symlink on multiple files
Date Thu, 09 Nov 2006 06:34:38 GMT
On Wed, 08 Nov 2006, Chris Mattmann <>

> # ln -fs /path/to/test/testfiles/* /path/to/test/linkdir/
> It appropriately creates 2 symlinks, one for each file, in the
> linkdir directory. However, when I try to run this command using
> Ant's exec task, I can't seem to get it to work. I end up getting a
> link within /path/to/test/linkdir/ to a file named "*" which points
> to /path/to/test/testfiles/*. Could you guys tell me what I am doing
> wrong? Is this a bug with Ant? Or the expected behavior?

It is the expected behavior (and your question is one that should go
to the user instead of the dev list, BTW).

Your Unix shell expands the * to all matching file before handing them
off to ln.  Since Ant doesn't use the shell in between, ln "sees" the
* and not the files.

I don't know why you think <exec> would be better than <symlink> in
this case, but if you want to go with the exec family, <apply> is your
best choice here.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message