ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Gentle <>
Subject Re: Help with 'pathconvert', please!
Date Tue, 11 Dec 2001 19:07:48 GMT
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.  It appears that the "map" element is being ignored for some reason, 
and since the path looks like an absolute path (starts with a "/") and the 
"targetos=windows", it defaults to the current drive letter (e in my case, 
d in yours).

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?

Here's a simpler build file that may point out the issue a bit better:

<?xml version="1.0"?>
<project name="imf" default="generate_classpath" basedir=".">

   <target name="generate_classpath" >
     <pathconvert targetos="windows" property="classpath.project">
             <pathelement location="/prefix/iplanet/iasclient.jar" />
       <map from="/prefix" to="Z:\" />
     <echo message="EXPECT: classpath.project=Z:\iplanet\iasclient.jar" />
     <echo message="GOT:    classpath.project=${classpath.project}" />


At 10:42 AM 12/11/2001 -0800, Diane Holt wrote:
>I get:
>$ ant -f pc.xml
>Buildfile: pc.xml
>      [echo] BEFORE: PATH.PREFIX.TOKEN=/prefix
>      [echo] BEFORE: home.iplanet=/prefix/iplanet/ias6/ias
>      [echo] BEFORE:\
>      [echo] BEFORE: classpath.project=${classpath.project}
>      [echo] AFTER:
>      [echo] ant.version=Ant version 1.4 compiled on September 3 2001
>      [echo] ant.file=D:\cygwin\home\dianeh\work\ant\pc.xml
>      [echo] mode
>      [echo] HotSpot(TM) Client VM
>      [echo] java.vm.vendor=Sun Microsystems Inc.
>      [echo] java.vm.version=1.3.0-C
>      [echo] os.arch=x86
>      [echo] NT
>      [echo] os.version=4.0
>      [echo]
>Total time: 0 seconds

J. Kenneth Gentle (Ken)       | Phone: (610) 255-0361   FAX:(610) 255-0418
Gentle Software, LLC          | Email:

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

View raw message