Upgrade Jackson version ; use BOM for dependencies
Use Spring Plugin for dependency management * Fix indents * - only import the BOM where needed * - use latest plugin version
This commit is contained in:
committed by
Artem Bilan
parent
3f3bbd4f9e
commit
ce1bacf08e
81
build.gradle
81
build.gradle
@@ -15,6 +15,7 @@ plugins {
|
||||
id 'org.asciidoctor.convert' version '1.6.1'
|
||||
id 'org.ajoberstar.grgit' version '3.1.1'
|
||||
id "io.spring.nohttp" version "0.0.3.RELEASE"
|
||||
id "io.spring.dependency-management" version "1.0.8.RELEASE" apply false
|
||||
}
|
||||
|
||||
description = 'Spring AMQP'
|
||||
@@ -35,6 +36,26 @@ ext {
|
||||
|
||||
modifiedFiles =
|
||||
files(grgit.status().unstaged.modified).filter{ f -> f.name.endsWith('.java') || f.name.endsWith('.kt') }
|
||||
|
||||
assertjVersion = '3.12.2'
|
||||
assertkVersion = '0.19'
|
||||
commonsHttpClientVersion = '4.5.9'
|
||||
googleJsr305Version = '3.0.2'
|
||||
hamcrestVersion = '1.3'
|
||||
jackson2Version = '2.9.9.20190807'
|
||||
jaywayJsonPathVersion = '2.4.0'
|
||||
junit4Version = '4.12'
|
||||
junitJupiterVersion = '5.5.1'
|
||||
junitPlatformVersion = '1.5.1'
|
||||
log4jVersion = '2.12.0'
|
||||
logbackVersion = '1.2.3'
|
||||
mockitoVersion = '3.0.0'
|
||||
rabbitmqVersion = project.hasProperty('rabbitmqVersion') ? project.rabbitmqVersion : '5.7.3'
|
||||
rabbitmqHttpClientVersion = '3.2.0.RELEASE'
|
||||
reactorVersion = '3.3.0.BUILD-SNAPSHOT'
|
||||
springDataCommonsVersion = '2.2.0.BUILD-SNAPSHOT'
|
||||
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.2.0.BUILD-SNAPSHOT'
|
||||
springRetryVersion = '1.2.4.RELEASE'
|
||||
}
|
||||
|
||||
nohttp {
|
||||
@@ -45,6 +66,18 @@ nohttp {
|
||||
allprojects {
|
||||
group = 'org.springframework.amqp'
|
||||
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
|
||||
dependencyManagement {
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, 'seconds'
|
||||
}
|
||||
applyMavenExclusions = false
|
||||
generatedPomCustomization {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url 'https://repo.spring.io/libs-release' }
|
||||
if (version.endsWith('BUILD-SNAPSHOT')) {
|
||||
@@ -78,28 +111,6 @@ subprojects { subproject ->
|
||||
sourceCompatibility=1.8
|
||||
targetCompatibility=1.8
|
||||
|
||||
ext {
|
||||
assertjVersion = '3.12.2'
|
||||
assertkVersion = '0.19'
|
||||
commonsHttpClientVersion = '4.5.9'
|
||||
googleJsr305Version = '3.0.2'
|
||||
hamcrestVersion = '1.3'
|
||||
jackson2Version = '2.9.9'
|
||||
jaywayJsonPathVersion = '2.4.0'
|
||||
junit4Version = '4.12'
|
||||
junitJupiterVersion = '5.5.1'
|
||||
junitPlatformVersion = '1.5.1'
|
||||
log4jVersion = '2.12.0'
|
||||
logbackVersion = '1.2.3'
|
||||
mockitoVersion = '3.0.0'
|
||||
rabbitmqVersion = project.hasProperty('rabbitmqVersion') ? project.rabbitmqVersion : '5.7.3'
|
||||
rabbitmqHttpClientVersion = '3.2.0.RELEASE'
|
||||
reactorVersion = '3.3.0.BUILD-SNAPSHOT'
|
||||
springDataCommonsVersion = '2.2.0.BUILD-SNAPSHOT'
|
||||
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.2.0.BUILD-SNAPSHOT'
|
||||
springRetryVersion = '1.2.4.RELEASE'
|
||||
}
|
||||
|
||||
eclipse {
|
||||
project {
|
||||
natures += 'org.springframework.ide.eclipse.core.springnature'
|
||||
@@ -278,6 +289,12 @@ subprojects { subproject ->
|
||||
|
||||
project('spring-amqp') {
|
||||
description = 'Spring AMQP Core'
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "com.fasterxml.jackson:jackson-bom:$jackson2Version"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
compile "org.springframework:spring-core:$springVersion"
|
||||
@@ -288,9 +305,9 @@ project('spring-amqp') {
|
||||
exclude group: 'org.springframework'
|
||||
}
|
||||
|
||||
compile ("com.fasterxml.jackson.core:jackson-core:$jackson2Version", optional)
|
||||
compile ("com.fasterxml.jackson.core:jackson-databind:$jackson2Version", optional)
|
||||
compile ("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson2Version", optional)
|
||||
compile ("com.fasterxml.jackson.core:jackson-core", optional)
|
||||
compile ("com.fasterxml.jackson.core:jackson-databind", optional)
|
||||
compile ("com.fasterxml.jackson.dataformat:jackson-dataformat-xml", optional)
|
||||
|
||||
// Spring Data projection message binding support
|
||||
compile ("org.springframework.data:spring-data-commons:$springDataCommonsVersion") {
|
||||
@@ -307,6 +324,12 @@ project('spring-amqp') {
|
||||
project('spring-rabbit') {
|
||||
description = 'Spring RabbitMQ Support'
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "com.fasterxml.jackson:jackson-bom:$jackson2Version"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
compile project(":spring-amqp")
|
||||
@@ -328,7 +351,7 @@ project('spring-rabbit') {
|
||||
testCompile("com.willowtreeapps.assertk:assertk-jvm:$assertkVersion")
|
||||
testRuntime "org.springframework:spring-web:$springVersion"
|
||||
testRuntime "org.apache.httpcomponents:httpclient:$commonsHttpClientVersion"
|
||||
testRuntime "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson2Version"
|
||||
testRuntime "com.fasterxml.jackson.module:jackson-module-kotlin"
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
@@ -364,6 +387,12 @@ project('spring-rabbit-junit') {
|
||||
project('spring-rabbit-test') {
|
||||
description = 'Spring Rabbit Test Support'
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "com.fasterxml.jackson:jackson-bom:$jackson2Version"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
compile project(":spring-rabbit")
|
||||
|
||||
@@ -14,6 +14,17 @@ install {
|
||||
|
||||
def customizePom(pom, gradleProject) {
|
||||
pom.whenConfigured { generatedPom ->
|
||||
|
||||
// sort to make pom dependencies order consistent to ease comparison of older poms
|
||||
generatedPom.dependencies = generatedPom.dependencies.sort { dep ->
|
||||
"$dep.scope:$dep.groupId:$dep.artifactId"
|
||||
}
|
||||
|
||||
def managedVersions = dependencyManagement.managedVersions
|
||||
generatedPom.dependencies.findAll{dep -> !dep.version }.each { dep ->
|
||||
dep.version = managedVersions["${dep.groupId}:${dep.artifactId}"]
|
||||
}
|
||||
|
||||
// respect 'optional' and 'provided' dependencies
|
||||
gradleProject.optionalDeps.each { dep ->
|
||||
generatedPom.dependencies.find { it.artifactId == dep.name }?.optional = true
|
||||
|
||||
Reference in New Issue
Block a user