You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David Carson <dc...@gmail.com> on 2007/02/28 00:14:59 UTC
output dir is being determined by following symlink
We have a build environment where we build a 'shadow' of our source
tree consisting of symbolic links to the real source tree. The actual
build takes place in this shadow.
When I run ant in this shadow, it reads the main .mxml file using the
symlink. However, it figures out that the .mxml is a symlink, follows
that link to the real file, and the resulting output files (such as
.cache files) are written there (or so my theory goes). I have
replaced the symlink with a real copy of the file and the output ends
up in the shadow, so my theory seems to be correct.
I want all output files in the shadow, so I don't want ant to follow
the symlink to determine where to write output. Is this possible?
Thanks,
David
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: output dir is being determined by following symlink
Posted by Peter Reilly <pe...@gmail.com>.
On 2/27/07, David Carson <dc...@gmail.com> wrote:
> We have a build environment where we build a 'shadow' of our source
> tree consisting of symbolic links to the real source tree. The actual
> build takes place in this shadow.
>
> When I run ant in this shadow, it reads the main .mxml file using the
> symlink. However, it figures out that the .mxml is a symlink, follows
> that link to the real file, and the resulting output files (such as
> .cache files) are written there (or so my theory goes). I have
> replaced the symlink with a real copy of the file and the output ends
> up in the shadow, so my theory seems to be correct.
>
> I want all output files in the shadow, so I don't want ant to follow
> the symlink to determine where to write output. Is this possible?
Not at the moment.
Java is unaware of symbolic links and follows them without
informing applications. One can
use a hack of checking if the absolute path of the file
is the same as the canonical path to check if a file
is a symbolic link. This however fails for certain files.
Ant has some tasks that do that, however <delete>
is not one of them.
There is an open bugzilla request/bug report to
enable <delete> to do this.
see:
http://issues.apache.org/bugzilla/attachment.cgi?id=16406
Peter
>
> Thanks,
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: output dir is being determined by following symlink
Posted by David Carson <dc...@gmail.com>.
How do I do that for the .cache files? I think these are the only
files being written to the parent at the moment. My ultimate target
is being written to an explicit target directory already, as you
suggest.
On 2/28/07, Omry Yadan <om...@yadan.net> wrote:
> try to use explicit target directory in whatever task you are running,
> and point it to the shadow directory.
>
>
>
> David Carson wrote:
>
> > We have a build environment where we build a 'shadow' of our source
> > tree consisting of symbolic links to the real source tree. The actual
> > build takes place in this shadow.
> >
> > When I run ant in this shadow, it reads the main .mxml file using the
> > symlink. However, it figures out that the .mxml is a symlink, follows
> > that link to the real file, and the resulting output files (such as
> > .cache files) are written there (or so my theory goes). I have
> > replaced the symlink with a real copy of the file and the output ends
> > up in the shadow, so my theory seems to be correct.
> >
> > I want all output files in the shadow, so I don't want ant to follow
> > the symlink to determine where to write output. Is this possible?
> >
> > Thanks,
> > David
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: output dir is being determined by following symlink
Posted by Omry Yadan <om...@yadan.net>.
try to use explicit target directory in whatever task you are running,
and point it to the shadow directory.
David Carson wrote:
> We have a build environment where we build a 'shadow' of our source
> tree consisting of symbolic links to the real source tree. The actual
> build takes place in this shadow.
>
> When I run ant in this shadow, it reads the main .mxml file using the
> symlink. However, it figures out that the .mxml is a symlink, follows
> that link to the real file, and the resulting output files (such as
> .cache files) are written there (or so my theory goes). I have
> replaced the symlink with a real copy of the file and the output ends
> up in the shadow, so my theory seems to be correct.
>
> I want all output files in the shadow, so I don't want ant to follow
> the symlink to determine where to write output. Is this possible?
>
> Thanks,
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org