You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jo...@insession.com on 2001/03/09 01:04:06 UTC

glob mapper bug for copy/move in version 1.3 ??

I am trying to rename files so that they do not have a file extension.  I
need to do this because so I can FTP these files to a legacy system that
does not support file extensions (just 8 character file names without an
extension).  I have tried both the copy and move tasks and have not been
able to get this to work.

I have noticed in the ant log that messages like the following are logged:

     [copy] xxxxxxx.jar skipped - don't know how to handle it

Here is the two formats I have tried on both copy and move.

    <copy todir="${todir}">
        <fileset dir="${fromdir}">
            <include name="*.*"/>
        </fileset>
        <mapper type="glob" from="*.*" to="*"/>
    </copy>

    <copy todir="${todir}">
        <fileset dir="${fromdir}">
            <include name="*.*"/>
        </fileset>
        <mapper type="glob" from="*.*" to="*."/>
    </copy>

Am I doing anything obviously wrong or is this a bug?

Thanks,

John Sisson


Re: glob mapper bug for copy/move in version 1.3 ??

Posted by Stefan Bodewig <bo...@apache.org>.
John Sisson <Jo...@insession.com> wrote:

>         <mapper type="glob" from="*.*" to="*"/>

> Am I doing anything obviously wrong or is this a bug?

Maybe the docs are not clear enough - the glob mapper supports no more
than one "*" in a pattern. Without your explanation I wouldn't know
what you were trying to do with the above - strip everything after the
first dot, strip everything after the last dot or remove the dot.

You want to use a regexp mapper. 8-)

Stefan