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
Thanks
Script:
apply plugin: 'java'
configurations {
compile
}
repositories {
ivy {
artifactPattern "http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
artifactPattern "http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
ivyPattern "http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
ivyPattern "http://repository.springsource.com/ivy/bundles/release/[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..."
compileJava
println "Finished Build"
}
}
Output:
[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.
BUILD FAILED
Total time: 3.161 secs