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">
           <path>
             <pathelement location="/prefix/iplanet/iasclient.jar" />
           </path>
       <map from="/prefix" to="Z:\" />
     </pathconvert>
     <echo message="EXPECT: classpath.project=Z:\iplanet\iasclient.jar" />
     <echo message="GOT:    classpath.project=${classpath.project}" />
   </target>

</project>



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

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


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to