Is there a file size limit for zipTree?

(scott.raffanelli) #1

I have a simple task that loops through the files in my configuration. This configuration has a few zip files in it. I need to explode these zips into a certain directory on my filesystem. This is how I am trying to do it:

task pullDownPatches4FA << {
      configurations.p4faArchive.each { File theZip ->
      println ('FILENAME: ' +
      copy {
         println 'Inside copy task...'
         from zipTree (theZip)
         println ('The size is: ' + theZip.size())
         into '../patches4fa/dist'

This spits out something like this:

Dynamic properties are deprecated:
Deprecated dynamic property: "env" on "root project 'fainteg'", value: "{OPATCH_LABEL=OPATCH_1...".
:clean UP-TO-DATE
Inside copy task...
The size is: 262379520
Inside copy task...
The size is: 18158066
  Total time: 6.773 secs

But when I look under the target directory I only see that the small 18MB zip file was exploded. The 262MB zip and the 7gig zip (not shown above) were not exploded. They were seemingly just skipped over.

What happened here? Is there some file size limit on the zipTree?


(Luke Daley) #2

There’s no intentional file limit, and I’d be surprised if there’s a hidden one that is less than 262MB.

There’s only two zips in that output. Can you please post the copy task(s).

(scott.raffanelli) #3

I posted the whole task up above. Not sure if it helps, but here is the rest of the code:

configurations {
  dependencies {
  p4faArchive (group: 'oracle.fmw', name: 'patches4fa', version: 'PATCHES4FA_PT.POC1_PLATFORMS_120820.2234.S', ext: 'zip')
  p4faArchive(group: '', name: 'biinst', version: '', ext: 'zip')

So I am only using two zips right now. I don’t have the 7gig zip listed there, but believe me it doesn’t work either. :slight_smile:

(scott.raffanelli) #4

I am going to see what happens if I just move away from zipTree and simply replace the step with a system call to unzip.

(scott.raffanelli) #5

Actually, I think I figured this out. Does zipTree work with tar files? Is there something that works with tar?

(Peter Niederwieser) #6

No, it doesn’t. For Tar files there is ‘tarTree’.

(scott.raffanelli) #7

Awesome, that absolutely rocks and it works perfectly.