You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by rakesh mailgroups <ra...@gmail.com> on 2005/04/15 14:19:47 UTC

os independent paths

Hi,

found the ant website a bit cryptic when i looked up pathconvert. I
hope someone can help me.

I would like to be able to take one of my properties such as
${build.dir}, (defined as build.dir=war/WEB-INF) and  and then convert
that into a os-dependent path to use in my config files.

So, for windows, I would get a property like this :
C:\Projects\myapp\war\WEB-INF

In unix I would get this:

/usr/rak/projects/myapp/war/WEB-INF

Ant of course will choose the correct one based on the os it is running on.

Thanks

Rakesh

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


Re: os independent paths

Posted by rakesh mailgroups <ra...@gmail.com>.
Hi,

that definately works on windows. can't get to a UNIX environment just
yet but will get back if theres a problem.

Thanks!!!

On 4/15/05, Peter Reilly <pe...@apache.org> wrote:
> Just use the location attribute of property:
> 
> <property name="build.dir.abs" location="${build.dir}"/>
> 
> Peter
> 
> rakesh mailgroups wrote:
> 
> >Hi,
> >
> >found the ant website a bit cryptic when i looked up pathconvert. I
> >hope someone can help me.
> >
> >I would like to be able to take one of my properties such as
> >${build.dir}, (defined as build.dir=war/WEB-INF) and  and then convert
> >that into a os-dependent path to use in my config files.
> >
> >So, for windows, I would get a property like this :
> >C:\Projects\myapp\war\WEB-INF
> >
> >In unix I would get this:
> >
> >/usr/rak/projects/myapp/war/WEB-INF
> >
> >Ant of course will choose the correct one based on the os it is running on.
> >
> >Thanks
> >
> >Rakesh
> >
> >---------------------------------------------------------------------
> >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
> 
>

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


Re: os independent paths

Posted by Peter Reilly <pe...@apache.org>.
Just use the location attribute of property:

<property name="build.dir.abs" location="${build.dir}"/>

Peter

rakesh mailgroups wrote:

>Hi,
>
>found the ant website a bit cryptic when i looked up pathconvert. I
>hope someone can help me.
>
>I would like to be able to take one of my properties such as
>${build.dir}, (defined as build.dir=war/WEB-INF) and  and then convert
>that into a os-dependent path to use in my config files.
>
>So, for windows, I would get a property like this :
>C:\Projects\myapp\war\WEB-INF
>
>In unix I would get this:
>
>/usr/rak/projects/myapp/war/WEB-INF
>
>Ant of course will choose the correct one based on the os it is running on.
>
>Thanks
>
>Rakesh
>
>---------------------------------------------------------------------
>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