From 9d53dd46bbf1cbad3fd456e60c0e75e035ebbf50 Mon Sep 17 00:00:00 2001 From: Jon Schneider Date: Fri, 12 May 2017 09:18:36 -0500 Subject: [PATCH 1/4] Update SNAPSHOT to 1.2.1.RELEASE --- .gitignore | 1 + README.adoc | 2 +- docs/pom.xml | 2 +- pom.xml | 4 ++-- spring-cloud-commons-dependencies/pom.xml | 4 ++-- spring-cloud-commons/pom.xml | 2 +- spring-cloud-context/pom.xml | 2 +- spring-cloud-starter/pom.xml | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 9df3ab04..4500f63c 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ _site/ *.iml .idea .factorypath +/spring-cloud-release-tools*.jar diff --git a/README.adoc b/README.adoc index 604b808f..f9b4983f 100644 --- a/README.adoc +++ b/README.adoc @@ -151,4 +151,4 @@ added after the original pull request but before a merge. other target branch in the main project). * When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit - message (where XXXX is the issue number). + message (where XXXX is the issue number). \ No newline at end of file diff --git a/docs/pom.xml b/docs/pom.xml index b9379167..a99b2dd5 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-commons-parent - 1.2.1.BUILD-SNAPSHOT + 1.2.1.RELEASE pom Spring Cloud Commons Docs diff --git a/pom.xml b/pom.xml index 9aebec4a..09afb505 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.springframework.cloud spring-cloud-commons-parent - 1.2.1.BUILD-SNAPSHOT + 1.2.1.RELEASE pom Spring Cloud Commons Parent Spring Cloud Commons Parent @@ -11,7 +11,7 @@ org.springframework.cloud spring-cloud-build - 1.3.1.BUILD-SNAPSHOT + 1.3.2.RELEASE diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml index ec8ceb2f..3afb8878 100644 --- a/spring-cloud-commons-dependencies/pom.xml +++ b/spring-cloud-commons-dependencies/pom.xml @@ -5,11 +5,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 1.3.1.BUILD-SNAPSHOT + 1.3.2.RELEASE spring-cloud-commons-dependencies - 1.2.1.BUILD-SNAPSHOT + 1.2.1.RELEASE pom spring-cloud-commons-dependencies Spring Cloud Commons Dependencies diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml index 7cd688eb..b55a7051 100644 --- a/spring-cloud-commons/pom.xml +++ b/spring-cloud-commons/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-commons-parent - 1.2.1.BUILD-SNAPSHOT + 1.2.1.RELEASE .. spring-cloud-commons diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml index 542aa6bf..f649498e 100644 --- a/spring-cloud-context/pom.xml +++ b/spring-cloud-context/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-commons-parent - 1.2.1.BUILD-SNAPSHOT + 1.2.1.RELEASE .. spring-cloud-context diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml index 2d1c8cab..50bc6317 100644 --- a/spring-cloud-starter/pom.xml +++ b/spring-cloud-starter/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-commons-parent - 1.2.1.BUILD-SNAPSHOT + 1.2.1.RELEASE spring-cloud-starter spring-cloud-starter From c02398959d11a733d305057c584f2b462c1184de Mon Sep 17 00:00:00 2001 From: Jon Schneider Date: Fri, 12 May 2017 10:25:38 -0500 Subject: [PATCH 2/4] Revert back to snapshots --- README.adoc | 2 +- docs/pom.xml | 2 +- pom.xml | 4 ++-- spring-cloud-commons-dependencies/pom.xml | 4 ++-- spring-cloud-commons/pom.xml | 2 +- spring-cloud-context/pom.xml | 2 +- spring-cloud-starter/pom.xml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.adoc b/README.adoc index f9b4983f..604b808f 100644 --- a/README.adoc +++ b/README.adoc @@ -151,4 +151,4 @@ added after the original pull request but before a merge. other target branch in the main project). * When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit - message (where XXXX is the issue number). \ No newline at end of file + message (where XXXX is the issue number). diff --git a/docs/pom.xml b/docs/pom.xml index a99b2dd5..97c27e3a 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-commons-parent - 1.2.1.RELEASE + 1.2.2.BUILD-SNAPSHOT pom Spring Cloud Commons Docs diff --git a/pom.xml b/pom.xml index 09afb505..c6e33da7 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.springframework.cloud spring-cloud-commons-parent - 1.2.1.RELEASE + 1.2.2.BUILD-SNAPSHOT pom Spring Cloud Commons Parent Spring Cloud Commons Parent @@ -11,7 +11,7 @@ org.springframework.cloud spring-cloud-build - 1.3.2.RELEASE + 1.3.3.BUILD-SNAPSHOT diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml index 3afb8878..44546b19 100644 --- a/spring-cloud-commons-dependencies/pom.xml +++ b/spring-cloud-commons-dependencies/pom.xml @@ -5,11 +5,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 1.3.2.RELEASE + 1.3.3.BUILD-SNAPSHOT spring-cloud-commons-dependencies - 1.2.1.RELEASE + 1.2.1.BUILD-SNAPSHOT pom spring-cloud-commons-dependencies Spring Cloud Commons Dependencies diff --git a/spring-cloud-commons/pom.xml b/spring-cloud-commons/pom.xml index b55a7051..c58c96ce 100644 --- a/spring-cloud-commons/pom.xml +++ b/spring-cloud-commons/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-commons-parent - 1.2.1.RELEASE + 1.2.2.BUILD-SNAPSHOT .. spring-cloud-commons diff --git a/spring-cloud-context/pom.xml b/spring-cloud-context/pom.xml index f649498e..54e834ac 100644 --- a/spring-cloud-context/pom.xml +++ b/spring-cloud-context/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-commons-parent - 1.2.1.RELEASE + 1.2.2.BUILD-SNAPSHOT .. spring-cloud-context diff --git a/spring-cloud-starter/pom.xml b/spring-cloud-starter/pom.xml index 50bc6317..488e0906 100644 --- a/spring-cloud-starter/pom.xml +++ b/spring-cloud-starter/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-commons-parent - 1.2.1.RELEASE + 1.2.2.BUILD-SNAPSHOT spring-cloud-starter spring-cloud-starter From 206ba7bcc1215f1cff0cdac3a27fb34b9ad10bca Mon Sep 17 00:00:00 2001 From: Jon Schneider Date: Fri, 12 May 2017 10:33:18 -0500 Subject: [PATCH 3/4] Update spring-cloud-commons-dependencies version --- spring-cloud-commons-dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-cloud-commons-dependencies/pom.xml b/spring-cloud-commons-dependencies/pom.xml index 44546b19..48927011 100644 --- a/spring-cloud-commons-dependencies/pom.xml +++ b/spring-cloud-commons-dependencies/pom.xml @@ -9,7 +9,7 @@ spring-cloud-commons-dependencies - 1.2.1.BUILD-SNAPSHOT + 1.2.2.BUILD-SNAPSHOT pom spring-cloud-commons-dependencies Spring Cloud Commons Dependencies From 01cca0275a57adfb930698c819417e26c75f2158 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Tue, 16 May 2017 14:48:19 +0100 Subject: [PATCH 4/4] Be defensive about web classes being available --- .../SimpleDiscoveryClientAutoConfiguration.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/simple/SimpleDiscoveryClientAutoConfiguration.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/simple/SimpleDiscoveryClientAutoConfiguration.java index 5fd8175c..797f632b 100644 --- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/simple/SimpleDiscoveryClientAutoConfiguration.java +++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/simple/SimpleDiscoveryClientAutoConfiguration.java @@ -16,6 +16,7 @@ import org.springframework.cloud.commons.util.InetUtils; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.util.ClassUtils; /** * Spring Boot Auto-Configuration for Simple Properties based Discovery Client @@ -59,11 +60,15 @@ public class SimpleDiscoveryClientAutoConfiguration { } private int findPort() { - if (this.context instanceof EmbeddedWebApplicationContext) { - EmbeddedServletContainer container = ((EmbeddedWebApplicationContext) this.context) - .getEmbeddedServletContainer(); - if (container != null) { - return container.getPort(); + if (ClassUtils.isPresent( + "org.springframework.boot.context.embedded.EmbeddedWebApplicationContext", + null)) { + if (this.context instanceof EmbeddedWebApplicationContext) { + EmbeddedServletContainer container = ((EmbeddedWebApplicationContext) this.context) + .getEmbeddedServletContainer(); + if (container != null) { + return container.getPort(); + } } } if (this.server != null && this.server.getPort() != null