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 25898] New: - Pathconvert/map not platform independent?
Date Mon, 05 Jan 2004 12:47:10 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=25898>.
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=25898

Pathconvert/map not platform independent?

           Summary: Pathconvert/map not platform independent?
           Product: Ant
           Version: 1.5.4
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: tuor07@yahoo.de


The problem:
============

I needed a mechanism to build a jar's manifest classpath entry from jars within 
a lib. The snippet below does the job. However I have to perform that "dirname" 
step to ensure, that the dir separator in the property value is the platform's 
dir separator. If "dist.dir" is specified with another separator (say C:
/Temp/xyz on Windows) it would fail otherwise to remove the directory prefix as 
specified.

  <dirname property="norm.dist.dir" file="${dist.dir}/_SOMETHING_"/>
  
  <path id="dist.path">
    <fileset dir="${dist.dir}">
      <include name="*.jar"/>
    </fileset>
  </path>
  
  <pathconvert property="jar.manifest.classpath" refid="dist.path" pathsep=" ">
    <map from="${norm.dist.dir}/" to=""/>
    <map from="${norm.dist.dir}\" to=""/>
  </pathconvert>


Related to this: I guess that the mapper task (as used by uptodate) has the same 
problem. I encountered something similar with the following snippet (under W2k):

  <uptodate property="check.jar.uptodate">
    <srcfiles dir="${build.classes.dir}" includes="**/*.class"/>
    <mapper type="merge" to="${build.jar}"/>
  </uptodate>

The verbose flag tells me, the jar does not exist. But it definitely is there 
(also checked with the available task).

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


Mime
View raw message