Reputation: 351
I'm making use of the aws java sdk that relies on a jackson version that is greater than what is in the spring bom, I need to be able to override the version (to use a version more compatible with the aws sdk). How can I override the version of a particular jar?
buildscript {
repositories {
maven { url "https://mvnrepo.----.net/nexus/content/groups/public/" }
}
dependencies {
classpath 'io.spring.gradle:dependency-management-plugin:0.5.3.RELEASE'
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'io.spring.dependency-management'
sourceCompatibility = 1.8
targetCompatibility = 1.8
version = 1.0
repositories {
maven { url "https://mvnrepo.-----.net/nexus/content/groups/public/"}
}
dependencyManagement {
imports {
mavenBom 'io.spring.platform:platform-bom:1.1.4.RELEASE'
}
}
dependencies {
compile 'org.springframework:spring-context',
'org.springframework:spring-core',
'org.springframework:spring-test',
'com.amazonaws:aws-java-sdk-dynamodb:1.10.+',
'com.amazonaws:aws-java-sdk-s3:1.10.+',
'com.amazonaws:aws-java-sdk-sns:1.10.+',
'com.amazonaws:aws-java-sdk-logs:1.10.+',
'com.google.code.gson:gson',
'joda-time:joda-time',
'org.slf4j:slf4j-api'
testCompile 'junit:junit:4.12',
'org.mockito:mockito-core:1.+'
}
task wrapper(type: Wrapper) {
gradleVersion = '2.7'
}
Upvotes: 2
Views: 1037
Reputation: 351
dependencyManagement {
imports {
mavenBom 'io.spring.platform:platform-bom:1.1.4.RELEASE'
}
dependencies {
dependency 'com.fasterxml.jackson.core:jackson-core:2.6.3'
dependency 'com.fasterxml.jackson.core:jackson-databind:2.6.3'
dependency 'com.fasterxml.jackson.core:jackson-annotations:2.6.3'
}
}
Upvotes: 2