Eclipse and Idea plugin not adding transistive pom.xml dependencies to .classpath or IntelliJ runtime classpaths respectively

I am having trouble with missing POM dependencies for Spring when generating Eclipse and/or Idea files. Below is my entire build.gradle file.

apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'eclipse'
  repositories {
    flatDir name: 'local-repo', dirs: 'local-repo'
  dependencies {
      testCompile (
      compile (

This is a Java SE project, no web or JEE stuff. I am getting a failure in Spring saying that cglib isn’t available. Looking at the list of jar dependencies in either IDE you definitely see that none of the pom dependencies are being referenced and they are not getting downloaded.

I can get it working by manually adding the cglib dependency but it looks like I am going to have manually have to add all of them.

Is there something I am missing?

First, you can remove all the square brackets from your dependency declarations. Second, where do you expect ‘cglib’ to come from? Is it referenced from ‘jsyntaxpane’ (it definitely isn’t referenced from any of the other libraries), and does that library come from your flatDir repo? Note that a flatDir repo doesn’t provide transitive dependency resolution. Only Maven and Ivy repos do.

I removed the brackets and it didn’t change anything. Must be suffering from syntactic sugar blindness :).

The cglib dependency is in the spring-context pom. I see it here

Ah I missed that optional is set to true for cglib. My apologies for taking away time on this.