build.gradle 50.5 KB
Newer Older
1
buildscript {
2
	ext.kotlinVersion = '1.1.1'
3
	repositories {
4
		maven { url "https://repo.spring.io/plugins-release" }
5 6
	}
	dependencies {
7
		classpath("io.spring.gradle:dependency-management-plugin:1.0.0.RELEASE")
R
Rob Winch 已提交
8
		classpath("io.spring.gradle:propdeps-plugin:0.0.8")
9
		classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
10
		classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
11 12 13
		classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.3")
		classpath("org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.14")
		classpath("org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.6")
14
	}
15 16
}

17
plugins {
18
	id "org.sonarqube" version "2.2.1"
19 20
}

S
Stephane Nicoll 已提交
21 22 23 24 25 26
ext {
	linkHomepage = 'https://projects.spring.io/spring-framework'
	linkCi = 'https://build.spring.io/browse/SPR'
	linkIssue = 'https://jira.spring.io/browse/SPR'
	linkScmUrl = 'https://github.com/spring-projects/spring-framework'
	linkScmConnection = 'scm:git:git://github.com/spring-projects/spring-framework.git'
27
	linkScmDevConnection = 'scm:git:ssh://git@github.com:spring-projects/spring-framework.git'
28

29
	moduleProjects = subprojects.findAll {
30 31
		!it.name.equals('spring-build-src') && !it.name.equals('spring-framework-bom')
	}
S
Stephane Nicoll 已提交
32 33
}

C
Chris Beams 已提交
34
configure(allprojects) { project ->
35 36
	group = "org.springframework"
	version = qualifyVersionIfNecessary(version)
37

38
	ext.activationApiVersion   = "1.1.1"
39
	ext.annotationApiVersion   = "1.2"
J
Juergen Hoeller 已提交
40
	ext.aspectjVersion         = "1.9.0.BETA-5"
41
	ext.beanvalVersion         = "1.1.0.Final"
42
	ext.cacheApiVersion        = "1.0.0"
43
	ext.caffeineVersion        = "2.4.0"
44
	ext.eclipselinkVersion     = "2.6.4"
45
	ext.ehcacheVersion         = "2.10.3"
46
	ext.ehcachejcacheVersion   = "1.0.1"
47
	ext.ehcache3Version        = "3.3.1"
48
	ext.ejbApiVersion          = "3.2"
J
Juergen Hoeller 已提交
49
	ext.elApiVersion           = "3.0.1-b04"
50
	ext.fileuploadVersion      = "1.3.2"
51
	ext.freemarkerVersion      = "2.3.26-incubating"
52
	ext.groovyVersion          = "2.4.10"
53
	ext.gsonVersion            = "2.8.0"
54
	ext.hamcrestVersion        = "1.3"
55 56
	ext.hibernate5Version      = "5.2.9.Final"
	ext.hibval5Version         = "5.4.1.Final"
57
	ext.hsqldbVersion          = "2.3.4"
58
	ext.httpasyncVersion       = "4.1.3"
59
	ext.httpclientVersion      = "4.5.3"
60
	ext.interceptorApiVersion  = "1.2"
S
Sebastien Deleuze 已提交
61
	ext.jackson2Version        = "2.9.0.pr2"
62
	ext.javamailVersion        = "1.6.0-rc1"
63
	ext.jaxbVersion            = "2.2.11"
64
	ext.jaxwsVersion           = "2.2.11"
65
	ext.jcaVersion             = "1.7"
66
	ext.jettyVersion           = "9.4.3.v20170317"
67
	ext.jmsVersion             = "2.0.1"
68
	ext.jodaVersion            = "2.9.9"
69
	ext.jpaVersion             = "2.1.1"
70
	ext.jsfVersion             = "2.2"
71 72 73
	ext.jspVersion             = "2.3.2-b02"
	ext.jtaVersion             = "1.2"
	ext.junitVersion           = "4.12"
S
Sam Brannen 已提交
74 75
	ext.junitJupiterVersion    = '5.0.0-M4'
	ext.junitPlatformVersion   = '1.0.0-M4'
76
	ext.log4jVersion           = '2.8.2'
77
	ext.nettyVersion           = "4.1.9.Final"
78
	ext.okhttp3Version         = "3.6.0"
79
	ext.poiVersion             = "3.15"
80
	ext.protobufVersion        = "3.2.0"
81
	ext.quartzVersion          = "2.2.3"
82
	ext.reactorVersion         = "Aluminium-BUILD-SNAPSHOT"
83
	ext.romeVersion            = "1.7.1"
84
	ext.rxjavaVersion          = '1.2.9'
85
	ext.rxjavaAdapterVersion   = '1.2.1'
86
	ext.rxjava2Version         = '2.0.8'
87
	ext.rxnettyVersion         = '0.5.2'
88
	ext.servletVersion         = "3.1.0"
89
	ext.slf4jVersion           = "1.7.25"
90
	ext.snakeyamlVersion       = "1.18"
91
	ext.testngVersion          = "6.11"
J
Juergen Hoeller 已提交
92
	ext.tiles3Version          = "3.0.7"
93
	ext.tomcatVersion          = "8.5.13"
94
	ext.tyrusVersion           = "1.13.1"
95
	ext.undertowVersion        = "1.4.12.Final"
96
	ext.websocketVersion       = "1.1"
97
	ext.woodstoxVersion        = "5.0.3"
98
	ext.xmlunitVersion         = "2.3.0"
99
	ext.xnioVersion            = "3.4.5.Final"
100
	ext.xstreamVersion         = "1.4.9"
101

102
	ext.gradleScriptDir = "${rootProject.projectDir}/gradle"
103

104
	apply plugin: "propdeps"
P
Phillip Webb 已提交
105
	apply plugin: "java"
106
	apply plugin: "test-source-set-dependencies"
107
	apply from: "${gradleScriptDir}/ide.gradle"
108
	apply from: "${gradleScriptDir}/sniffer.gradle"
C
Chris Beams 已提交
109

S
Sebastien Deleuze 已提交
110 111 112
	// Kotlin compiler does not support JDK 9 yet, see https://youtrack.jetbrains.com/issue/KT-14988
	if (!JavaVersion.current().java9Compatible) {
		apply plugin: "kotlin"
113 114
		compileKotlin {
			kotlinOptions.jvmTarget = "1.8"
115 116
			kotlinOptions.freeCompilerArgs = ["-Xskip-runtime-version-check"]

117 118 119
		}
		compileTestKotlin {
			kotlinOptions.jvmTarget = "1.8"
120
			kotlinOptions.freeCompilerArgs = ["-Xskip-runtime-version-check"]
121
		}
S
Sebastien Deleuze 已提交
122 123
	}

124
	configurations.all {
J
Juergen Hoeller 已提交
125
		// Check for updates every build
126 127
		resolutionStrategy.cacheChangingModulesFor 0, 'seconds'

J
Juergen Hoeller 已提交
128
		// Consistent netty version (e.g. clashes between netty-all vs netty-common)
129 130 131 132 133 134 135
		resolutionStrategy.eachDependency { DependencyResolveDetails details ->
			if (details.requested.group == 'io.netty') {
				details.useVersion nettyVersion
			}
		}
	}

P
Phillip Webb 已提交
136 137 138
	compileJava.options*.compilerArgs = [
		"-Xlint:serial", "-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile",
		"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
S
Stephane Nicoll 已提交
139
		"-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static",
P
Phillip Webb 已提交
140
		"-Xlint:try", "-Xlint:fallthrough", "-Xlint:rawtypes", "-Xlint:deprecation",
141
		"-Xlint:unchecked", "-Xlint:-options", "-Werror"
142
	]
C
Chris Beams 已提交
143

P
Phillip Webb 已提交
144
	compileTestJava.options*.compilerArgs = [
145
		"-Xlint:serial", "-Xlint:-varargs", "-Xlint:cast", "-Xlint:classfile",
P
Phillip Webb 已提交
146
		"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
S
Stephane Nicoll 已提交
147
		"-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static",
P
Phillip Webb 已提交
148 149 150
		"-Xlint:try", "-Xlint:-fallthrough", "-Xlint:-rawtypes", "-Xlint:-deprecation",
		"-Xlint:-unchecked", "-Xlint:-options"]

151
	compileJava {
152 153
		sourceCompatibility = 1.8
		targetCompatibility = 1.8
154
		options.encoding = 'UTF-8'
155 156 157
	}

	compileTestJava {
J
Juergen Hoeller 已提交
158 159
		sourceCompatibility = 1.8
		targetCompatibility = 1.8
160
		options.encoding = 'UTF-8'
161
		options.compilerArgs += "-parameters"
J
Juergen Hoeller 已提交
162 163
	}

C
Chris Beams 已提交
164 165
	test {
		systemProperty("java.awt.headless", "true")
166
		systemProperty("testGroups", project.properties.get("testGroups"))
167
		scanForTestClasses = false
168
		include(["**/*Tests.class", "**/*Test.class"])
169 170
		// Since we set scanForTestClasses to false, we need to filter out inner
		// classes with the "$" pattern; otherwise, using -Dtest.single=MyTests to
171
		// run MyTests by itself will fail if MyTests contains any inner classes.
172
		exclude(["**/Abstract*.class", '**/*$*'])
S
Stephane Nicoll 已提交
173
		reports.junitXml.destination = file("$buildDir/test-results")
C
Chris Beams 已提交
174
	}
C
Chris Beams 已提交
175

176
	repositories {
B
Brian Clozel 已提交
177
		maven { url "https://repo.spring.io/libs-release" }
178
		maven { url "https://repo.spring.io/libs-snapshot" }
179
		maven { url "https://repo.spring.io/milestone" }
180
	}
C
Chris Beams 已提交
181

182
	dependencies {
183 184 185
		testCompile("junit:junit:${junitVersion}") {
			exclude group:'org.hamcrest', module:'hamcrest-core'
		}
186
		testCompile("org.mockito:mockito-core:2.6.1") {
187 188
			exclude group:'org.hamcrest', module:'hamcrest-core'
		}
189
		testCompile("org.hamcrest:hamcrest-all:${hamcrestVersion}")
190
		testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
191
	}
C
Chris Beams 已提交
192 193

	ext.javadocLinks = [
194
		"http://docs.oracle.com/javase/8/docs/api/",
195
		"http://docs.oracle.com/javaee/7/api/",
196
		"http://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/",  // CommonJ
J
Juergen Hoeller 已提交
197 198
		"http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.javadoc.doc/web/apidocs/",
		"http://glassfish.java.net/nonav/docs/v3/api/",
P
Phillip Webb 已提交
199 200
		"http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/",
		"http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/",
201
		"http://tiles.apache.org/tiles-request/apidocs/",
J
Juergen Hoeller 已提交
202
		"http://tiles.apache.org/framework/apidocs/",
C
Chris Beams 已提交
203
		"http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/",
B
Brian Clozel 已提交
204 205
		"http://ehcache.org/apidocs/${ehcacheVersion}",
		"http://ehcache.org/apidocs/${ehcache3Version}",
206
		"http://quartz-scheduler.org/api/2.2.1/",
207 208 209
		"http://fasterxml.github.io/jackson-core/javadoc/2.8/",
		"http://fasterxml.github.io/jackson-databind/javadoc/2.8/",
		"http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.8/",
210
		"http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/"
C
Chris Beams 已提交
211
	] as String[]
212 213
}

214
configure(subprojects - project(":spring-build-src")) { subproject ->
215
	apply plugin: "merge"
216
	apply from: "${gradleScriptDir}/publish-maven.gradle"
217 218 219 220 221 222 223 224 225 226 227
	apply plugin: "io.spring.dependency-management"

	dependencyManagement {
		imports {
			mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
		}
		resolutionStrategy {
			cacheChangingModulesFor 0, 'seconds'
		}
		applyMavenExclusions = false
	}
228

S
Stephane Nicoll 已提交
229 230 231 232
	configurations {
		jacoco
	}
	dependencies {
233
		jacoco("org.jacoco:org.jacoco.agent:0.7.5.201505241946:runtime")
S
Stephane Nicoll 已提交
234 235 236
	}

	gradle.taskGraph.whenReady {taskGraph ->
237
		if (taskGraph.hasTask(':sonarqube')) {
S
Stephane Nicoll 已提交
238 239 240 241
			test.jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.*"
		}
	}

242
	jar {
P
Phillip Webb 已提交
243 244 245 246
		manifest.attributes["Created-By"] =
			"${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
		manifest.attributes["Implementation-Title"] = subproject.name
		manifest.attributes["Implementation-Version"] = subproject.version
247 248 249 250 251

		from("${rootProject.projectDir}/src/dist") {
			include "license.txt"
			include "notice.txt"
			into "META-INF"
P
Phillip Webb 已提交
252
			expand(copyright: new Date().format("yyyy"), version: project.version)
253 254 255 256
		}
	}

	javadoc {
C
Chris Beams 已提交
257 258
		description = "Generates project-level javadoc for use in -javadoc jar"

259 260 261
		options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
		options.author = true
		options.header = project.name
C
Chris Beams 已提交
262
		options.links(project.ext.javadocLinks)
263
		options.addStringOption('Xdoclint:none', '-quiet')
C
Chris Beams 已提交
264

265 266
		// Suppress warnings due to cross-module @see and @link references.
		// Note that global 'api' task does display all warnings.
C
Chris Beams 已提交
267
		logging.captureStandardError LogLevel.INFO
268
		logging.captureStandardOutput LogLevel.INFO  // suppress "## warnings" message
269 270
	}

271 272
	task sourcesJar(type: Jar, dependsOn: classes) {
		classifier = 'sources'
273
		from sourceSets.main.allSource
274
		// Don't include or exclude anything explicitly by default. See SPR-12085.
275 276 277
	}

	task javadocJar(type: Jar) {
P
Phillip Webb 已提交
278
		classifier = "javadoc"
279 280 281 282 283 284 285
		from javadoc
	}

	artifacts {
		archives sourcesJar
		archives javadocJar
	}
C
Chris Beams 已提交
286 287
}

288 289
project("spring-build-src") {
	description = "Exposes gradle buildSrc for IDE support"
290

291
	apply plugin: "groovy"
292 293 294

	dependencies {
		compile gradleApi()
R
Rob Winch 已提交
295
		compile localGroovy()
296 297 298 299 300
	}

	configurations.archives.artifacts.clear()
}

P
Phillip Webb 已提交
301 302
project("spring-core") {
	description = "Spring Core"
303

304 305
	// As of Spring 4.0.3, spring-core includes asm 5.x and repackages cglib 3.2, inlining
	// both into the spring-core jar. cglib 3.2 itself depends on asm 5.x and is therefore
306
	// further transformed by the JarJar task to depend on org.springframework.asm; this
307
	// avoids including two different copies of asm unnecessarily.
J
Juergen Hoeller 已提交
308
	def cglibVersion = "3.2.5"
J
Juergen Hoeller 已提交
309
	def objenesisVersion = "2.5.1"
310 311 312 313

	configurations {
		jarjar
		cglib
314
		objenesis
315 316 317 318 319 320 321 322 323 324 325 326 327 328
	}

	task cglibRepackJar(type: Jar) { repackJar ->
		repackJar.baseName = "spring-cglib-repack"
		repackJar.version = cglibVersion

		doLast() {
			project.ant {
				taskdef name: "jarjar", classname: "com.tonicsystems.jarjar.JarJarTask",
					classpath: configurations.jarjar.asPath
				jarjar(destfile: repackJar.archivePath) {
					configurations.cglib.each { originalJar ->
						zipfileset(src: originalJar)
					}
J
Juergen Hoeller 已提交
329
					// Repackage net.sf.cglib => org.springframework.cglib
P
Phillip Webb 已提交
330
					rule(pattern: "net.sf.cglib.**", result: "org.springframework.cglib.@1")
J
Juergen Hoeller 已提交
331
					// As mentioned above, transform cglib"s internal asm dependencies from
332 333
					// org.objectweb.asm => org.springframework.asm. Doing this counts on the
					// the fact that Spring and cglib depend on the same version of asm!
P
Phillip Webb 已提交
334
					rule(pattern: "org.objectweb.asm.**", result: "org.springframework.asm.@1")
335 336 337 338 339
				}
			}
		}
	}

340 341 342 343 344 345 346 347 348 349 350 351
	task objenesisRepackJar(type: Jar) { repackJar ->
		repackJar.baseName = "spring-objenesis-repack"
		repackJar.version = objenesisVersion

		doLast() {
			project.ant {
				taskdef name: "jarjar", classname: "com.tonicsystems.jarjar.JarJarTask",
					classpath: configurations.jarjar.asPath
				jarjar(destfile: repackJar.archivePath) {
					configurations.objenesis.each { originalJar ->
						zipfileset(src: originalJar)
					}
J
Juergen Hoeller 已提交
352
					// Repackage org.objenesis => org.springframework.objenesis
353 354 355 356 357 358
					rule(pattern: "org.objenesis.**", result: "org.springframework.objenesis.@1")
				}
			}
		}
	}

359
	dependencies {
360
		cglib("cglib:cglib:${cglibVersion}@jar")
361
		objenesis("org.objenesis:objenesis:${objenesisVersion}@jar")
362
		jarjar("com.googlecode.jarjar:jarjar:1.3")
363

P
Phillip Webb 已提交
364
		compile(files(cglibRepackJar))
365
		compile(files(objenesisRepackJar))
366 367
		optional("org.apache.logging.log4j:log4j-api:${log4jVersion}")
		optional("org.slf4j:slf4j-api:${slf4jVersion}")
368
		optional("net.sf.jopt-simple:jopt-simple:5.0.3")
369
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
370
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
371
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
372 373
		optional("org.reactivestreams:reactive-streams")
		optional("io.projectreactor:reactor-core")
374 375 376
		optional("io.reactivex:rxjava:${rxjavaVersion}")
		optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
		optional("io.reactivex.rxjava2:rxjava:${rxjava2Version}")
377
		optional("io.netty:netty-buffer:${nettyVersion}")
378
		testCompile("io.projectreactor.addons:reactor-test")
379
		testCompile("javax.xml.bind:jaxb-api:${jaxbVersion}")
380
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
381
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
382
		testCompile("com.fasterxml.woodstox:woodstox-core:${woodstoxVersion}") {
P
Phillip Webb 已提交
383 384
			exclude group: "stax", module: "stax-api"
		}
385 386 387
	}

	jar {
J
Juergen Hoeller 已提交
388
		// Inline repackaged cglib classes directly into spring-core jar
389 390
		dependsOn cglibRepackJar
		from(zipTree(cglibRepackJar.archivePath)) {
P
Phillip Webb 已提交
391
			include "org/springframework/cglib/**"
392
		}
393 394 395 396 397

		dependsOn objenesisRepackJar
		from(zipTree(objenesisRepackJar.archivePath)) {
			include "org/springframework/objenesis/**"
		}
398
	}
C
Chris Beams 已提交
399 400
}

P
Phillip Webb 已提交
401 402
project("spring-beans") {
	description = "Spring Beans"
403

404
	dependencies {
405 406
		compile(project(":spring-core"))
		compile(files(project(":spring-core").cglibRepackJar))
407
		optional("javax.inject:javax.inject:1")
408
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
409
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
410
		optional("org.yaml:snakeyaml:${snakeyamlVersion}")
411
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
J
Juergen Hoeller 已提交
412
	}
C
Chris Beams 已提交
413 414
}

415 416
project("spring-beans-groovy") {
	description "Groovy Bean Definitions"
417

J
Juergen Hoeller 已提交
418
	merge.into = project(":spring-beans")
419
	apply plugin: "groovy"
J
Juergen Hoeller 已提交
420 421 422

	dependencies {
		compile(project(":spring-core"))
423
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
J
Juergen Hoeller 已提交
424 425
	}

J
Juergen Hoeller 已提交
426
	// This module's Java and Groovy sources need to be compiled together.
427
	compileJava.enabled = false
J
Juergen Hoeller 已提交
428 429 430
	sourceSets {
		main {
			groovy {
431
				srcDir "src/main/java"
J
Juergen Hoeller 已提交
432 433 434
			}
		}
	}
435 436

	compileGroovy {
437 438
		sourceCompatibility = 1.8
		targetCompatibility = 1.8
439
	}
J
Juergen Hoeller 已提交
440 441
}

P
Phillip Webb 已提交
442 443
project("spring-aop") {
	description = "Spring AOP"
444

445
	dependencies {
446
		compile(project(":spring-beans"))
447 448
		compile(project(":spring-core"))
		compile(files(project(":spring-core").cglibRepackJar))
449
		compile(files(project(":spring-core").objenesisRepackJar))
450
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
451
		optional("org.apache.commons:commons-pool2:2.4.2")
452
		optional("com.jamonapi:jamon:2.81")
453
	}
C
Chris Beams 已提交
454 455
}

P
Phillip Webb 已提交
456 457
project("spring-expression") {
	description = "Spring Expression Language (SpEL)"
458

459
	dependencies {
460
		compile(project(":spring-core"))
461
	}
C
Chris Beams 已提交
462 463
}

P
Phillip Webb 已提交
464 465
project("spring-instrument") {
	description = "Spring Instrument"
466

467
	jar {
P
Phillip Webb 已提交
468 469
		manifest.attributes["Premain-Class"] =
			"org.springframework.instrument.InstrumentationSavingAgent"
470 471
		manifest.attributes["Agent-Class"] =
			"org.springframework.instrument.InstrumentationSavingAgent"
472 473 474
		manifest.attributes["Can-Redefine-Classes"] = "true"
		manifest.attributes["Can-Retransform-Classes"] = "true"
		manifest.attributes["Can-Set-Native-Method-Prefix"] = "false"
475
	}
C
Chris Beams 已提交
476 477
}

P
Phillip Webb 已提交
478 479
project("spring-context") {
	description = "Spring Context"
480

481
	apply plugin: "groovy"
482

483
	dependencies {
484 485 486 487 488
		compile(project(":spring-aop"))
		compile(project(":spring-beans"))
		compile(project(":spring-expression"))
		compile(project(":spring-core"))
		compile(files(project(":spring-core").cglibRepackJar))
489
		optional(project(":spring-instrument"))
490
		optional("javax.inject:javax.inject:1")
491 492
		optional("javax.annotation:javax.annotation-api:${annotationApiVersion}")
		optional("javax.xml.ws:jaxws-api:${jaxwsVersion}")
493
		optional("javax.ejb:javax.ejb-api:${ejbApiVersion}")
S
Stephane Nicoll 已提交
494
		optional("javax.interceptor:javax.interceptor-api:${interceptorApiVersion}")
495
		optional("javax.enterprise.concurrent:javax.enterprise.concurrent-api:1.0")
496
		optional("javax.money:money-api:1.0.1")
J
Juergen Hoeller 已提交
497 498
		optional("org.eclipse.persistence:javax.persistence:${jpaVersion}")
		optional("javax.validation:validation-api:${beanvalVersion}")
499
		optional("org.hibernate:hibernate-validator:${hibval5Version}")
500 501
		optional("joda-time:joda-time:${jodaVersion}")
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
J
Juergen Hoeller 已提交
502
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
503
		optional("org.beanshell:bsh:2.0b5")
504
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
505
		testCompile("org.apache.commons:commons-pool2:2.4.2")
506
		testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
507
		testCompile("javax.inject:javax.inject-tck:1")
508
		testRuntime("javax.xml.bind:jaxb-api:${jaxbVersion}")
509 510 511
		testRuntime("javax.el:javax.el-api:${elApiVersion}")
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
		testRuntime("org.javamoney:moneta:1.1")
512 513 514 515 516 517 518 519 520 521
	}
}

project("spring-oxm") {
	description = "Spring Object/XML Marshalling"
	apply from: "oxm.gradle"

	dependencies {
		compile(project(":spring-beans"))
		compile(project(":spring-core"))
522 523
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
		optional("javax.activation:activation:${activationApiVersion}")
524 525 526
		optional("org.codehaus.castor:castor-xml:1.4.1")  {
			exclude group: 'stax', module: 'stax-api'
			exclude group: "org.springframework", module: "spring-context"
527
			exclude group: "commons-logging", module: "commons-logging"
528 529 530 531 532
		}
		optional("com.thoughtworks.xstream:xstream:${xstreamVersion}") {
			exclude group: 'xpp3', module: 'xpp3_min'
			exclude group: 'xmlpull', module: 'xmlpull'
		}
533
		optional("org.jibx:jibx-run:1.3.1")
534 535
		testCompile(project(":spring-context"))
		testCompile("xpp3:xpp3:1.1.4c")
536
		testCompile("org.codehaus.jettison:jettison:1.3.8") {
537 538
			exclude group: 'stax', module: 'stax-api'
		}
539
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
540 541
        testCompile(files(genCastor.classesDir).builtBy(genCastor))
        testCompile(files(genJaxb.classesDir).builtBy(genJaxb))
542 543 544
		testRuntime("xerces:xercesImpl:2.11.0")  // for Castor
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
545
	}
546 547 548 549 550 551 552 553 554
}

project("spring-messaging") {
	description = "Spring Messaging"

	dependencies {
		compile(project(":spring-beans"))
		compile(project(":spring-core"))
		compile(project(":spring-context"))
555
		optional(project(":spring-oxm"))
556 557
		optional("io.projectreactor:reactor-core")
		optional("io.projectreactor.ipc:reactor-netty")
558
		optional("io.netty:netty-all:${nettyVersion}")
B
Brian Clozel 已提交
559
		optional("org.eclipse.jetty.websocket:websocket-server:${jettyVersion}") {
B
Brian Clozel 已提交
560 561
			exclude group: "javax.servlet", module: "javax.servlet-api"
		}
B
Brian Clozel 已提交
562
		optional("org.eclipse.jetty.websocket:websocket-client:${jettyVersion}")
563
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
564
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
565
		testCompile("javax.inject:javax.inject-tck:1")
566
		testCompile("javax.servlet:javax.servlet-api:${servletVersion}")
J
Juergen Hoeller 已提交
567
		testCompile("javax.validation:validation-api:${beanvalVersion}")
568
		testCompile("com.thoughtworks.xstream:xstream:${xstreamVersion}")
569 570 571 572 573
		testCompile("org.apache.activemq:activemq-broker:5.8.0")
		testCompile("org.apache.activemq:activemq-kahadb-store:5.8.0") {
			exclude group: "org.springframework", module: "spring-context"
		}
		testCompile("org.apache.activemq:activemq-stomp:5.8.0")
B
Brian Clozel 已提交
574
		testCompile("org.eclipse.jetty:jetty-webapp:${jettyVersion}") {
B
Brian Clozel 已提交
575
			exclude group: "javax.servlet", module: "javax.servlet-api"
576
		}
577 578
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
		testCompile("org.apache.tomcat.embed:tomcat-embed-websocket:${tomcatVersion}")
579
		testCompile("io.netty:netty-all:${nettyVersion}")
580
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
S
Sebastien Deleuze 已提交
581
		testCompile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
582
		testCompile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
583
		testRuntime("javax.activation:activation:${activationApiVersion}")
584 585
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
586
	}
587 588 589 590 591

	if (JavaVersion.current().java9Compatible) {
		// Reactor2TcpClient's use of Netty requires access to sun.nio.ch.SelectorImpl
		test.jvmArgs(["--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED"])
	}
C
Chris Beams 已提交
592 593
}

P
Phillip Webb 已提交
594 595
project("spring-tx") {
	description = "Spring Transaction"
596

597
	dependencies {
598 599
		compile(project(":spring-beans"))
		compile(project(":spring-core"))
600
		optional(project(":spring-aop"))
601
		optional(project(":spring-context"))  // for JCA, @EnableTransactionManagement
602
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")
J
Juergen Hoeller 已提交
603
		optional("javax.resource:javax.resource-api:${jcaVersion}")
604
		optional("javax.ejb:javax.ejb-api:${ejbApiVersion}")
S
Stephane Nicoll 已提交
605
		optional("javax.interceptor:javax.interceptor-api:${interceptorApiVersion}")
606
		optional("com.ibm.websphere:uow:6.0.2.17")
607
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
J
Juergen Hoeller 已提交
608
		testCompile("org.eclipse.persistence:javax.persistence:${jpaVersion}")
609
		testCompile("org.codehaus.groovy:groovy-all:${groovyVersion}")
610
	}
C
Chris Beams 已提交
611 612
}

P
Phillip Webb 已提交
613 614
project("spring-jms") {
	description = "Spring JMS"
615

616
	dependencies {
617 618 619 620
		compile(project(":spring-core"))
		compile(project(":spring-beans"))
		compile(project(":spring-aop"))
		compile(project(":spring-context"))
621
		compile(project(":spring-messaging"))
622
		compile(project(":spring-tx"))
623
		provided("javax.jms:javax.jms-api:${jmsVersion}")
624
		optional(project(":spring-oxm"))
625
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")
J
Juergen Hoeller 已提交
626
		optional("javax.resource:javax.resource-api:${jcaVersion}")
627
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
628
		testRuntime("javax.activation:activation:${activationApiVersion}")
629
	}
C
Chris Beams 已提交
630 631
}

P
Phillip Webb 已提交
632 633
project("spring-jdbc") {
	description = "Spring JDBC"
634

635
	dependencies {
636
		compile(project(":spring-beans"))
637
		compile(project(":spring-core"))
638
		compile(project(":spring-tx"))
639
		optional(project(":spring-context"))  // for JndiDataSourceLookup
640
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")
P
Phillip Webb 已提交
641
		optional("org.hsqldb:hsqldb:${hsqldbVersion}")
642
		optional("com.h2database:h2:1.4.194")
643 644
		optional("org.apache.derby:derby:10.13.1.1")
		optional("org.apache.derby:derbyclient:10.13.1.1")
M
Mario Arias 已提交
645
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
646
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
647
	}
C
Chris Beams 已提交
648 649
}

P
Phillip Webb 已提交
650 651
project("spring-context-support") {
	description = "Spring Context Support"
652

653
	dependencies {
654 655 656
		compile(project(":spring-core"))
		compile(project(":spring-beans"))
		compile(project(":spring-context"))
657 658
		optional(project(":spring-jdbc"))  // for Quartz support
		optional(project(":spring-tx"))  // for Quartz support
659
		optional("javax.activation:activation:${activationApiVersion}")
660
		optional("javax.mail:javax.mail-api:${javamailVersion}")
661
		optional("javax.cache:cache-api:${cacheApiVersion}")
B
Ben Manes 已提交
662
		optional("com.github.ben-manes.caffeine:caffeine:${caffeineVersion}")
663
		optional("net.sf.ehcache:ehcache:${ehcacheVersion}")
664
		optional("org.quartz-scheduler:quartz:${quartzVersion}")
665
		optional("org.codehaus.fabric3.api:commonj:1.1.0")
666
		optional("org.freemarker:freemarker:${freemarkerVersion}")
667
		optional("com.lowagie:itext:2.1.7")
668
		testCompile(project(":spring-context"))
669
		testCompile("org.apache.poi:poi:${poiVersion}")
P
Phillip Webb 已提交
670
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
671
		testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
672
		testRuntime("com.sun.mail:javax.mail:${javamailVersion}")
673
		testRuntime("org.ehcache:jcache:${ehcachejcacheVersion}")
674
	}
C
Chris Beams 已提交
675 676
}

677 678 679 680 681 682 683 684 685 686 687
project("spring-context-indexer") {
	description = "Spring Context Indexer"

	dependencies {
		testCompile(project(":spring-context"))
		testCompile("javax.inject:javax.inject:1")
		testCompile("javax.annotation:javax.annotation-api:${annotationApiVersion}")
		testCompile("org.eclipse.persistence:javax.persistence:${jpaVersion}")
	}
}

P
Phillip Webb 已提交
688 689
project("spring-web") {
	description = "Spring Web"
S
Sebastien Deleuze 已提交
690

691
	apply plugin: "groovy"
692

693
	dependencies {
694 695
		compile(project(":spring-aop"))  // for JaxWsPortProxyFactoryBean
		compile(project(":spring-beans"))  // for MultipartFilter
696
		compile(project(":spring-context"))
697
		compile(project(":spring-core"))
698
		provided "javax.servlet:javax.servlet-api:${servletVersion}"
699
		optional(project(":spring-oxm"))  // for MarshallingHttpMessageConverter
700
		optional("javax.servlet.jsp:javax.servlet.jsp-api:${jspVersion}")
701
		optional("javax.el:javax.el-api:${elApiVersion}")
702
		optional("javax.faces:javax.faces-api:${jsfVersion}")
J
Juergen Hoeller 已提交
703
		optional("javax.validation:validation-api:${beanvalVersion}")
704
		optional("javax.activation:activation:${activationApiVersion}")
705
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
706
		optional("com.caucho:hessian:4.0.38")
707
		optional("commons-fileupload:commons-fileupload:${fileuploadVersion}")
708 709 710
		optional("org.reactivestreams:reactive-streams")
		optional("io.projectreactor:reactor-core")
		optional("io.projectreactor.ipc:reactor-netty")
J
Juergen Hoeller 已提交
711
		optional("io.reactivex:rxnetty-http:${rxnettyVersion}") {
712 713
			exclude group: 'io.reactivex', module: 'rxjava'
		}
714
		optional("io.reactivex:rxjava:${rxjavaVersion}")
715
		optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
716
		optional("io.reactivex.rxjava2:rxjava:${rxjava2Version}")
B
Brian Clozel 已提交
717
		optional("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
718
		optional("io.undertow:undertow-core:${undertowVersion}")
719
		optional("org.jboss.xnio:xnio-api:${xnioVersion}")
720 721
		optional("io.netty:netty-buffer:${nettyVersion}")  // temporarily for JsonObjectDecoder
	  	optional("com.fasterxml.woodstox:woodstox-core:${woodstoxVersion}") {  // woodstox before aalto
722 723
			exclude group: "stax", module: "stax-api"
		}
724
		optional("com.fasterxml:aalto-xml:1.0.0")
725 726 727 728 729 730
		optional("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
		optional("org.apache.httpcomponents:httpasyncclient:${httpasyncVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
731
		optional("io.netty:netty-all:${nettyVersion}")
732
		optional("com.squareup.okhttp3:okhttp:${okhttp3Version}")
733
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
734
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jackson2Version}")
735 736
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jackson2Version}")
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jackson2Version}")
R
Roy Clarkson 已提交
737
		optional("com.google.code.gson:gson:${gsonVersion}")
738
		optional("javax.json.bind:javax.json.bind-api:1.0.0-M1")
739
		optional("com.rometools:rome:${romeVersion}")
B
Brian Clozel 已提交
740
		optional("org.eclipse.jetty:jetty-servlet:${jettyVersion}") {
B
Brian Clozel 已提交
741
			exclude group: "javax.servlet", module: "javax.servlet-api"
742
		}
B
Brian Clozel 已提交
743
		optional("org.eclipse.jetty:jetty-server:${jettyVersion}") {
B
Brian Clozel 已提交
744
			exclude group: "javax.servlet", module: "javax.servlet-api"
745
		}
746 747
		optional("com.google.protobuf:protobuf-java:${protobufVersion}")
		optional("com.google.protobuf:protobuf-java-util:${protobufVersion}")
748
		optional("com.googlecode.protobuf-java-format:protobuf-java-format:1.4")
749 750
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
		optional("javax.xml.ws:jaxws-api:${jaxwsVersion}")
751
		optional("javax.mail:javax.mail-api:${javamailVersion}")
752
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
753
		testCompile(project(":spring-context-support"))  // for JafMediaTypeFactory
754
		testCompile("io.projectreactor.addons:reactor-test")
755 756 757
		testCompile("org.apache.taglibs:taglibs-standard-jstlel:1.2.1") {
			exclude group: "org.apache.taglibs", module: "taglibs-standard-spec"
		}
758
		testCompile("com.fasterxml.jackson.datatype:jackson-datatype-joda:${jackson2Version}")
759
		testCompile("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${jackson2Version}")
760
		testCompile("com.fasterxml.jackson.module:jackson-module-kotlin:${jackson2Version}")
761 762 763 764
		testCompile("org.apache.tomcat:tomcat-util:${tomcatVersion}")
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
		testCompile("org.eclipse.jetty:jetty-server:${jettyVersion}")
		testCompile("org.eclipse.jetty:jetty-servlet:${jettyVersion}")
765 766
		testCompile("com.squareup.okhttp3:mockwebserver:${okhttp3Version}")
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
S
Sebastien Deleuze 已提交
767
		testCompile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
768
		testRuntime("com.sun.mail:javax.mail:${javamailVersion}")
769 770
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
771
		testRuntime("org.jboss.xnio:xnio-nio:${xnioVersion}")
772
		testRuntime("org.jboss.logging:jboss-logging:3.3.1.Final")
773
	}
774 775 776 777 778

	if (JavaVersion.current().java9Compatible) {
		// Netty4ClientHttpRequestFactory requires access to sun.nio.ch.SelectorImpl
		test.jvmArgs(["--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED"])
	}
779 780
}

