Dependencies failing to resolve due to configuration dependencies

Hi - I’m trying to use the spring repositories in my gradle file, but it’s having problems resolving some of the dependencies. I’ve used the same repositories in an ant+ivy setup and it works fine. It seems as though there’s a dependency between compile and default configurations, and the spring ivy file doesn’t have anything in it for “default”. Anyone have any ideas?

edit: I’m using gradle 1.0-milestone-6



apply plugin: 'java'
  configurations {
  repositories {
    ivy {
        artifactPattern "[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
        artifactPattern "[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
        ivyPattern "[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
        ivyPattern "[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
dependencies {
  compile 'org.slf4j:integration:1.6.1'
  compile 'org.springframework:org.springframework.core:3.0.5.RELEASE'
  compile 'org.springframework:org.springframework.context:3.0.5.RELEASE'
  task BuildProject {
          task doBuild {
                println "Building..."
                  println "Compiling Java..."
                  println "Finished Build"


[lmorris@bigbob RatingsAndReviewsTestApp]$ gradle build Building… Finished Build :compileJava

FAILURE: Build failed with an exception.

  • What went wrong: Could not resolve all dependencies for configuration ‘:compile’. Cause: Module version group:, module:RatingsAndReviewsTestApp, version:unspecified, configuration:compile declares a dependency on configuration ‘default’ which is not declared in the module descriptor for group:org.springframework, module:org.springframework.core, version:3.0.5.RELEASE

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


Total time: 3.161 secs

If you don’t specify which configuration to depend on, you depend on ‘default’. If you need to depend on ‘foo’ instead, do this:

compile group: "org.springframework", module: "org.springframework.core", version: "3.0.5.RELEASE", configuration: "foo"

Worked a treat. Thanks!

I dont have depends on configuration or maybe I need some one?