Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ant taskdef ZipException: Not a valid zip file

 
Csaba Szegedi
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I would like to use the ant-contrib, it works well, but before the result, I get this below:

Unable to obtain resource from /home/csaba/ant/apache-ant-1.9.0/lib/libraries.properties: java.util.zip.ZipException: Not a valid zip file
[taskdef] Unable to obtain resource from /home/myname/ant/apache-ant-1.9.0/lib/libraries.properties:
[taskdef] java.util.zip.ZipException: Not a valid zip file

Code which raise the exceptions:


How can I remove this kind of exceptions ?
Thanks in advance.

Cs.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What all is in that lib directory? Ant doesn't like the properties file because it is not a zip file (jar files are zip files). Try using an includes directive to include only the jar files in the lib directory. Example:

 
Csaba Szegedi
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Peter,

You were right.
The error can be more concrete, that was miss leading for me as a starter.

Thanks 3x

Peter Johnson wrote:What all is in that lib directory? Ant doesn't like the properties file because it is not a zip file (jar files are zip files). Try using an includes directive to include only the jar files in the lib directory. Example:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic