浏览代码

Update to latest Tomcat Gradle Plugin

Fixes gh-3754
Rob Winch 9 年之前
父节点
当前提交
e945c19d7a
共有 2 个文件被更改,包括 9 次插入12 次删除
  1. 1 1
      build.gradle
  2. 8 11
      gradle/tomcat.gradle

+ 1 - 1
build.gradle

@@ -7,7 +7,7 @@ buildscript {
 	dependencies {
 		classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
 		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('org.asciidoctor:asciidoctor-gradle-plugin:1.5.1')
 		classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")

+ 8 - 11
gradle/tomcat.gradle

@@ -3,26 +3,22 @@ buildscript {
 		maven { url "https://repo.spring.io/plugins-release" }
 	}
 	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 {
 	def tomcatVersion = '7.0.54'
 	tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
-		   "org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
-		   "org.apache.tomcat.embed:tomcat-embed-websocket:${tomcatVersion}"
-	tomcat("org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}") {
-		exclude group: 'org.eclipse.jdt.core.compiler', module: 'ecj'
-	}
+			"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
+			"org.apache.tomcat.embed:tomcat-embed-websocket:${tomcatVersion}",
+			"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
 }
 
-task integrationTomcatRun(type: org.gradle.api.plugins.tomcat.tasks.TomcatRun) {
+task integrationTomcatRun(type: com.bmuschko.gradle.tomcat.tasks.TomcatRun) {
 	onlyIf { !sourceSets.integrationTest.allSource.empty }
-	buildscriptClasspath = tomcatRun.buildscriptClasspath
-	contextPath = tomcatRun.contextPath
 	daemon = true
 	tomcatClasspath = tomcatRun.tomcatClasspath
 	webAppClasspath = tomcatRun.webAppClasspath
@@ -32,6 +28,7 @@ task integrationTomcatRun(type: org.gradle.api.plugins.tomcat.tasks.TomcatRun) {
 		if(mainOutputDir) {
 			classesDirectory = mainOutputDir
 		}
+		contextPath = tomcatRun.contextPath
 		// delay reserving ports to ensure they are still available
 		def ports = reservePorts(3)
 		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 }
 	doFirst {
 		stopPort = integrationTomcatRun.stopPort