mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-25 13:32:30 +00:00
Update to latest Tomcat Gradle Plugin
Fixes gh-3754
This commit is contained in:
parent
df65662bf0
commit
e945c19d7a
@ -7,7 +7,7 @@ buildscript {
|
|||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
|
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:spring-io-plugin:0.0.4.RELEASE")
|
||||||
classpath("org.gradle.api.plugins:gradle-tomcat-plugin:1.2.5")
|
classpath("com.bmuschko:gradle-tomcat-plugin:2.2.4")
|
||||||
classpath('me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1')
|
classpath('me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1')
|
||||||
classpath('org.asciidoctor:asciidoctor-gradle-plugin:1.5.1')
|
classpath('org.asciidoctor:asciidoctor-gradle-plugin:1.5.1')
|
||||||
classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
|
classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
|
||||||
|
@ -3,26 +3,22 @@ buildscript {
|
|||||||
maven { url "https://repo.spring.io/plugins-release" }
|
maven { url "https://repo.spring.io/plugins-release" }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.gradle.api.plugins:gradle-tomcat-plugin:1.2.5")
|
classpath("com.bmuschko:gradle-tomcat-plugin:2.2.4")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'tomcat'
|
apply plugin: 'com.bmuschko.tomcat'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
def tomcatVersion = '7.0.54'
|
def tomcatVersion = '7.0.54'
|
||||||
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
|
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
|
||||||
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
|
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
|
||||||
"org.apache.tomcat.embed:tomcat-embed-websocket:${tomcatVersion}"
|
"org.apache.tomcat.embed:tomcat-embed-websocket:${tomcatVersion}",
|
||||||
tomcat("org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}") {
|
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
|
||||||
exclude group: 'org.eclipse.jdt.core.compiler', module: 'ecj'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task integrationTomcatRun(type: org.gradle.api.plugins.tomcat.tasks.TomcatRun) {
|
task integrationTomcatRun(type: com.bmuschko.gradle.tomcat.tasks.TomcatRun) {
|
||||||
onlyIf { !sourceSets.integrationTest.allSource.empty }
|
onlyIf { !sourceSets.integrationTest.allSource.empty }
|
||||||
buildscriptClasspath = tomcatRun.buildscriptClasspath
|
|
||||||
contextPath = tomcatRun.contextPath
|
|
||||||
daemon = true
|
daemon = true
|
||||||
tomcatClasspath = tomcatRun.tomcatClasspath
|
tomcatClasspath = tomcatRun.tomcatClasspath
|
||||||
webAppClasspath = tomcatRun.webAppClasspath
|
webAppClasspath = tomcatRun.webAppClasspath
|
||||||
@ -32,6 +28,7 @@ task integrationTomcatRun(type: org.gradle.api.plugins.tomcat.tasks.TomcatRun) {
|
|||||||
if(mainOutputDir) {
|
if(mainOutputDir) {
|
||||||
classesDirectory = mainOutputDir
|
classesDirectory = mainOutputDir
|
||||||
}
|
}
|
||||||
|
contextPath = tomcatRun.contextPath
|
||||||
// delay reserving ports to ensure they are still available
|
// delay reserving ports to ensure they are still available
|
||||||
def ports = reservePorts(3)
|
def ports = reservePorts(3)
|
||||||
httpPort = ports[0]
|
httpPort = ports[0]
|
||||||
@ -40,7 +37,7 @@ task integrationTomcatRun(type: org.gradle.api.plugins.tomcat.tasks.TomcatRun) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task integrationTomcatStop(type: org.gradle.api.plugins.tomcat.tasks.TomcatStop) {
|
task integrationTomcatStop(type: com.bmuschko.gradle.tomcat.tasks.TomcatStop) {
|
||||||
onlyIf { !sourceSets.integrationTest.allSource.empty }
|
onlyIf { !sourceSets.integrationTest.allSource.empty }
|
||||||
doFirst {
|
doFirst {
|
||||||
stopPort = integrationTomcatRun.stopPort
|
stopPort = integrationTomcatRun.stopPort
|
||||||
|
Loading…
x
Reference in New Issue
Block a user