781 782
project("spring-webflux") {
	description = "Spring WebFlux"
783

784 785 786
	dependencies {
		compile(project(":spring-core"))
		compile(project(":spring-web"))
787 788
		compile("org.reactivestreams:reactive-streams")
		compile("io.projectreactor:reactor-core")
789 790
		optional(project(":spring-context-support"))  // for FreeMarker support
		provided "javax.servlet:javax.servlet-api:${servletVersion}"
791
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
792 793
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
		optional("org.freemarker:freemarker:${freemarkerVersion}")
794 795 796
		optional("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
797
		optional('org.webjars:webjars-locator:0.32-1')
798
		optional("io.projectreactor.ipc:reactor-netty")
799 800 801 802 803
		optional("io.reactivex:rxnetty-http:${rxnettyVersion}") {
			exclude group: 'io.reactivex', module: 'rxjava'
		}
		optional("io.reactivex:rxjava:${rxjavaVersion}")
		optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
804 805 806 807 808
		optional("javax.websocket:javax.websocket-api:${websocketVersion}")
		optional("org.apache.tomcat:tomcat-websocket:${tomcatVersion}") {
			exclude group: "org.apache.tomcat", module: "tomcat-websocket-api"
			exclude group: "org.apache.tomcat", module: "tomcat-servlet-api"
		}
809 810 811
		optional("org.eclipse.jetty.websocket:websocket-server:${jettyVersion}") {
			exclude group: "javax.servlet", module: "javax.servlet"
		}
812 813 814
		optional("io.undertow:undertow-websockets-jsr:${undertowVersion}") {
			exclude group: "org.jboss.spec.javax.websocket", module: "jboss-websocket-api_1.1_spec"
		}
815
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
816
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
817
		testCompile("io.projectreactor.addons:reactor-test")
818
		testCompile("javax.validation:validation-api:${beanvalVersion}")
R
Rossen Stoyanchev 已提交
819
		testCompile("org.hibernate:hibernate-validator:${hibval5Version}")
820 821 822 823
		testCompile("org.apache.tomcat:tomcat-util:${tomcatVersion}")
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
		testCompile("org.eclipse.jetty:jetty-server:${jettyVersion}")
		testCompile("org.eclipse.jetty:jetty-servlet:${jettyVersion}")
S
Sebastien Deleuze 已提交
824
		testCompile "io.reactivex.rxjava2:rxjava:${rxjava2Version}"
825
		testCompile("io.undertow:undertow-core:${undertowVersion}")
826
		testCompile("org.jboss.xnio:xnio-api:${xnioVersion}")
827
		testCompile("com.fasterxml:aalto-xml:1.0.0")
828
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
B
Brian Clozel 已提交
829
		testCompile("com.squareup.okhttp3:mockwebserver:${okhttp3Version}")
830 831
		testRuntime("javax.el:javax.el-api:${elApiVersion}")
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
832 833 834
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
		testRuntime("javax.activation:activation:${activationApiVersion}")
835
		testRuntime("org.jboss.xnio:xnio-nio:${xnioVersion}")
836
		testRuntime("org.jboss.logging:jboss-logging:3.3.1.Final")
837
		testRuntime("org.webjars:underscorejs:1.8.3")
838
		testRuntime("org.jruby:jruby:9.1.8.0")
839
		testRuntime("org.python:jython-standalone:2.5.3")
840
		testRuntime("org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}")
841
		testCompile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
842
		testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
843
	}
844 845 846 847 848

	if (JavaVersion.current().java9Compatible) {
		// ReactorClientHttpConnector requires access to sun.nio.ch.SelectorImpl
		test.jvmArgs(["--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED"])
	}
C
Chris Beams 已提交
849 850
}

P
Phillip Webb 已提交
851 852
project("spring-orm") {
	description = "Spring Object/Relational Mapping"
853

854
	dependencies {
855 856 857 858 859 860 861
		compile(project(":spring-beans"))
		compile(project(":spring-core"))
		compile(project(":spring-jdbc"))
		compile(project(":spring-tx"))
		optional(project(":spring-aop"))
		optional(project(":spring-context"))
		optional(project(":spring-web"))
J
Juergen Hoeller 已提交
862
		optional("org.eclipse.persistence:javax.persistence:${jpaVersion}")
863 864
		optional("org.eclipse.persistence:org.eclipse.persistence.core:${eclipselinkVersion}")
		optional("org.eclipse.persistence:org.eclipse.persistence.jpa:${eclipselinkVersion}") {
865 866
			exclude group: 'org.eclipse.persistence', module: 'javax.persistence'
		}
867
		optional("org.hibernate:hibernate-core:${hibernate5Version}")
868
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
S
Sam Brannen 已提交
869
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
P
Phillip Webb 已提交
870
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
871
		testRuntime("javax.xml.bind:jaxb-api:${jaxbVersion}")
872
	}
C
Chris Beams 已提交
873 874
}

P
Phillip Webb 已提交
875 876
project("spring-webmvc") {
	description = "Spring Web MVC"
877

878
	dependencies {
879
		compile(project(":spring-aop"))
880 881
		compile(project(":spring-beans"))
		compile(project(":spring-context"))
882
		compile(project(":spring-core"))
883
		compile(files(project(":spring-core").objenesisRepackJar))
884 885
		compile(project(":spring-expression"))
		compile(project(":spring-web"))
886
		provided("javax.servlet:javax.servlet-api:${servletVersion}")
887
		optional(project(":spring-context-support"))  // for FreeMarker support
888
		optional(project(":spring-oxm"))  // for MarshallingView
889
		optional("javax.servlet.jsp:javax.servlet.jsp-api:${jspVersion}")
890
		optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1")
891
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
892 893
		optional("org.apache.poi:poi:${poiVersion}")
		optional("org.apache.poi:poi-ooxml:${poiVersion}")
894
		optional("org.freemarker:freemarker:${freemarkerVersion}")
895
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
896 897
		optional("com.lowagie:itext:2.1.7")
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
898
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jackson2Version}")
899 900
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jackson2Version}")
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jackson2Version}")
901
		optional("com.rometools:rome:${romeVersion}")
902
		optional("javax.el:javax.el-api:${elApiVersion}")
903 904
		optional("org.apache.tiles:tiles-api:${tiles3Version}")
		optional("org.apache.tiles:tiles-core:${tiles3Version}") {
905 906
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
907
		optional("org.apache.tiles:tiles-servlet:${tiles3Version}") {
908 909
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
910
		optional("org.apache.tiles:tiles-jsp:${tiles3Version}") {
911 912
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
913
		optional("org.apache.tiles:tiles-el:${tiles3Version}") {
914 915
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
916
		optional("org.apache.tiles:tiles-extras:${tiles3Version}") {
917 918 919
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
			exclude group: "org.springframework", module: "spring-web"
		}
920
		optional('org.webjars:webjars-locator:0.32-1')
921
		optional("org.reactivestreams:reactive-streams")
922
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
923
		testCompile("dom4j:dom4j:1.6.1") {
P
Phillip Webb 已提交
924
			exclude group: "xml-apis", module: "xml-apis"
925 926
		}
		testCompile("jaxen:jaxen:1.1.1") {
P
Phillip Webb 已提交
927 928 929
			exclude group: "xml-apis", module: "xml-apis"
			exclude group: "xom", module: "xom"
			exclude group: "xerces", module: "xercesImpl"
930
		}
B
Brian Clozel 已提交
931
		testCompile("org.eclipse.jetty:jetty-servlet:${jettyVersion}") {
B
Brian Clozel 已提交
932
			exclude group: "javax.servlet", module: "javax.servlet"
933
		}
B
Brian Clozel 已提交
934
		testCompile("org.eclipse.jetty:jetty-server:${jettyVersion}") {
B
Brian Clozel 已提交
935
			exclude group: "javax.servlet", module: "javax.servlet"
936
		}
J
Juergen Hoeller 已提交
937
		testCompile("javax.validation:validation-api:${beanvalVersion}")
938
		testCompile("org.hibernate:hibernate-validator:${hibval5Version}")
939 940 941
		testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
942
		testCompile("commons-fileupload:commons-fileupload:${fileuploadVersion}")
943
		testCompile("commons-io:commons-io:2.5")
944
		testCompile("joda-time:joda-time:${jodaVersion}")
945
		testCompile("org.mozilla:rhino:1.7.7.1")
946 947 948 949
		testCompile("io.projectreactor:reactor-core")
		testCompile("io.reactivex:rxjava:${rxjavaVersion}")
		testCompile("io.reactivex.rxjava2:rxjava:${rxjava2Version}")
		testCompile("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
950
		testRuntime("org.jruby:jruby:9.1.8.0")
951
		testRuntime("org.python:jython-standalone:2.5.3")
952
		testRuntime("org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}")
953
		testCompile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
954
		testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
955
		testRuntime("org.webjars:underscorejs:1.8.3")
956
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
957 958 959
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
		testRuntime("javax.activation:activation:${activationApiVersion}")
960 961 962
	}
}

963 964 965 966 967 968 969 970 971
project("spring-websocket") {
	description = "Spring WebSocket"

	dependencies {
		compile(project(":spring-core"))
		compile(project(":spring-context"))
		compile(project(":spring-web"))
		optional(project(":spring-messaging"))
		optional(project(":spring-webmvc"))
972 973
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
		optional("javax.websocket:javax.websocket-api:${websocketVersion}")
974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997
		optional("org.apache.tomcat:tomcat-websocket:${tomcatVersion}") {
			exclude group: "org.apache.tomcat", module: "tomcat-websocket-api"
			exclude group: "org.apache.tomcat", module: "tomcat-servlet-api"
		}
		optional("org.glassfish.tyrus:tyrus-spi:${tyrusVersion}")
		optional("org.glassfish.tyrus:tyrus-core:${tyrusVersion}")
		optional("org.glassfish.tyrus:tyrus-server:${tyrusVersion}")
		optional("org.glassfish.tyrus:tyrus-container-servlet:${tyrusVersion}")
		optional("org.eclipse.jetty:jetty-webapp:${jettyVersion}") {
			exclude group: "javax.servlet", module: "javax.servlet"
		}
		optional("org.eclipse.jetty.websocket:websocket-server:${jettyVersion}") {
			exclude group: "javax.servlet", module: "javax.servlet"
		}
		optional("org.eclipse.jetty.websocket:websocket-client:${jettyVersion}")
		optional("org.eclipse.jetty:jetty-client:${jettyVersion}")
		optional("io.undertow:undertow-core:${undertowVersion}")
		optional("io.undertow:undertow-servlet:${undertowVersion}") {
			exclude group: "org.jboss.spec.javax.servlet", module: "jboss-servlet-api_3.1_spec"
			exclude group: "org.jboss.spec.javax.annotation", module: "jboss-annotations-api_1.2_spec"
		}
		optional("io.undertow:undertow-websockets-jsr:${undertowVersion}") {
			exclude group: "org.jboss.spec.javax.websocket", module: "jboss-websocket-api_1.1_spec"
		}
998
		optional("org.jboss.xnio:xnio-api:${xnioVersion}")
999 1000 1001
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
		testCompile("org.apache.tomcat.embed:tomcat-embed-websocket:${tomcatVersion}")
1002 1003
		testCompile("io.projectreactor:reactor-core")
		testCompile("io.projectreactor.ipc:reactor-netty")
1004
		testCompile("io.netty:netty-all:${nettyVersion}")
1005
		testRuntime("org.jboss.xnio:xnio-nio:${xnioVersion}")
1006
		testRuntime("org.jboss.logging:jboss-logging:3.3.1.Final")
1007
	}
1008 1009 1010 1011 1012

	if (JavaVersion.current().java9Compatible) {
		// Reactor2TcpClient's use of Netty requires access to sun.nio.ch.SelectorImpl
		test.jvmArgs(["--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED"])
	}
1013 1014
}

P
Phillip Webb 已提交
1015 1016
project("spring-test") {
	description = "Spring TestContext Framework"
1017

1018
	dependencies {
1019
		compile(project(":spring-core"))
1020 1021 1022 1023 1024 1025 1026
		optional(project(":spring-beans"))
		optional(project(":spring-context"))
		optional(project(":spring-jdbc"))
		optional(project(":spring-tx"))
		optional(project(":spring-orm"))
		optional(project(":spring-web"))
		optional(project(":spring-webmvc"))
1027
		optional(project(":spring-webflux"))
1028
		optional(project(":spring-websocket"))
1029
		optional("junit:junit:${junitVersion}")
1030
		optional("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
1031
		optional("org.testng:testng:${testngVersion}")
1032
		optional("javax.inject:javax.inject:1")
1033 1034
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
		optional("javax.servlet.jsp:javax.servlet.jsp-api:${jspVersion}")
1035 1036 1037 1038
		optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1")
		optional("org.apache.taglibs:taglibs-standard-jstlel:1.2.1") {
			exclude group: "org.apache.taglibs", module: "taglibs-standard-spec"
		}
1039
		optional("javax.el:javax.el-api:${elApiVersion}")
1040
		optional("javax.websocket:javax.websocket-api:${websocketVersion}")
1041 1042
		optional("javax.activation:activation:${activationApiVersion}")
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
1043
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
S
Sam Brannen 已提交
1044
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
1045
		optional("org.hamcrest:hamcrest-core:${hamcrestVersion}")
1046
		optional("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
1047 1048 1049 1050 1051
		optional("net.sourceforge.htmlunit:htmlunit:2.26") {
			exclude group: "commons-logging", module: "commons-logging"
		}
		optional("org.seleniumhq.selenium:htmlunit-driver:2.26")
		optional("org.seleniumhq.selenium:selenium-java:3.3.1") {
1052 1053
			exclude group: "io.netty", module: "netty"
		}
1054
		optional("org.skyscreamer:jsonassert:1.4.0")
1055
		optional("com.jayway.jsonpath:json-path:2.2.0")
1056 1057
		optional("org.reactivestreams:reactive-streams")
		optional("io.projectreactor:reactor-core")
1058
		optional("io.projectreactor.addons:reactor-test")
1059 1060
		testCompile(project(":spring-context-support"))
		testCompile(project(":spring-oxm"))
1061
		testCompile("javax.mail:javax.mail-api:${javamailVersion}")
1062
		testCompile("javax.ejb:javax.ejb-api:${ejbApiVersion}")
S
Stephane Nicoll 已提交
1063
		testCompile("javax.interceptor:javax.interceptor-api:${interceptorApiVersion}")
1064
		testCompile("org.hibernate:hibernate-core:${hibernate5Version}")
1065
		testCompile("org.hibernate:hibernate-validator:${hibval5Version}")
1066 1067
		// Enable use of the JUnitPlatform Runner
		testCompile("org.junit.platform:junit-platform-runner:${junitPlatformVersion}")
1068
		testCompile("com.thoughtworks.xstream:xstream:${xstreamVersion}")
1069
		testCompile("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
1070
		testCompile("com.rometools:rome:${romeVersion}")
1071 1072
		testCompile("org.apache.tiles:tiles-api:${tiles3Version}")
		testCompile("org.apache.tiles:tiles-core:${tiles3Version}") {
1073 1074
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
1075
		testCompile("org.apache.tiles:tiles-servlet:${tiles3Version}") {
1076 1077
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
1078
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
1079 1080 1081
		testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
1082
		testCompile("javax.cache:cache-api:${cacheApiVersion}")
1083
		testCompile('de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1')
1084
		testCompile('io.projectreactor.ipc:reactor-netty')
1085
		testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
1086
		testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}")  // Java Util Logging for JUnit 5
1087
		testRuntime("org.ehcache:ehcache:${ehcache3Version}")
J
Juergen Hoeller 已提交
1088
		testRuntime("org.terracotta:management-model:2.0.0")
1089 1090
		testRuntime("javax.el:javax.el-api:${elApiVersion}")
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
1091 1092
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
1093
	}
1094 1095

	task testNG(type: Test) {
1096
		description = 'Runs TestNG tests.'
1097
		useTestNG()
1098
		scanForTestClasses = false
1099 1100
		include(["**/testng/**/*Tests.class", "**/testng/**/*Test.class"])
		// Show STD_OUT & STD_ERR of the test JVM(s) on the console:
1101
		// testLogging.showStandardStreams = true
1102
		// forkEvery 1
1103
		reports.junitXml.destination = file("$buildDir/test-results")
1104 1105 1106
	}

	test {
1107
		description = 'Runs JUnit tests.'
1108 1109
		dependsOn testNG
		useJUnit()
1110 1111 1112
		scanForTestClasses = false
		include(['**/*Tests.class', '**/*Test.class', '**/SpringJUnitJupiterTestSuite.class'])
		exclude(['**/testng/**/*.*'])
1113 1114
		// Java Util Logging for JUnit 5.
		// systemProperty('java.util.logging.manager', 'org.apache.logging.log4j.jul.LogManager')
1115
		reports.junitXml.destination = file("$buildDir/test-results")
1116
	}
1117 1118

	task aggregateTestReports(type: TestReport) {
1119
		description = 'Aggregates JUnit and TestNG test reports.'
1120 1121 1122 1123 1124
		destinationDir = test.reports.html.destination
		reportOn test, testNG
	}

	check.dependsOn aggregateTestReports
C
Chris Beams 已提交
1125 1126
}

P
Phillip Webb 已提交
1127 1128 1129
project("spring-aspects") {
	description = "Spring Aspects"
	apply from: "aspects.gradle"
1130

1131
	dependencies {
1132
		aspects(project(":spring-orm"))
1133 1134 1135
		ajc("org.aspectj:aspectjtools:${aspectjVersion}")
		rt("org.aspectj:aspectjrt:${aspectjVersion}")
		compile("org.aspectj:aspectjweaver:${aspectjVersion}")
J
Juergen Hoeller 已提交
1136
		provided("org.eclipse.persistence:javax.persistence:${jpaVersion}")
1137 1138 1139 1140 1141 1142
		optional(project(":spring-aop"))  // for @Async support
		optional(project(":spring-beans"))  // for @Configurable support
		optional(project(":spring-context"))  // for @Enable* support
		optional(project(":spring-context-support"))  // for JavaMail and JSR-107 support
		optional(project(":spring-orm"))  // for JPA exception translation support
		optional(project(":spring-tx"))  // for JPA, @Transactional support
1143
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")  // for @javax.transaction.Transactional support
1144
		optional("javax.cache:cache-api:${cacheApiVersion}")
1145
		testCompile(project(":spring-core"))  // for CodeStyleAspect
1146
		testCompile(project(":spring-test"))
1147
		testCompile("javax.mail:javax.mail-api:${javamailVersion}")
1148
	}
1149

1150
	eclipse.project {
P
Phillip Webb 已提交
1151
		natures += "org.eclipse.ajdt.ui.ajnature"
1152
		buildCommands = [new org.gradle.plugins.ide.eclipse.model.BuildCommand("org.eclipse.ajdt.core.ajbuilder")]
1153
	}
C
Chris Beams 已提交
1154 1155
}

1156 1157
project("spring-framework-bom") {
	description = "Spring Framework (Bill of Materials)"
1158

1159 1160 1161 1162 1163
	dependencyManagement {
		generatedPomCustomization {
			enabled = false
		}
	}
1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196

	configurations.archives.artifacts.clear()
	artifacts {
		// work around GRADLE-2406 by attaching text artifact
		archives(file("spring-framework-bom.txt"))
	}

	install {
		repositories.mavenInstaller {
			pom.whenConfigured {
				packaging = "pom"
				withXml {
					asNode().children().last() + {
						delegate.dependencyManagement {
							delegate.dependencies {
								parent.subprojects.sort { "$it.name" }.each { p ->
									if (p.hasProperty("merge") && p.merge.into == null && p != project) {
										delegate.dependency {
											delegate.groupId(p.group)
											delegate.artifactId(p.name)
											delegate.version(p.version)
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}

1197 1198
sonarqube {
	properties {
S
Stephane Nicoll 已提交
1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
		property "sonar.projectName", "Spring Framework"
		property "sonar.profile", "Spring Framework"
		property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec"
		property "sonar.links.homepage", linkHomepage
		property "sonar.links.ci", linkCi
		property "sonar.links.issue", linkIssue
		property "sonar.links.scm", linkScmUrl
		property "sonar.links.scm_dev", linkScmDevConnection
		property "sonar.java.coveragePlugin", "jacoco"
	}
}

1211
configure(rootProject) {
P
Phillip Webb 已提交
1212
	description = "Spring Framework"
1213

1214
	apply plugin: "groovy"
R
Rob Winch 已提交
1215
	apply plugin: "io.spring.dependency-management"
1216
	// apply plugin: "detect-split-packages"
1217
	apply from: "${gradleScriptDir}/jdiff.gradle"
1218
	apply from: "${gradleScriptDir}/docs.gradle"
1219

R
Rob Winch 已提交
1220 1221 1222 1223 1224 1225 1226 1227 1228 1229
	dependencyManagement {
		imports {
			mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
		}
		resolutionStrategy {
			cacheChangingModulesFor 0, 'seconds'
		}
		applyMavenExclusions = false
	}

1230 1231 1232 1233 1234
	// TODO: DetectSplitPackagesPlugin fails in line 154 due to method not found on java.io.File.
	// TODO: Possibly related to user rights or OS differences; passes on local Windows machine.
	// detectSplitPackages {
	//	projectsToScan -= project(":spring-instrument-tomcat")
	// }
1235

C
Chris Beams 已提交
1236
	// don't publish the default jar for the root project
1237 1238
	configurations.archives.artifacts.clear()

1239
	dependencies {  // for integration tests
1240
		testCompile(project(":spring-aop"))
1241
		testCompile(project(":spring-beans"))
1242
		testCompile(project(":spring-context"))
1243 1244
		testCompile(project(":spring-core"))
		testCompile(project(":spring-expression"))
1245
		testCompile(project(":spring-jdbc"))
1246
		testCompile(project(":spring-orm"))
1247
		testCompile(project(":spring-test"))
1248
		testCompile(project(":spring-tx"))
1249
		testCompile(project(":spring-web"))
1250
		testCompile("javax.servlet:javax.servlet-api:${servletVersion}")
1251
		testCompile("javax.inject:javax.inject:1")
J
Juergen Hoeller 已提交
1252
		testCompile("javax.resource:javax.resource-api:${jcaVersion}")
1253
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
1254
		testCompile("org.hibernate:hibernate-core:${hibernate5Version}")
P
Phillip Webb 已提交
1255
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
1256 1257 1258 1259 1260 1261 1262 1263 1264
	}

	artifacts {
		archives docsZip
		archives schemaZip
		archives distZip
	}

	task wrapper(type: Wrapper) {
P
Phillip Webb 已提交
1265
		description = "Generates gradlew[.bat] scripts"
S
Sam Brannen 已提交
1266
		gradleVersion = '3.5'
1267 1268

		doLast() {
1269
			def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
1270
			def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=256m"
P
Phillip Webb 已提交
1271
			File wrapperFile = file("gradlew")
1272 1273
			wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
				"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
P
Phillip Webb 已提交
1274
			File wrapperBatFile = file("gradlew.bat")
1275 1276 1277 1278
			wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=",
				"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
		}
	}
1279

1280
}
1281

S
Stephane Nicoll 已提交
1282
configure([project(':spring-build-src'), project(':spring-framework-bom')]) {
1283
	sonarqube {
S
Stephane Nicoll 已提交
1284 1285 1286 1287 1288
		skipProject = true
	}
}

configure(project(':spring-core')) {
1289 1290
	sonarqube {
		properties {
S
Stephane Nicoll 已提交
1291 1292 1293 1294 1295 1296
			property "sonar.exclusions",
					"src/main/java/org/springframework/cglib/**/*,src/main/java/org/springframework/asm/**/*"
		}
	}
}

1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307
/*
 * Support publication of artifacts versioned by topic branch.
 * CI builds supply `-P BRANCH_NAME=<TOPIC>` to gradle at build time.
 * If <TOPIC> starts with 'SPR-', change version
 *     from BUILD-SNAPSHOT => <TOPIC>-SNAPSHOT
 *     e.g. 3.2.1.BUILD-SNAPSHOT => 3.2.1.SPR-1234-SNAPSHOT
 */
def qualifyVersionIfNecessary(version) {
	if (rootProject.hasProperty("BRANCH_NAME")) {
		def qualifier = rootProject.getProperty("BRANCH_NAME")
		if (qualifier.startsWith("SPR-")) {
1308
			return version.replace('BUILD', qualifier)
1309 1310
		}
	}
1311
	return version
1312
}