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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to