ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@m64.com>
Subject RE: Platform independent classpath in build.xml?
Date Wed, 31 May 2000 14:59:02 GMT
>
> It would be very easy to just use the standard Ant separator for entries
> (namely a ",") and have ant parse it into the OS dependant separator when
> required... not problem, instant solution.
>

I don't think "," is the standard ant separator. Where does it say this?

> In fact, when I first tried to use it, that's exactly what I assumed would
> happen... needless to say I was disappointed to find that I had to use a
> native separator :(

Its actually better than you realise. As it stands ant will accept a path
specification with either Windows or Unix standard path separators and
translate to the native platform's representation. This makes ant very
accepting. In general I try to stick to the Unix style separators in my
build files even though I work mostly on NT.

BTW, I wrote a class to tokenize paths into path components and I then
rewrote Project.translatePath to use it. This actually addresses a problem
raised by Phil Hanna to support absolute paths of the form C:/blah. It does
this without affecting the ability for single letter Unix paths to be
supported. The tokenizer is reusable in other places in the ant code where
you need to iterate over the components of a path.

I have attached it for comment.

Conor

Mime
View raw message