Gradle

IOException when extracting a dependency zip

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.0-milestone-1
  • Fix Version/s: None
  • Component/s: tasks
  • Labels:
    None
  • Environment:
    Windows 7 Professional x64, java version "1.6.0_23"

Description

I have a simple project where I am trying to extract a ZIP dependency:

configurations {
  runtime
}

dependencies {
  runtime 'com.coremedia.cms:apache-tomcat:5.2.839@zip'
}

repositories {
  mavenLocal()
}

task explodeTomcat << {
  mkdir "$buildDir/exploded"

  tree = zipTree(configurations.runtime.files{dep -> dep.name == 'apache-tomcat'})
  println tree
  copy {
    into "$buildDir/exploded"
    with tree
  }
}

When I execute the explodeTomcat task, I get an IOException when printing or copying the tree (see attached log file).

Activity

Hide
Adam Murdoch added a comment -

A workaround is to use something like:

tree = zipTree(configurations.runtime.singleFile)

or

tree = zipTree(configuration.runtime.fileCollection{dep ->...}.singleFile)

Show
Adam Murdoch added a comment - A workaround is to use something like: tree = zipTree(configurations.runtime.singleFile) or tree = zipTree(configuration.runtime.fileCollection{dep ->...}.singleFile)

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: