ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Stockall <je...@cryptocard.com>
Subject Re: Ant Task and paths
Date Sun, 23 Feb 2003 15:15:06 GMT
On Sunday, February 23, 2003, at 09:55 AM, David Corbin wrote:
> If I write an ant task, how should it handle paths.  Is it the 
> responsibility of the "build.xml-writer" to specify full paths for all 
> path related arguments?  Or should paths all be relative to 
> ${basedir}? Or should the task accept either? (If the latter, how do I 
> distinguish between the two formats?)

Your task should handle both, relative paths make for more portable 
build files, but some folks like to use absolute ones. Have a look at 
FileUtils, it can resolve relative files to absolute ones, taking into 
account platform specific requirements. You can also use the standard 
java.io.File methods.

There are many examples to choose from in Ant's source.

Jesse Stockall - jesse@cryptocard.com
CRYPTOCard Corp.


Mime
View raw message