Reputation: 1570
I am a gradle noob, I have the following gradle configuration in my project. I am trying to set up an AmazonBeanStalk java spring project.
buildscript {
ext {
springBootVersion = '1.0.2.RELEASE'
}
repositories {
maven { url "http://repo.spring.io/libs-snapshot" }
mavenLocal()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.0.2.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'war'
sourceCompatibility = 1.7
targetCompatibility = 1.7
war {
baseName = 'videosvc-amazon-beanstalk'
version = '1.1'
}
repositories {
mavenCentral()
maven { url "http://repo.spring.io/libs-snapshot" }
maven { url "http://maven.springframework.org/milestone" }
maven { url "http://repo.opensourceagility.com/snapshots" }
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
compile("org.springframework.data:spring-data-commons:1.8.0.RELEASE")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.boot:spring-boot-starter-aop")
compile("org.springframework.boot:spring-boot-starter-test")
compile("org.springframework.data:spring-data-rest-webmvc:2.1.0.RELEASE")
compile("org.socialsignin:spring-data-dynamodb:1.0.1-SNAPSHOT")
compile("com.google.guava:guava:17.0")
compile("com.squareup.retrofit:retrofit:1.6.0")
compile("commons-io:commons-io:2.4")
testCompile("junit:junit")
}
task wrapper(type: Wrapper) {
gradleVersion = '1.11'
}
When I do a gradle build, I get the following parse exception. I have no clue where to start, any input would be much appreciated.
Could not resolve javax.validation:validation-api:1.1.0.FINAL. Required by: :MyApp:unspecified > org.socialsignin:spring-data-dynamodb:1.0.1-SNAPSHOT inconsistent module metadata found. Descriptor: javax.validation:validation-api:1.1.0.Final Errors: bad version: expected='1.1.0.FINAL' found='1.1.0.Final' Could not resolve javax.validation:validation-api:1.1.0.FINAL. Required by: :MyApp:unspecified > org.socialsignin:spring-data-dynamodb:1.0.1-SNAPSHOT > org.hibernate:hibernate-validator:4.2.0.Final inconsistent module metadata found. Descriptor: javax.validation:validation-api:1.1.0.Final Errors: bad version: expected='1.1.0.FINAL' found='1.1.0.Final'
Thanks in advance.
Upvotes: 0
Views: 538
Reputation: 84784
Not sure what does it have to do with ivy. The problem is that one of the dependencies, namely:
org.socialsignin:spring-data-dynamodb:1.0.1-SNAPSHOT
depends transitively (via org.hibernate:hibernate-validator:4.2.0.Final
) on
javax.validation:validation-api:1.1.0.FINAL
which is incorrectly specified, should be (which is visible in output log):
javax.validation:validation-api:1.1.0.Final
(taken from maven central).
The solution is to add dependency for validation explicitly (with appropriate scope):
dependencies {
//...
compile("javax.validation:validation-api:1.1.0.Final")
//...
}
Upvotes: 1