hi
This is a newbie solution, but it might work! :-)
Try using gunzip or bunzip2 task of Ant. Maybe they are zipped in that
format?
Pawan
-----Original Message-----
From: EJ Ciramella [mailto:eciramella@upromise.com]
Sent: Wednesday, April 21, 2004 7:44 PM
To: Ant Users List
Subject: RE: unzip Task Throws Java Exception on Valid Files
Can you open them with winzip? I saw something similar when I was making
tar files not too long ago. I created a tar file with compression of gzip
turned on and the file named something.tar. Winzip puked but when I changed
the extension to tgz, Winzip could properly extract the tar file inside.
Turn on verbose and debug just for giggles.
-----Original Message-----
From: David F. White [mailto:dwhite@opentext.com]
Sent: Wednesday, April 21, 2004 10:12 AM
To: user@ant.apache.org
Subject: unzip Task Throws Java Exception on Valid Files
I have several zip files that I can use with the WinZip application without
any problems. However, the Ant "unzip" task cannot perform the extract
operation on these files without throwing the following exception:
getData:
[echo] Extracting data files from C:/Downloads/TSNData...
[unzip] Expanding: C:\Downloads\TSNData\ctx0409i.zip into
C:\Utilities\Tracker\csvdata
BUILD FAILED
java.lang.IllegalArgumentException: invalid compression method
at java.util.zip.ZipEntry.setMethod(ZipEntry.java:209)
at
org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:255)
at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:143)
at org.apache.tools.ant.taskdefs.Expand.expandFile(Expand.java:121)
at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:108)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
at org.apache.tools.ant.Main.runBuild(Main.java:632)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
Total time: 0 seconds
java.lang.IllegalArgumentException: invalid compression method
at java.util.zip.ZipEntry.setMethod(ZipEntry.java:209)
at
org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:255)
at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:143)
at org.apache.tools.ant.taskdefs.Expand.expandFile(Expand.java:121)
at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:108)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
at org.apache.tools.ant.Main.runBuild(Main.java:632)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
invalid compression method
Has anybody encountered this error before and is there a solution?
Thanks...
Dave White
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
|