You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ar <ar...@free.fr> on 2006/02/16 10:18:40 UTC

Ant task equivalent to the "ln" unix command

Hi all,

Does anybody know if there is an equivalent to the "ln" Unix command in  
Ant or others projects built over Ant ?
My goal is to get a directory referenced through 2 different names.

Regards

-- 
A. ROY

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant task equivalent to the "ln" unix command

Posted by Matt Benson <gu...@yahoo.com>.
If I were going to do this (and I probably wouldn't),
I would DL www.sysinternals.com's JUNCTION utility and
conditionally create a macro to call <symlink> or
<exec executable="JUNCTION.EXE"> based on the OS. 
That takes care of Windows and Unix-compatible
environments... can't say about the rest.  But I would
expect this approach to necessitate numerous tweaks
and so cannot truly recommend it.

-Matt

--- ar <ar...@free.fr> wrote:

> 
> Thanks, I would prefer a solution working on all
> operating systems like  
> "copy" or "delete" do.
> 
> Le Thu, 16 Feb 2006 15:48:48 +0100, glenn
> opdycke-hansen  
> <gl...@gmail.com> a écrit:
> 
> > I would use the exec task
> >  	
> > <quote>
> > Executes a system command. When the os attribute
> is specified, the
> > command is only executed when Ant is run on one of
> the specified
> > operating systems.
> > </quote>
> >
> > http://ant.apache.org/manual/CoreTasks/exec.html
> >
> > On 2/16/06, ar <ar...@free.fr> wrote:
> >>
> >> Hi all,
> >>
> >> Does anybody know if there is an equivalent to
> the "ln" Unix command in
> >> Ant or others projects built over Ant ?
> >> My goal is to get a directory referenced through
> 2 different names.
> >>
> >> Regards
> >>
> >> --
> >> A. ROY
> >>
> >>
>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> >> For additional commands, e-mail:
> user-help@ant.apache.org
> >>
> >>
> >
> >
> > --
> > glenn
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> user-help@ant.apache.org
> >
> >
> 
> 
> 
> -- 
> A. ROY
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant task equivalent to the "ln" unix command

Posted by ar <ar...@free.fr>.
Thanks, I would prefer a solution working on all operating systems like  
"copy" or "delete" do.

Le Thu, 16 Feb 2006 15:48:48 +0100, glenn opdycke-hansen  
<gl...@gmail.com> a écrit:

> I would use the exec task
>  	
> <quote>
> Executes a system command. When the os attribute is specified, the
> command is only executed when Ant is run on one of the specified
> operating systems.
> </quote>
>
> http://ant.apache.org/manual/CoreTasks/exec.html
>
> On 2/16/06, ar <ar...@free.fr> wrote:
>>
>> Hi all,
>>
>> Does anybody know if there is an equivalent to the "ln" Unix command in
>> Ant or others projects built over Ant ?
>> My goal is to get a directory referenced through 2 different names.
>>
>> Regards
>>
>> --
>> A. ROY
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
>
> --
> glenn
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
A. ROY

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant task equivalent to the "ln" unix command

Posted by Matt Benson <gu...@yahoo.com>.
There is the <symlink> task, which only works on Unix
systems (IIRC it works to a slight degree on Cygwin
but I wouldn't recommend it).  <symlink> calls the ln
executable, but be sure to read the manual and
experiment thoroughly if you choose to use this task
as its behavior is a little special and seems to give
users fits at times.

YMMV.

-Matt

--- glenn opdycke-hansen <gl...@gmail.com> wrote:

> I would use the exec task
>  	
> <quote>
> Executes a system command. When the os attribute is
> specified, the
> command is only executed when Ant is run on one of
> the specified
> operating systems.
> </quote>
> 
> http://ant.apache.org/manual/CoreTasks/exec.html
> 
> On 2/16/06, ar <ar...@free.fr> wrote:
> >
> > Hi all,
> >
> > Does anybody know if there is an equivalent to the
> "ln" Unix command in
> > Ant or others projects built over Ant ?
> > My goal is to get a directory referenced through 2
> different names.
> >
> > Regards
> >
> > --
> > A. ROY
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> user-help@ant.apache.org
> >
> >
> 
> 
> --
> glenn
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant task equivalent to the "ln" unix command

Posted by glenn opdycke-hansen <gl...@gmail.com>.
I would use the exec task
 	
<quote>
Executes a system command. When the os attribute is specified, the
command is only executed when Ant is run on one of the specified
operating systems.
</quote>

http://ant.apache.org/manual/CoreTasks/exec.html

On 2/16/06, ar <ar...@free.fr> wrote:
>
> Hi all,
>
> Does anybody know if there is an equivalent to the "ln" Unix command in
> Ant or others projects built over Ant ?
> My goal is to get a directory referenced through 2 different names.
>
> Regards
>
> --
> A. ROY
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


--
glenn

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org