ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21097] New: - pathconvert with targetos=unix does not work on Windows
Date Wed, 25 Jun 2003 22:46:01 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21097>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21097

pathconvert with targetos=unix does not work on Windows

           Summary: pathconvert with targetos=unix does not work on Windows
           Product: Ant
           Version: 1.5.3
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: fgarcia222@yahoo.com


The following build.xml file with ant 1.4 run on a Win2K machine (the build.xml 
is under directory "foo" in my C drive) correctly generates the output

     [echo]        foo = C:/foo
     [echo]        bar = C:/bar

but on ant 1.5.3 on the same machine generates the incorrect output


     [echo]        foo = C:\foo
     [echo]        bar = C:\foo/../bar

I tried specifying dirsep and pathsep as "/" rather than targetos, but that did 
not make a differnce.  If you can give me a workaround, I will reduce the 
severity of this bug, but I am stuck on not being able to upgrade beyond ant 
1.4 (same problem is also on 1.5) right now as I have a target in one of my 
build.xml files that depends on this functionality to correctly write out an 
output file needed by another program that expects unix separated paths.  Note 
I have tried this both under Cygwin and under the DOS command prompt, same 
results either way.

<?xml version="1.0" ?>
<project name="foo" default="init">

  <property name="foo.rootdir" value="${basedir}"/>
  <property name="bar.rootdir" value="${foo.rootdir}/../bar"/>

  <path id="foo.rootdir.path">
    <pathelement location="${foo.rootdir}"/>
  </path>

  <path id="bar.rootdir.path">
    <pathelement location="${bar.rootdir}"/>
  </path>

  <target name="init">
    <pathconvert targetos="unix" property="foo.rootdir" 
refid="foo.rootdir.path"/>
    <pathconvert targetos="unix" property="bar.rootdir" 
refid="bar.rootdir.path"/>
    <echo>
       foo = ${foo.rootdir}
       bar = ${bar.rootdir}
    </echo>
  </target>

</project>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message