ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: calculating relative paths
Date Wed, 09 Sep 2009 09:29:42 GMT
>Perhaps I should raise an enhancement request.  A couple of new
>attributes "relative" (default false) and "basedir" (default
>${basedir}) that can be used in conjunction with the "location"
>attribute seem a relatively minor addition, and would reduce my
>problem to <property name="relpath" location="${src.dir}"
>relative="true" basedir="${build.dir}/xsltdoc"/>
>Any of the developers care to comment?

The enhancement of <property location/> seems to be good candidate.

<property value="my/file.txt"/>
-->  my/file.txt

<property location="my/file.txt"/>
--> path/to/projectbasedir/my/file.txt

<property location="my/file.txt" relative="true"/>
--> my/file.txt

<property location="my/file.txt" relative="true" basedir="my"/>
--> file.txt

<property location="my/file.txt" relative="true" basedir="my/dir"/>
--> ../my/file.txt

<property location="my/file.txt" relative="true" basedir=".."/>
--> projectbasedir/my/file.txt


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

View raw message