Updating Eclipse file from Gradle gives IOException

The following update to the project fails due to IOException

eclipse {
 project {
  name = 'ApacheParent'
      buildCommand 'org.eclipse.ajdt.core.ajbuilder'
  buildCommand 'org.eclipse.jdt.core.javabuilder'
  buildCommand 'org.scala-ide.sdt.core.scalabuilder'
      natures 'com.springsource.sts.gradle.core.nature', 'org.eclipse.jdt.groovy.core.groovyNature', 'org.scala-ide.sdt.core.scalanature', 'org.eclipse.ajdt.ui.ajnature'
 }
 classpath {
  containers 'org.scala-ide.sdt.launching.SCALA_CONTAINER', 'GROOVY_SUPPORT', 'GROOVY_DSL_SUPPORT', 'com.springsource.sts.gradle.classpathcontainer', 'org.eclipse.ajdt.core.ASPECTJRT_CONTAINER'
 }
    downloadSources = true
 downloadJavadoc = true
}

You mean that the IOException is thrown when you run gradle eclipse tasks? It might be that there’s something wrong with the existing metadata files and gradle eclipse plugin cannot merge them with the information from the build.gradle. I suggest to run cleanEclipse or get rid of the metadata files and re-run.

Otherwise, the code snippet you provided works ok for me.

Hope that helps!