Upgrade dependencies to Spring 5 compatible versions. Require Java 8.
This commit is contained in:
79
build.gradle
79
build.gradle
@@ -4,50 +4,23 @@ description = "Spring Cloud"
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven { url 'https://repo.spring.io/plugins-release' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7'
|
||||
classpath 'io.spring.gradle:spring-io-plugin:0.0.4.RELEASE'
|
||||
classpath 'io.spring.gradle:propdeps-plugin:0.0.8'
|
||||
classpath 'io.spring.gradle:spring-io-plugin:0.0.6.RELEASE'
|
||||
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
|
||||
}
|
||||
}
|
||||
|
||||
ext {
|
||||
springVersion = "3.1.4.RELEASE"
|
||||
tomcatVersion = "7.0.53"
|
||||
|
||||
springAmqpVersion = "1.1.1.RELEASE"
|
||||
|
||||
springDataMongoVersion = "1.4.3.RELEASE"
|
||||
mongoDriverVersion = "2.11.4"
|
||||
|
||||
springDataRedisVersion = "1.1.1.RELEASE"
|
||||
jedisVersion = "2.1.0"
|
||||
lettuceVersion = "3.4.3.Final"
|
||||
|
||||
commonDbcpVersion = "1.4"
|
||||
commonDbcp2Version = "2.0"
|
||||
|
||||
mysqlDriverVersion = "5.1.29"
|
||||
mariadbDriverVersion = "1.1.3"
|
||||
postgresDriverVersion = "9.0-801.jdbc4"
|
||||
|
||||
javaxMailVersion = "1.4.7"
|
||||
|
||||
cglibVersion = "3.1"
|
||||
|
||||
jacksonVersion = "2.3.3"
|
||||
|
||||
junitVersion = "4.11"
|
||||
mockitoVersion = "1.9.5"
|
||||
eurekaClientVersion = "1.1.135"
|
||||
hadoopCommonVersion = "2.2.0"
|
||||
junitVersion = "4.12"
|
||||
mockitoVersion = "2.7.22"
|
||||
|
||||
javadocLinks = [
|
||||
'http://docs.oracle.com/javase/7/docs/api/',
|
||||
'http://docs.oracle.com/javaee/6/api/',
|
||||
'http://docs.oracle.com/javase/8/docs/api/',
|
||||
'http://docs.spring.io/spring/docs/current/javadoc-api/',
|
||||
'http://docs.spring.io/spring-amqp/docs/latest-ga/api/',
|
||||
'http://docs.spring.io/spring-data/data-mongo/docs/current/api/',
|
||||
@@ -96,8 +69,8 @@ subprojects {
|
||||
}
|
||||
}
|
||||
|
||||
sourceCompatibility = 1.6
|
||||
targetCompatibility = 1.6
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
javadoc {
|
||||
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
|
||||
@@ -126,7 +99,9 @@ subprojects {
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url "https://repo.spring.io/libs-milestone" }
|
||||
maven { url "https://repo.spring.io/libs-snapshot" }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,33 +172,13 @@ configure(rootProject) {
|
||||
|
||||
ext {
|
||||
matrix = [
|
||||
"driver211-mongo14": [mongoDriverVersion: "2.11.4", springDataMongoVersion: "1.4.3.RELEASE"],
|
||||
"driver211-mongo15": [mongoDriverVersion: "2.11.4", springDataMongoVersion: "1.5.5.RELEASE"],
|
||||
"driver211-mongo16": [mongoDriverVersion: "2.11.4", springDataMongoVersion: "1.6.3.RELEASE"],
|
||||
"driver213-mongo17": [mongoDriverVersion: "2.13.0", springDataMongoVersion: "1.7.2.RELEASE"],
|
||||
"driver214-mongo18": [mongoDriverVersion: "2.13.0", springDataMongoVersion: "1.8.4.RELEASE"],
|
||||
"driver214-mongo19": [mongoDriverVersion: "2.14.0", springDataMongoVersion: "1.9.2.RELEASE"],
|
||||
"driver32-mongo19" : [mongoDriverVersion: "3.2.2", springDataMongoVersion: "1.9.2.RELEASE"],
|
||||
"jedis25-redis14" : [jedisVersion: "2.5.2", springDataRedisVersion: "1.4.4.RELEASE"],
|
||||
"jedis26-redis15" : [jedisVersion: "2.6.3", springDataRedisVersion: "1.5.2.RELEASE"],
|
||||
"jedis27-redis16" : [jedisVersion: "2.7.3", springDataRedisVersion: "1.6.4.RELEASE"],
|
||||
"jedis28-redis17" : [jedisVersion: "2.8.1", springDataRedisVersion: "1.7.2.RELEASE"],
|
||||
// "lettuce34-redis15": [lettuceVersion: "3.4.3.Final", springDataRedisVersion: "1.5.2.RELEASE"],
|
||||
// "lettuce34-redis16": [lettuceVersion: "3.4.3.Final", springDataRedisVersion: "1.6.4.RELEASE"],
|
||||
// "lettuce34-redis17": [lettuceVersion: "3.4.3.Final", springDataRedisVersion: "1.7.2.RELEASE"],
|
||||
"amqp11" : [springAmqpVersion: "1.1.4.RELEASE"],
|
||||
"amqp12" : [springAmqpVersion: "1.2.2.RELEASE"],
|
||||
"amqp13" : [springAmqpVersion: "1.3.9.RELEASE"],
|
||||
"amqp14" : [springAmqpVersion: "1.4.6.RELEASE"],
|
||||
"amqp15" : [springAmqpVersion: "1.5.6.RELEASE"],
|
||||
"amqp16" : [springAmqpVersion: "1.6.0.RELEASE"],
|
||||
"spring32" : [springVersion: "3.2.17.RELEASE"],
|
||||
"spring40" : [springVersion: "4.0.9.RELEASE"],
|
||||
"spring41" : [springVersion: "4.1.9.RELEASE"],
|
||||
"spring42" : [springVersion: "4.2.6.RELEASE"],
|
||||
"spring43" : [springVersion: "4.3.0.RELEASE"],
|
||||
"tomcat7" : [tomcatVersion: "7.0.53"],
|
||||
"tomcat8" : [tomcatVersion: "8.0.24"],
|
||||
"driver34-mongo20" : [mongoDriverVersion: "3.4.2", springDataMongoVersion: "2.0.0.M1"],
|
||||
"jedis29-redis20" : [jedisVersion: "2.9.0", springDataRedisVersion: "2.0.0.M5"],
|
||||
"lettuce43-redis20" : [lettuceVersion: "4.3.1.Final", springDataRedisVersion: "2.0.0.M5"],
|
||||
"amqp20" : [springAmqpVersion: "2.0.0.M3"],
|
||||
"spring50" : [springVersion: "5.0.0.RELEASE"],
|
||||
"tomcat80" : [tomcatVersion: "8.0.43"],
|
||||
"tomcat85" : [tomcatVersion: "8.5.13"],
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
version=1.2.4.BUILD-SNAPSHOT
|
||||
version=2.0.0.BUILD-SNAPSHOT
|
||||
group=org.springframework.cloud
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
#Wed Jun 29 17:49:51 EDT 2016
|
||||
#Wed Apr 05 11:37:39 CDT 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip
|
||||
|
||||
@@ -1,46 +1,50 @@
|
||||
description = 'Spring-Cloud Cloud Foundry Connector'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
|
||||
}
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
apply from: "publish-maven.gradle"
|
||||
|
||||
ext {
|
||||
jacksonVersion = "2.3.3"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-cloud-core')
|
||||
compile("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
|
||||
compile("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
|
||||
compile project(':spring-cloud-core')
|
||||
compile("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
|
||||
compile("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
classifier = null
|
||||
dependencies {
|
||||
include dependency('com.fasterxml.jackson.core:jackson-.*')
|
||||
}
|
||||
relocate 'com.fasterxml.jackson', 'org.springframework.cloud.cloudfoundry.com.fasterxml.jackson'
|
||||
classifier = null
|
||||
dependencies {
|
||||
include dependency('com.fasterxml.jackson.core:jackson-.*')
|
||||
}
|
||||
relocate 'com.fasterxml.jackson', 'org.springframework.cloud.cloudfoundry.com.fasterxml.jackson'
|
||||
}
|
||||
|
||||
assemble.dependsOn shadowJar
|
||||
install.dependsOn shadowJar
|
||||
|
||||
configurations {
|
||||
tests
|
||||
tests
|
||||
}
|
||||
|
||||
task testJar(type: Jar) {
|
||||
classifier = 'tests'
|
||||
from sourceSets.test.output
|
||||
classifier = 'tests'
|
||||
from sourceSets.test.output
|
||||
}
|
||||
|
||||
build.dependsOn testJar
|
||||
|
||||
artifacts {
|
||||
tests testJar
|
||||
archives testJar
|
||||
tests testJar
|
||||
archives testJar
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
description = 'Spring-Cloud Heroku Connector'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-cloud-core')
|
||||
compile project(':spring-cloud-core')
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
description = 'Spring Cloud local-configuration connector'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-cloud-core')
|
||||
compile 'org.apache.commons:commons-lang3:3.3.2'
|
||||
compile project(':spring-cloud-core')
|
||||
compile 'org.apache.commons:commons-lang3:3.3.2'
|
||||
}
|
||||
|
||||
@@ -1,43 +1,67 @@
|
||||
description = 'Service Connectors'
|
||||
|
||||
dependencies {
|
||||
testCompile project(path: ':spring-cloud-core', configuration: 'tests')
|
||||
compile project(':spring-cloud-core')
|
||||
ext {
|
||||
springVersion = "5.0.0.BUILD-SNAPSHOT"
|
||||
tomcatVersion = "8.5.13"
|
||||
|
||||
compile("org.springframework:spring-context:$springVersion")
|
||||
springAmqpVersion = "2.0.0.BUILD-SNAPSHOT"
|
||||
|
||||
testCompile("org.springframework:spring-test:$springVersion")
|
||||
testCompile("mysql:mysql-connector-java:$mysqlDriverVersion")
|
||||
testCompile("org.mariadb.jdbc:mariadb-java-client:$mariadbDriverVersion")
|
||||
testCompile("postgresql:postgresql:$postgresDriverVersion")
|
||||
testCompile("cglib:cglib-nodep:$cglibVersion")
|
||||
springDataMongoVersion = "2.0.0.BUILD-SNAPSHOT"
|
||||
mongoDriverVersion = "3.4.2"
|
||||
|
||||
testRuntime("javax.mail:javax.mail-api:$javaxMailVersion")
|
||||
springDataRedisVersion = "2.0.0.BUILD-SNAPSHOT"
|
||||
jedisVersion = "2.9.0"
|
||||
lettuceVersion = "4.3.1.Final"
|
||||
|
||||
optional("org.springframework:spring-jdbc:$springVersion")
|
||||
optional("org.springframework:spring-context-support:$springVersion")
|
||||
optional("org.apache.tomcat:tomcat-jdbc:$tomcatVersion")
|
||||
optional("org.apache.tomcat:tomcat-dbcp:$tomcatVersion")
|
||||
optional("org.apache.commons:commons-dbcp2:$commonDbcp2Version") {
|
||||
exclude(group: 'commons-logging', module: 'commons-logging')
|
||||
}
|
||||
optional("commons-dbcp:commons-dbcp:$commonDbcpVersion")
|
||||
optional("com.zaxxer:HikariCP-java6:2.1.0")
|
||||
mysqlDriverVersion = "6.0.6"
|
||||
mariadbDriverVersion = "1.5.9"
|
||||
postgresDriverVersion = "9.1-901-1.jdbc4"
|
||||
|
||||
optional("org.springframework.amqp:spring-rabbit:$springAmqpVersion")
|
||||
commonDbcpVersion = "1.4"
|
||||
commonDbcp2Version = "2.1.1"
|
||||
hikariCpVersion = "2.5.1"
|
||||
|
||||
optional("org.springframework.data:spring-data-redis:$springDataRedisVersion") {
|
||||
exclude(group: 'org.springframework', module: 'spring-context-support')
|
||||
}
|
||||
optional("redis.clients:jedis:$jedisVersion")
|
||||
optional("biz.paluch.redis:lettuce:$lettuceVersion")
|
||||
|
||||
optional("org.springframework.data:spring-data-mongodb:$springDataMongoVersion") {
|
||||
exclude(group: 'org.springframework', module: 'spring-beans')
|
||||
exclude(group: 'org.springframework', module: 'spring-expression')
|
||||
exclude(group: 'org.springframework', module: 'spring-tx')
|
||||
// depend on mongo-java-driver explicitly to control version used for testing
|
||||
exclude(group: 'org.mongodb', module: 'mongo-java-driver')
|
||||
}
|
||||
optional("org.mongodb:mongo-java-driver:${mongoDriverVersion}")
|
||||
javaxMailVersion = "1.5.6"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile project(path: ':spring-cloud-core', configuration: 'tests')
|
||||
compile project(':spring-cloud-core')
|
||||
|
||||
compile("org.springframework:spring-context:$springVersion")
|
||||
|
||||
testCompile("org.springframework:spring-test:$springVersion")
|
||||
|
||||
testCompile("mysql:mysql-connector-java:$mysqlDriverVersion")
|
||||
testCompile("org.mariadb.jdbc:mariadb-java-client:$mariadbDriverVersion")
|
||||
testCompile("postgresql:postgresql:$postgresDriverVersion")
|
||||
|
||||
testRuntime("javax.mail:javax.mail-api:$javaxMailVersion")
|
||||
|
||||
optional("org.springframework:spring-jdbc:$springVersion")
|
||||
optional("org.springframework:spring-context-support:$springVersion")
|
||||
optional("org.apache.tomcat:tomcat-jdbc:$tomcatVersion")
|
||||
optional("org.apache.tomcat:tomcat-dbcp:$tomcatVersion")
|
||||
optional("org.apache.commons:commons-dbcp2:$commonDbcp2Version") {
|
||||
exclude(group: 'commons-logging', module: 'commons-logging')
|
||||
}
|
||||
optional("commons-dbcp:commons-dbcp:$commonDbcpVersion")
|
||||
optional("com.zaxxer:HikariCP:${hikariCpVersion}")
|
||||
|
||||
optional("org.springframework.amqp:spring-rabbit:$springAmqpVersion")
|
||||
|
||||
optional("org.springframework.data:spring-data-redis:$springDataRedisVersion") {
|
||||
exclude(group: 'org.springframework', module: 'spring-context-support')
|
||||
}
|
||||
optional("redis.clients:jedis:$jedisVersion")
|
||||
optional("biz.paluch.redis:lettuce:$lettuceVersion")
|
||||
|
||||
optional("org.springframework.data:spring-data-mongodb:$springDataMongoVersion") {
|
||||
exclude(group: 'org.springframework', module: 'spring-beans')
|
||||
exclude(group: 'org.springframework', module: 'spring-expression')
|
||||
exclude(group: 'org.springframework', module: 'spring-tx')
|
||||
// depend on mongo-java-driver explicitly to control version used for testing
|
||||
exclude(group: 'org.mongodb', module: 'mongo-java-driver')
|
||||
}
|
||||
optional("org.mongodb:mongo-java-driver:${mongoDriverVersion}")
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class MongoDbFactoryCloudConfigTestHelper {
|
||||
|
||||
assertEquals(ReflectionTestUtils.getField(connector, "writeConcern"), writeConcern == null ? null : WriteConcern.valueOf(writeConcern));
|
||||
|
||||
MongoClient mongoClient = (MongoClient) ReflectionTestUtils.getField(connector, "mongo");
|
||||
MongoClient mongoClient = (MongoClient) ReflectionTestUtils.getField(connector, "mongoClient");
|
||||
assertEquals(connectionsPerHost.intValue(), mongoClient.getMongoClientOptions().getConnectionsPerHost());
|
||||
assertEquals(maxWaitTime.intValue(), mongoClient.getMongoClientOptions().getMaxWaitTime());
|
||||
}
|
||||
|
||||
@@ -44,15 +44,13 @@ public class MongoServiceConnectorCreatorTest {
|
||||
MongoServiceInfo serviceInfo = new MongoServiceInfo("id", TEST_HOST, TEST_PORT, TEST_USERNAME, TEST_PASSWORD, TEST_DB);
|
||||
|
||||
MongoDbFactory mongoDbFactory = testCreator.create(serviceInfo, null);
|
||||
|
||||
assertNotNull(mongoDbFactory);
|
||||
|
||||
MongoClient mongo = (MongoClient) ReflectionTestUtils.getField(mongoDbFactory, "mongo");
|
||||
assertNotNull(mongo);
|
||||
MongoClient mongoClient = getMongoClientField(mongoDbFactory);
|
||||
|
||||
MongoCredential credentials = mongo.getCredentialsList().get(0);
|
||||
MongoCredential credentials = mongoClient.getCredentialsList().get(0);
|
||||
|
||||
List<ServerAddress> addresses = extractServerAddresses(mongo);
|
||||
List<ServerAddress> addresses = extractServerAddresses(mongoClient);
|
||||
assertEquals(1, addresses.size());
|
||||
|
||||
ServerAddress address = addresses.get(0);
|
||||
@@ -74,16 +72,14 @@ public class MongoServiceConnectorCreatorTest {
|
||||
MongoServiceInfo serviceInfo = new MongoServiceInfo("id", uri);
|
||||
|
||||
MongoDbFactory mongoDbFactory = testCreator.create(serviceInfo, null);
|
||||
|
||||
assertNotNull(mongoDbFactory);
|
||||
|
||||
MongoClient mongo = (MongoClient) ReflectionTestUtils.getField(mongoDbFactory, "mongo");
|
||||
assertNotNull(mongo);
|
||||
MongoClient mongoClient = getMongoClientField(mongoDbFactory);
|
||||
|
||||
List<ServerAddress> addresses = extractServerAddresses(mongo);
|
||||
List<ServerAddress> addresses = extractServerAddresses(mongoClient);
|
||||
assertEquals(3, addresses.size());
|
||||
|
||||
MongoCredential credentials = mongo.getCredentialsList().get(0);
|
||||
MongoCredential credentials = mongoClient.getCredentialsList().get(0);
|
||||
assertEquals(TEST_USERNAME, credentials.getUserName());
|
||||
assertNotNull(credentials.getPassword());
|
||||
|
||||
@@ -117,4 +113,10 @@ public class MongoServiceConnectorCreatorTest {
|
||||
return client.getAllAddress();
|
||||
}
|
||||
|
||||
private MongoClient getMongoClientField(MongoDbFactory mongoDbFactory) {
|
||||
MongoClient mongo = (MongoClient) ReflectionTestUtils.getField(mongoDbFactory, "mongoClient");
|
||||
assertNotNull(mongo);
|
||||
return mongo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user