ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: Bug in the "glob" file mapper?
Date Fri, 13 Aug 2004 18:07:29 GMT
> From: Phil Weighill-Smith [mailto:phil.weighill-smith@volantis.com]
> The "glob" file mapper is exhibiting a behaviour I didn't expect:
> 
> <copy ...
>     <fileset ...
>     <mapper type="glob" from="*/ant.jar" to="internal/ant.jar"/>
> </copy>
> 
> Assuming that "*" matches "env/apache-ant-1.6.2/lib" I expected this
to
> copy the ant.jar to a destination of copy's todir + /internal/ant.jar.
> What it actually does is copy it to copy's todir +
> /internal/ant.jarenv/apache-ant-1.6.2/lib.
> 
> I.e. if you don't use a "*" in the to attribute of the mapper, the "*"
> match is suffixed onto the "to". This seems wrong to me. Is this a
bug?

It's wrong in the sense that the glob mapper should most likely throw an
error when the "*" is missing in the 'to' attribute.

You can't use the glob mapper to concatenate files like this, and even
if it worked, plain concatenation wouldn't work with .jar files.

Use <concat> for plain concatenation.
Use <jar> or <zip> with <zipfileset> for concatenation of JAR/ZIP files.

--DD

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


Mime
View raw message