ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Help with 'pathconvert', please!
Date Tue, 11 Dec 2001 19:59:05 GMT
--- Ken Gentle <j.kenneth.gentle@acm.org> wrote:
> You are seeing the same behavior that I am - the difference is that I 
> invoked ant from a directory on my "e:\" drive, and you from your "d:\" 
> drive.

Whoops -- sorry, read your initial mail a bit too quickly, and thought
your only problem was getting the drive letter to be "D" instead of "E".
Also didn't look at <pathconvert> all that closely, either -- turns out
it's a bit wigged out (or just not that well documented, since the
examples in the manual don't work correctly, either).

> It appears that the "map" element is being ignored for some reason,

The reason is, it doesn't match anything -- the drive letter has already
been prepended to your path, and the directory separator has already been
converted to DOS backslashes, so the pathname you're trying to "convert"
no longer starts with /prefix.

> and since the path looks like an absolute path (starts with a "/") the 
> "targetos=windows", it defaults to the current drive letter (e in my
> case, d in yours).

Actually, it looks like <path>/<pathelement> is what's putting the drive
letter on it and doing the dir separator conversion. If you assign your
path id to a property and <echo> that out, you'll see what it already
looks like before it ever gets to <pathconvert>.
 
> I expected pathconvert to strip the "/prefix" from 
> "/prefix/iplanet/ias6/ias/..." and replace it with a "D:\", with a 
> resulting classpath.project property defined as 
> "D:\iplanet\ias6\ias".  Isn't that the expected behavior?

You'd think so, huh? :)  But given what <path>/<pathelement> is doing, it
looks to me like the only way to end up with that as the result (when
you're running on Windows box) is to replace "D:\prefix" with "D:"
(assuming "D:" is your current drive).

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

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


Mime
View raw message