From 05ff4ed4e07349170e9ad4371bdf8687b82542ba Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 18 Jul 2016 17:52:35 -0700 Subject: [PATCH] Upgrade to Tomcat 8.5.4 & remove tomcat-juli Upgrade the managed Tomcat dependency to 8.5.4 and remove `tomcat-juli` since it's now included in `tomcat-embed-core`. Fixes gh-6192 --- spring-boot-actuator/pom.xml | 5 ---- spring-boot-dependencies/pom.xml | 7 +---- spring-boot-devtools/pom.xml | 5 ---- spring-boot-docs/pom.xml | 5 ---- spring-boot-docs/src/main/asciidoc/howto.adoc | 27 +++++++++++-------- .../spring-boot-sample-actuator/build.gradle | 6 +++-- .../spring-boot-sample-tomcat-jsp/pom.xml | 1 - .../spring-boot-sample-tomcat7-jsp/pom.xml | 6 +++++ .../spring-boot-sample-tomcat7-ssl/pom.xml | 5 ++++ .../spring-boot-sample-tomcat80-ssl/pom.xml | 5 ++++ .../spring-boot-starter-tomcat/pom.xml | 4 --- spring-boot-test/pom.xml | 5 ---- spring-boot/pom.xml | 5 ---- 13 files changed, 37 insertions(+), 49 deletions(-) diff --git a/spring-boot-actuator/pom.xml b/spring-boot-actuator/pom.xml index f7641cacbe..5ab4246447 100644 --- a/spring-boot-actuator/pom.xml +++ b/spring-boot-actuator/pom.xml @@ -307,11 +307,6 @@ json-path test - - org.apache.tomcat - tomcat-juli - test - org.aspectj aspectjrt diff --git a/spring-boot-dependencies/pom.xml b/spring-boot-dependencies/pom.xml index b11d32ad23..9b02e93a66 100644 --- a/spring-boot-dependencies/pom.xml +++ b/spring-boot-dependencies/pom.xml @@ -173,7 +173,7 @@ 1.4.0 1.3 2.1.0.RELEASE - 8.5.3 + 8.5.4 1.3.23.Final 1.7 2.0 @@ -1334,11 +1334,6 @@ tomcat-jsp-api ${tomcat.version} - - org.apache.tomcat - tomcat-juli - ${tomcat.version} - org.apache.velocity velocity diff --git a/spring-boot-devtools/pom.xml b/spring-boot-devtools/pom.xml index a559823b17..cfba6a86a2 100644 --- a/spring-boot-devtools/pom.xml +++ b/spring-boot-devtools/pom.xml @@ -117,11 +117,6 @@ tomcat-embed-core test - - org.apache.tomcat - tomcat-juli - test - org.eclipse.jetty.websocket websocket-client diff --git a/spring-boot-docs/pom.xml b/spring-boot-docs/pom.xml index 1be05ea19f..f347ef3c01 100644 --- a/spring-boot-docs/pom.xml +++ b/spring-boot-docs/pom.xml @@ -299,11 +299,6 @@ tomcat-embed-jasper true - - org.apache.tomcat - tomcat-juli - true - org.apache.tomcat tomcat-jdbc diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index 0696db8b4c..56ad5472cf 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -884,18 +884,17 @@ add a listener to the `Builder`: [[howto-use-tomcat-7]] -=== Use Tomcat 7 -Tomcat 7 works with Spring Boot, but the default is to use Tomcat 8. If you cannot use -Tomcat 8 (for example, because you are using Java 1.6) you will need to change your -classpath to reference Tomcat 7 . +=== Use Tomcat 7.x or 8.0 +Tomcat 7 & 8.0 work with Spring Boot, but the default is to use Tomcat 8.5. If you cannot +use Tomcat 8.5 (for example, because you are using Java 1.6) you will need to change your +classpath to reference a different version. -==== Use Tomcat 7 with Maven [[howto-use-tomcat-7-maven]] - -If you are using the starters and parent you can just change the Tomcat version -property, e.g. for a simple webapp or service: +==== Use Tomcat 7.x or 8.0 with Maven +If you are using the starters and parent you can change the Tomcat version property +and additionally import `tomcat-juli`. E.g. for a simple webapp or service: [source,xml,indent=0,subs="verbatim,quotes,attributes"] ---- @@ -908,22 +907,28 @@ property, e.g. for a simple webapp or service: org.springframework.boot spring-boot-starter-web + + org.apache.tomcat + tomcat-juli + ${tomcat.version} + ... ---- -==== Use Tomcat 7 with Gradle +==== Use Tomcat 7.x or 8.0 with Gradle [[howto-use-tomcat-7-gradle]] - -You can change the Tomcat version by setting the `tomcat.version` property: +With Gradle, you can change the Tomcat version by setting the `tomcat.version` property +and then additionally include `tomcat-juli`: [source,groovy,indent=0,subs="verbatim,quotes,attributes"] ---- ext['tomcat.version'] = '7.0.59' dependencies { compile 'org.springframework.boot:spring-boot-starter-web' + compile group:'org.apache.tomcat', name:'tomcat-juli', version:property('tomcat.version') } ---- diff --git a/spring-boot-samples/spring-boot-sample-actuator/build.gradle b/spring-boot-samples/spring-boot-sample-actuator/build.gradle index 6413d1c946..2eb7e260f8 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/build.gradle +++ b/spring-boot-samples/spring-boot-sample-actuator/build.gradle @@ -20,6 +20,8 @@ apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'spring-boot' +ext['h2.version'] = '1.4.192' + jar { baseName = 'spring-boot-sample-actuator' } @@ -45,7 +47,7 @@ dependencies { compile("org.springframework.boot:spring-boot-starter-jdbc") compile("org.springframework.boot:spring-boot-starter-security") compile("org.springframework.boot:spring-boot-starter-web") - compile("com.h2database:h2") + compile group:"com.h2database", name:"h2", version:property('h2.version') testCompile("org.springframework.boot:spring-boot-starter-test") @@ -64,4 +66,4 @@ task wrapper(type: Wrapper) { springBoot { buildInfo() -} \ No newline at end of file +} diff --git a/spring-boot-samples/spring-boot-sample-tomcat-jsp/pom.xml b/spring-boot-samples/spring-boot-sample-tomcat-jsp/pom.xml index 0fe62952f9..c09885658b 100644 --- a/spring-boot-samples/spring-boot-sample-tomcat-jsp/pom.xml +++ b/spring-boot-samples/spring-boot-sample-tomcat-jsp/pom.xml @@ -19,7 +19,6 @@ ${basedir}/../.. / - 7.0.69 diff --git a/spring-boot-samples/spring-boot-sample-tomcat7-jsp/pom.xml b/spring-boot-samples/spring-boot-sample-tomcat7-jsp/pom.xml index 42671a919f..bd513401eb 100644 --- a/spring-boot-samples/spring-boot-sample-tomcat7-jsp/pom.xml +++ b/spring-boot-samples/spring-boot-sample-tomcat7-jsp/pom.xml @@ -31,6 +31,12 @@ spring-boot-starter-tomcat provided + + org.apache.tomcat + tomcat-juli + ${tomcat.version} + provided + org.apache.tomcat.embed tomcat-embed-jasper diff --git a/spring-boot-samples/spring-boot-sample-tomcat7-ssl/pom.xml b/spring-boot-samples/spring-boot-sample-tomcat7-ssl/pom.xml index 8796da6189..5b360cc16f 100644 --- a/spring-boot-samples/spring-boot-sample-tomcat7-ssl/pom.xml +++ b/spring-boot-samples/spring-boot-sample-tomcat7-ssl/pom.xml @@ -36,6 +36,11 @@ org.apache.httpcomponents httpclient + + org.apache.tomcat + tomcat-juli + ${tomcat.version} + org.springframework.boot spring-boot-starter-test diff --git a/spring-boot-samples/spring-boot-sample-tomcat80-ssl/pom.xml b/spring-boot-samples/spring-boot-sample-tomcat80-ssl/pom.xml index b2a4f802ff..b27d943bd3 100644 --- a/spring-boot-samples/spring-boot-sample-tomcat80-ssl/pom.xml +++ b/spring-boot-samples/spring-boot-sample-tomcat80-ssl/pom.xml @@ -41,6 +41,11 @@ spring-boot-starter-test test + + org.apache.tomcat + tomcat-juli + ${tomcat.version} + org.yaml snakeyaml diff --git a/spring-boot-starters/spring-boot-starter-tomcat/pom.xml b/spring-boot-starters/spring-boot-starter-tomcat/pom.xml index 7f8388079e..56f49c1fdc 100644 --- a/spring-boot-starters/spring-boot-starter-tomcat/pom.xml +++ b/spring-boot-starters/spring-boot-starter-tomcat/pom.xml @@ -27,10 +27,6 @@ org.apache.tomcat.embed tomcat-embed-el - - org.apache.tomcat - tomcat-juli - org.apache.tomcat.embed tomcat-embed-websocket diff --git a/spring-boot-test/pom.xml b/spring-boot-test/pom.xml index 067563b234..3e147e3913 100644 --- a/spring-boot-test/pom.xml +++ b/spring-boot-test/pom.xml @@ -111,11 +111,6 @@ tomcat-embed-core test - - org.apache.tomcat - tomcat-juli - test - org.springframework spring-webmvc diff --git a/spring-boot/pom.xml b/spring-boot/pom.xml index a6c8e35209..65b43c89c4 100644 --- a/spring-boot/pom.xml +++ b/spring-boot/pom.xml @@ -109,11 +109,6 @@ tomcat-embed-jasper true - - org.apache.tomcat - tomcat-juli - true - org.apache.velocity velocity