ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yvesforkl <>
Subject Creating SymLinks with relative paths
Date Mon, 05 Nov 2007 14:24:59 GMT

Creating SymLinks with relative paths shouldn't be too hard for ant. However,
I can't figure out the right way to do it.

Using bash commands, I'd do

cd dir_b
ln -s ../../dir_a/*.xml .

yielding symbolic links within dir_b that look like ../../dir_a/file1.xml

What is the equivalent of this in ant? I have only managed to get absolute
paths with the code below (while the "relative" attribute will just link
file1.xml to file1.xml without any relative path) :

<apply executable="ln"
  <arg value="-sf"/>
  <fileset dir="../../dir_a">
    <include name="*.xml"/>
  <arg value="."/>
  <mapper type="identity"/>

As I have fixed paths here, I considered putting the call to "ln" into a
single <exec>, but then how to change the working directory first?


View this message in context:
Sent from the Ant - Users mailing list archive at

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

View raw message