You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2003/05/16 19:00:39 UTC
DO NOT REPLY [Bug 12267] -
Add ability to unzip into separate folders
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=12267>.
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=12267
Add ability to unzip into separate folders
------- Additional Comments From mcrocker@markcrocker.com 2003-05-16 17:00 -------
I am working on a different solution to the same problem. I believe that my solution is more
elegant because it simply adds a Mapper to the unjar, untar, unwar unzip tasks. This is much
more flexible and consistent with the copy task.
Should I submit my code to this bug or create a new one?
An example of my proposed use is:
<unjar dest="${dir.preverified}">
<fileset dir="${dir.src}">
<include name="*.jar" />
<include name="*.zip" />
</fileset>
<mapper type="regexp" from="^(.*)\.(jar|zip)$$" to="\1/" />
</unjar>
This unpacks all files ending in .jar or .zip in the source directory and puts the contents of
each into a subdirectory of the preverified directory with the same name as the original archive file
without the trailing .jar or .zip. For example, the contents of src/purifier.zip and src/ant.jar will be
extracted to preverified/purifier/ and preverified/ant/ directories respectively.