ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Ciramella <ecirame...@archivas.com>
Subject Re: Symlink badness. . .
Date Wed, 23 Feb 2005 14:12:28 GMT
With overwrite set to true and failonerror set to false, I still get 
the link in the sub directory and the second time it's run, I get the 
build failed message.

Here is the exact line from the build file:

<symlink link="${basedir}/testing-simlinkdir"
   resource="/Users/eciramella/testing-simlinkdir"
   overwrite="true"
   failonerror="false"/>

On Feb 22, 2005, at 4:55 PM, Matt Benson wrote:

> --- Edward Ciramella <eciramella@archivas.com> wrote:
>
>> Hmmm, doesn't seem to matter.  In my example below,
>> if the "test-link"
>> directory exists, and regardless of if it is a
>> symlink, ant creates
>> another symlink dir, one level deeper.  The second
>> time this is run
>> with overwrite="true" (and with failonerror="false")
>> I get "BUILD
>> FAILED" and a message about how the lowest one
>> already exists.
>
> You can do the same thing from the command line and
> get the same results, is what I am saying.  ln -s
> takes two more arguments, the target and the link
> destination.  If the named destination does not exist,
> it is taken to be the desired name for the link and
> all is well.  If the destination exists and is a
> directory, it is taken as the directory into which the
> link should be created --with the basename of the
> target (if the named destination is not a directory
> then it is still taken as the name of the actual
> link).  Now that the destination is known, if IT
> exists, the "File exists" error is encountered.  If
> you simply use overwrite you should avoid all this
> rigmarole.
>
> -Matt
>
>>
>> On Feb 22, 2005, at 4:36 PM, Matt Benson wrote:
>>
>>> EJ, what you are seeing, AFAICT, is the by-design
>>> behavior of the ln executable.  We can debate
>> whether
>>> allowing this is a bug in Ant, since the
>> documentation
>>> of the symlink task makes no mention of this
>> alternate
>>> interpretation of the link entity specified as a
>>> parameter to ln, but in the meantime your best
>> course
>>> will probably be to use indiscriminately the
>> overwrite
>>> attribute.
>>>
>>> HTH,
>>> Matt
>>>
>>> --- Edward Ciramella <eciramella@archivas.com>
>> wrote:
>>>
>>>> Hello ant world - I'm attempting to create a
>> symlink
>>>> regardless if a
>>>> directory exists where the symlink is or if the
>>>> symlink already exists.
>>>>   What I'm seeing is kind of interesting.
>>>>
>>>> Say I'm creating a symlink from
>>>> /Users/username/test-link to
>>>> /Users/username/someotherdir/test-link
>>>>
>>>> If the "to" is an actual directory, the symlink
>> gets
>>>> created as a
>>>> subdirectory of
>>>> /Users/username/someotherdir/test-link.
>>>>
>>>> So you wind up with something like:
>>>> /Users/username/someotherdir/test-link/test-link
>>>>
>>>> I also noticed that if run twice, with overwrite
>>>> false, I wind up with
>>>> another subdirectory as explained above.  We have
>>>> some branches that
>>>> don't have every directory branched (from parent
>> to
>>>> child) and people
>>>> are using symlinks.  Is there another way to do
>>>> this?
>>>>
>>>> I looked around a bit in search of bugs against
>> the
>>>> symlink target, but
>>>> I couldn't find anything that looked like what
>> I'm
>>>> up against.
>>>>
>>>> Any comments/help would be great.
>>>>
>>>>
>>>>
>>>
>>
> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail:
>>>> user-unsubscribe@ant.apache.org
>>>> For additional commands, e-mail:
>>>> user-help@ant.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> 		
>>> __________________________________
>>> Do you Yahoo!?
>>> Yahoo! Mail - 250MB free storage. Do more. Manage
>> less.
>>> http://info.mail.yahoo.com/mail_250
>>>
>>>
>>
> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Easier than ever with enhanced search. Learn more.
> http://info.mail.yahoo.com/mail_250
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message