build.gradle 49.3 KB
Newer Older
1
buildscript {
2
	ext.kotlinVersion = '1.1.2-4'
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.3"
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.5.1"
44
	ext.eclipselinkVersion     = "2.6.4"
45
	ext.ehcacheVersion         = "2.10.4"
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.11"
53
	ext.gsonVersion            = "2.8.0"
54
	ext.hamcrestVersion        = "1.3"
55
	ext.hibernate5Version      = "5.2.10.Final"
56
	ext.hibvalVersion          = "5.4.1.Final"
57
	ext.hsqldbVersion          = "2.4.0"
58
	ext.httpasyncVersion       = "4.1.3"
59
	ext.httpclientVersion      = "4.5.3"
60
	ext.interceptorApiVersion  = "1.2"
J
Juergen Hoeller 已提交
61
	ext.jackson2Version        = "2.9.0.pr3"
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.5.v20170502"
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"
74
	ext.junitVintageVersion    = "4.12.0-M4"
S
Sam Brannen 已提交
75 76
	ext.junitJupiterVersion    = '5.0.0-M4'
	ext.junitPlatformVersion   = '1.0.0-M4'
77
	ext.log4jVersion           = '2.8.2'
J
Juergen Hoeller 已提交
78
	ext.nettyVersion           = "4.1.11.Final"
79
	ext.niomultipartVersion    = "1.0.2"
80
	ext.okhttp3Version         = "3.8.0"
81
	ext.poiVersion             = "3.16"
82
	ext.protobufVersion        = "3.3.1"
83
	ext.quartzVersion          = "2.3.0"
S
Stephane Nicoll 已提交
84
	ext.reactorVersion         = "Bismuth-M1"
85
	ext.romeVersion            = "1.7.3"
J
Juergen Hoeller 已提交
86
	ext.rxjavaVersion          = '1.3.0'
87
	ext.rxjavaAdapterVersion   = '1.2.1'
J
Juergen Hoeller 已提交
88
	ext.rxjava2Version         = '2.1.0'
89
	ext.rxnettyVersion         = '0.5.2'
90
	ext.servletVersion         = "3.1.0"
91
	ext.slf4jVersion           = "1.7.25"
92
	ext.snakeyamlVersion       = "1.18"
93
	ext.testngVersion          = "6.11"
J
Juergen Hoeller 已提交
94
	ext.tiles3Version          = "3.0.7"
95
	ext.tomcatVersion          = "8.5.15"
96
	ext.tyrusVersion           = "1.13.1"
97
	ext.undertowVersion        = "1.4.15.Final"
98
	ext.websocketVersion       = "1.1"
99
	ext.woodstoxVersion        = "5.0.3"
100
	ext.xmlunitVersion         = "2.3.0"
101
	ext.xstreamVersion         = "1.4.9"
102

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

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

J
Juergen Hoeller 已提交
111 112 113 114
	apply plugin: "kotlin"
	compileKotlin {
		kotlinOptions.jvmTarget = "1.8"
		kotlinOptions.freeCompilerArgs = ["-Xskip-runtime-version-check"]
115

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

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

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

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

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

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

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

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

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

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

	ext.javadocLinks = [
191
		"http://docs.oracle.com/javase/8/docs/api/",
192
		"http://docs.oracle.com/javaee/7/api/",
193
		"http://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/",  // CommonJ
J
Juergen Hoeller 已提交
194 195
		"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 已提交
196 197
		"http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/",
		"http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/",
198
		"http://tiles.apache.org/tiles-request/apidocs/",
J
Juergen Hoeller 已提交
199
		"http://tiles.apache.org/framework/apidocs/",
C
Chris Beams 已提交
200
		"http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/",
B
Brian Clozel 已提交
201 202
		"http://ehcache.org/apidocs/${ehcacheVersion}",
		"http://ehcache.org/apidocs/${ehcache3Version}",
203
		"http://quartz-scheduler.org/api/2.2.1/",
204 205 206
		"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/",
207
		"http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/"
C
Chris Beams 已提交
208
	] as String[]
209 210
}

211
configure(subprojects - project(":spring-build-src")) { subproject ->
212
	apply plugin: "merge"
213
	apply from: "${gradleScriptDir}/publish-maven.gradle"
214 215 216 217 218
	apply plugin: "io.spring.dependency-management"

	dependencyManagement {
		imports {
			mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
219
			mavenBom "io.netty:netty-bom:${nettyVersion}"
220 221 222 223 224 225
		}
		resolutionStrategy {
			cacheChangingModulesFor 0, 'seconds'
		}
		applyMavenExclusions = false
	}
226

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

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

240
	jar {
P
Phillip Webb 已提交
241 242 243 244
		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
245 246 247 248 249

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

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

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

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

270
	task sourcesJar(type: Jar, dependsOn: classes) {
271
		duplicatesStrategy = DuplicatesStrategy.EXCLUDE
272
		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()
}

301 302 303 304 305 306 307 308 309
project("spring-jcl") {
	description = "Spring Commons Logging Bridge"

	dependencies {
		optional("org.apache.logging.log4j:log4j-api:${log4jVersion}")
		optional("org.slf4j:slf4j-api:${slf4jVersion}")
	}
}

P
Phillip Webb 已提交
310 311
project("spring-core") {
	description = "Spring Core"
312

313 314
	// 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
315
	// further transformed by the JarJar task to depend on org.springframework.asm; this
316
	// avoids including two different copies of asm unnecessarily.
J
Juergen Hoeller 已提交
317
	def cglibVersion = "3.2.5"
J
Juergen Hoeller 已提交
318
	def objenesisVersion = "2.5.1"
319 320 321 322

	configurations {
		jarjar
		cglib
323
		objenesis
324 325 326 327 328 329 330 331 332 333 334 335 336 337
	}

	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 已提交
338
					// Repackage net.sf.cglib => org.springframework.cglib
P
Phillip Webb 已提交
339
					rule(pattern: "net.sf.cglib.**", result: "org.springframework.cglib.@1")
J
Juergen Hoeller 已提交
340
					// As mentioned above, transform cglib"s internal asm dependencies from
341 342
					// 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 已提交
343
					rule(pattern: "org.objectweb.asm.**", result: "org.springframework.asm.@1")
344 345 346 347 348
				}
			}
		}
	}

349 350 351 352 353 354 355 356 357 358 359 360
	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 已提交
361
					// Repackage org.objenesis => org.springframework.objenesis
362 363 364 365 366 367
					rule(pattern: "org.objenesis.**", result: "org.springframework.objenesis.@1")
				}
			}
		}
	}

368
	dependencies {
369
		cglib("cglib:cglib:${cglibVersion}@jar")
370
		objenesis("org.objenesis:objenesis:${objenesisVersion}@jar")
371
		jarjar("com.googlecode.jarjar:jarjar:1.3")
372

P
Phillip Webb 已提交
373
		compile(files(cglibRepackJar))
374
		compile(files(objenesisRepackJar))
375
		compile(project(":spring-jcl"))
376
		optional("net.sf.jopt-simple:jopt-simple:5.0.3")
377
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
378
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
379
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
380 381
		optional("org.reactivestreams:reactive-streams")
		optional("io.projectreactor:reactor-core")
382 383 384
		optional("io.reactivex:rxjava:${rxjavaVersion}")
		optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
		optional("io.reactivex.rxjava2:rxjava:${rxjava2Version}")
385
		optional("io.netty:netty-buffer")
386
		testCompile("io.projectreactor.addons:reactor-test")
387
		testCompile("javax.xml.bind:jaxb-api:${jaxbVersion}")
388
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
389
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
390
		testCompile("com.fasterxml.woodstox:woodstox-core:${woodstoxVersion}") {
P
Phillip Webb 已提交
391 392
			exclude group: "stax", module: "stax-api"
		}
393 394 395
	}

	jar {
J
Juergen Hoeller 已提交
396
		// Inline repackaged cglib classes directly into spring-core jar
397 398
		dependsOn cglibRepackJar
		from(zipTree(cglibRepackJar.archivePath)) {
P
Phillip Webb 已提交
399
			include "org/springframework/cglib/**"
400
		}
401 402 403 404 405

		dependsOn objenesisRepackJar
		from(zipTree(objenesisRepackJar.archivePath)) {
			include "org/springframework/objenesis/**"
		}
406
	}
C
Chris Beams 已提交
407 408
}

P
Phillip Webb 已提交
409 410
project("spring-beans") {
	description = "Spring Beans"
411

412
	dependencies {
413 414
		compile(project(":spring-core"))
		compile(files(project(":spring-core").cglibRepackJar))
415
		optional("javax.inject:javax.inject:1")
416
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
417
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
418
		optional("org.yaml:snakeyaml:${snakeyamlVersion}")
419
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
J
Juergen Hoeller 已提交
420
	}
C
Chris Beams 已提交
421 422
}

423 424
project("spring-beans-groovy") {
	description "Groovy Bean Definitions"
425

J
Juergen Hoeller 已提交
426
	merge.into = project(":spring-beans")
427
	apply plugin: "groovy"
J
Juergen Hoeller 已提交
428 429 430

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

J
Juergen Hoeller 已提交
434
	// This module's Java and Groovy sources need to be compiled together.
435
	compileJava.enabled = false
J
Juergen Hoeller 已提交
436 437 438
	sourceSets {
		main {
			groovy {
439
				srcDir "src/main/java"
J
Juergen Hoeller 已提交
440 441 442
			}
		}
	}
443 444

	compileGroovy {
445 446
		sourceCompatibility = 1.8
		targetCompatibility = 1.8
447
	}
J
Juergen Hoeller 已提交
448 449
}

P
Phillip Webb 已提交
450 451
project("spring-aop") {
	description = "Spring AOP"
452

453
	dependencies {
454
		compile(project(":spring-beans"))
455 456
		compile(project(":spring-core"))
		compile(files(project(":spring-core").cglibRepackJar))
457
		compile(files(project(":spring-core").objenesisRepackJar))
458
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
459
		optional("org.apache.commons:commons-pool2:2.4.2")
460
		optional("com.jamonapi:jamon:2.81")
461
	}
C
Chris Beams 已提交
462 463
}

P
Phillip Webb 已提交
464 465
project("spring-expression") {
	description = "Spring Expression Language (SpEL)"
466

467
	dependencies {
468
		compile(project(":spring-core"))
469
	}
C
Chris Beams 已提交
470 471
}

P
Phillip Webb 已提交
472 473
project("spring-instrument") {
	description = "Spring Instrument"
474

475
	jar {
P
Phillip Webb 已提交
476 477
		manifest.attributes["Premain-Class"] =
			"org.springframework.instrument.InstrumentationSavingAgent"
478 479
		manifest.attributes["Agent-Class"] =
			"org.springframework.instrument.InstrumentationSavingAgent"
480 481 482
		manifest.attributes["Can-Redefine-Classes"] = "true"
		manifest.attributes["Can-Retransform-Classes"] = "true"
		manifest.attributes["Can-Set-Native-Method-Prefix"] = "false"
483
	}
C
Chris Beams 已提交
484 485
}

P
Phillip Webb 已提交
486 487
project("spring-context") {
	description = "Spring Context"
488

489
	apply plugin: "groovy"
490

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

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

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

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

	dependencies {
		compile(project(":spring-beans"))
		compile(project(":spring-core"))
		compile(project(":spring-context"))
563
		optional(project(":spring-oxm"))
564 565
		optional("io.projectreactor:reactor-core")
		optional("io.projectreactor.ipc:reactor-netty")
566
		optional("io.netty:netty-all")
B
Brian Clozel 已提交
567
		optional("org.eclipse.jetty.websocket:websocket-server:${jettyVersion}") {
B
Brian Clozel 已提交
568 569
			exclude group: "javax.servlet", module: "javax.servlet-api"
		}
B
Brian Clozel 已提交
570
		optional("org.eclipse.jetty.websocket:websocket-client:${jettyVersion}")
571
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
572
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
573
		testCompile("javax.inject:javax.inject-tck:1")
574
		testCompile("javax.servlet:javax.servlet-api:${servletVersion}")
J
Juergen Hoeller 已提交
575
		testCompile("javax.validation:validation-api:${beanvalVersion}")
576
		testCompile("com.thoughtworks.xstream:xstream:${xstreamVersion}")
577 578 579 580 581
		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 已提交
582
		testCompile("org.eclipse.jetty:jetty-webapp:${jettyVersion}") {
B
Brian Clozel 已提交
583
			exclude group: "javax.servlet", module: "javax.servlet-api"
584
		}
585 586
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
		testCompile("org.apache.tomcat.embed:tomcat-embed-websocket:${tomcatVersion}")
587
		testCompile("io.netty:netty-all")
588
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
S
Sebastien Deleuze 已提交
589
		testCompile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
590
		testCompile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
591 592
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
593
	}
C
Chris Beams 已提交
594 595
}

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

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

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

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

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

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

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

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

678 679 680 681 682 683 684 685 686 687 688
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 已提交
689 690
project("spring-web") {
	description = "Spring Web"
S
Sebastien Deleuze 已提交
691

692
	apply plugin: "groovy"
693

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

775 776
project("spring-webflux") {
	description = "Spring WebFlux"
777

778 779 780
	dependencies {
		compile(project(":spring-core"))
		compile(project(":spring-web"))
781 782
		compile("org.reactivestreams:reactive-streams")
		compile("io.projectreactor:reactor-core")
783 784
		optional(project(":spring-context-support"))  // for FreeMarker support
		provided "javax.servlet:javax.servlet-api:${servletVersion}"
785
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
786 787
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
		optional("org.freemarker:freemarker:${freemarkerVersion}")
788 789 790
		optional("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
791
		optional('org.webjars:webjars-locator:0.32-1')
792
		optional("io.projectreactor.ipc:reactor-netty")
793 794
		optional("io.reactivex:rxjava:${rxjavaVersion}")
		optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
795 796 797 798 799
		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"
		}
800 801 802
		optional("org.eclipse.jetty.websocket:websocket-server:${jettyVersion}") {
			exclude group: "javax.servlet", module: "javax.servlet"
		}
803 804 805
		optional("io.undertow:undertow-websockets-jsr:${undertowVersion}") {
			exclude group: "org.jboss.spec.javax.websocket", module: "jboss-websocket-api_1.1_spec"
		}
806
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
807
		optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
808
		testCompile("io.projectreactor.addons:reactor-test")
809
		testCompile("javax.validation:validation-api:${beanvalVersion}")
810
		testCompile("org.hibernate:hibernate-validator:${hibvalVersion}")
811 812 813 814
		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 已提交
815
		testCompile "io.reactivex.rxjava2:rxjava:${rxjava2Version}"
816
		testCompile("io.undertow:undertow-core:${undertowVersion}")
817 818 819
		testCompile("io.reactivex:rxnetty-http:${rxnettyVersion}") {
			exclude group: 'io.reactivex', module: 'rxjava'
		}
820
		testCompile("com.fasterxml:aalto-xml:1.0.0")
821
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
B
Brian Clozel 已提交
822
		testCompile("com.squareup.okhttp3:mockwebserver:${okhttp3Version}")
823
		testCompile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
824
		testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
825
		testRuntime("org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}")
826
		testRuntime("org.jruby:jruby:9.1.9.0")
827 828 829
		testRuntime("org.python:jython-standalone:2.5.3")
		testRuntime("org.webjars:underscorejs:1.8.3")
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
830 831
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
832
		testRuntime("org.synchronoss.cloud:nio-multipart-parser:${niomultipartVersion}")
833
	}
C
Chris Beams 已提交
834 835
}

P
Phillip Webb 已提交
836 837
project("spring-orm") {
	description = "Spring Object/Relational Mapping"
838

839
	dependencies {
840 841 842 843 844 845 846
		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 已提交
847
		optional("org.eclipse.persistence:javax.persistence:${jpaVersion}")
848 849
		optional("org.eclipse.persistence:org.eclipse.persistence.core:${eclipselinkVersion}")
		optional("org.eclipse.persistence:org.eclipse.persistence.jpa:${eclipselinkVersion}") {
850 851
			exclude group: 'org.eclipse.persistence', module: 'javax.persistence'
		}
852
		optional("org.hibernate:hibernate-core:${hibernate5Version}")
853
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
S
Sam Brannen 已提交
854
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
P
Phillip Webb 已提交
855
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
856
		testRuntime("javax.xml.bind:jaxb-api:${jaxbVersion}")
857
	}
C
Chris Beams 已提交
858 859
}

P
Phillip Webb 已提交
860 861
project("spring-webmvc") {
	description = "Spring Web MVC"
862

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

947 948 949 950 951 952 953 954 955
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"))
956 957
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
		optional("javax.websocket:javax.websocket-api:${websocketVersion}")
958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984
		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"
		}
		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}")
985 986
		testCompile("io.projectreactor:reactor-core")
		testCompile("io.projectreactor.ipc:reactor-netty")
987
		testCompile("io.netty:netty-all")
988 989 990
	}
}

P
Phillip Webb 已提交
991 992
project("spring-test") {
	description = "Spring TestContext Framework"
993

994
	dependencies {
995
		compile(project(":spring-core"))
996 997 998 999 1000 1001 1002
		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"))
1003
		optional(project(":spring-webflux"))
1004
		optional(project(":spring-websocket"))
1005
		optional("junit:junit:${junitVersion}")
1006
		optional("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
1007
		optional("org.testng:testng:${testngVersion}")
1008
		optional("javax.inject:javax.inject:1")
1009 1010
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
		optional("javax.servlet.jsp:javax.servlet.jsp-api:${jspVersion}")
1011 1012 1013 1014
		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"
		}
1015
		optional("javax.el:javax.el-api:${elApiVersion}")
1016
		optional("javax.websocket:javax.websocket-api:${websocketVersion}")
1017 1018
		optional("javax.activation:activation:${activationApiVersion}")
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
1019
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
S
Sam Brannen 已提交
1020
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
1021
		optional("org.hamcrest:hamcrest-core:${hamcrestVersion}")
1022
		optional("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
1023 1024 1025 1026
		optional("net.sourceforge.htmlunit:htmlunit:2.26") {
			exclude group: "commons-logging", module: "commons-logging"
		}
		optional("org.seleniumhq.selenium:htmlunit-driver:2.26")
1027
		optional("org.seleniumhq.selenium:selenium-java:3.4.0") {
1028 1029
			exclude group: "io.netty", module: "netty"
		}
1030
		optional("org.skyscreamer:jsonassert:1.5.0")
1031
		optional("com.jayway.jsonpath:json-path:2.2.0")
1032 1033
		optional("org.reactivestreams:reactive-streams")
		optional("io.projectreactor:reactor-core")
1034
		optional("io.projectreactor.addons:reactor-test")
1035 1036
		testCompile(project(":spring-context-support"))
		testCompile(project(":spring-oxm"))
1037
		testCompile("javax.mail:javax.mail-api:${javamailVersion}")
1038
		testCompile("javax.ejb:javax.ejb-api:${ejbApiVersion}")
S
Stephane Nicoll 已提交
1039
		testCompile("javax.interceptor:javax.interceptor-api:${interceptorApiVersion}")
1040
		testCompile("org.hibernate:hibernate-core:${hibernate5Version}")
1041
		testCompile("org.hibernate:hibernate-validator:${hibvalVersion}")
1042 1043
		// Enable use of the JUnitPlatform Runner
		testCompile("org.junit.platform:junit-platform-runner:${junitPlatformVersion}")
1044
		testCompile("com.thoughtworks.xstream:xstream:${xstreamVersion}")
1045
		testCompile("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
1046
		testCompile("com.rometools:rome:${romeVersion}")
1047 1048
		testCompile("org.apache.tiles:tiles-api:${tiles3Version}")
		testCompile("org.apache.tiles:tiles-core:${tiles3Version}") {
1049 1050
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
1051
		testCompile("org.apache.tiles:tiles-servlet:${tiles3Version}") {
1052 1053
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
1054
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
1055 1056 1057
		testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
1058
		testCompile("javax.cache:cache-api:${cacheApiVersion}")
1059
		testCompile('de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1')
1060
		testCompile('io.projectreactor.ipc:reactor-netty')
1061 1062
		// Pull in the latest JUnit 5 Launcher API and the Vintage engine as well
		// so that we can run JUnit 4 tests in IntelliJ IDEA.
1063
		testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
1064
		testRuntime("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}")
1065
		testRuntime("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}")
1066
		testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}")  // Java Util Logging for JUnit 5
1067
		testRuntime("org.ehcache:ehcache:${ehcache3Version}")
J
Juergen Hoeller 已提交
1068
		testRuntime("org.terracotta:management-model:2.0.0")
1069 1070
		testRuntime("javax.el:javax.el-api:${elApiVersion}")
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
1071 1072
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
1073
	}
1074 1075

	task testNG(type: Test) {
1076
		description = 'Runs TestNG tests.'
1077
		useTestNG()
1078
		scanForTestClasses = false
1079 1080
		include(["**/testng/**/*Tests.class", "**/testng/**/*Test.class"])
		// Show STD_OUT & STD_ERR of the test JVM(s) on the console:
1081
		// testLogging.showStandardStreams = true
1082
		// forkEvery 1
1083
		reports.junitXml.destination = file("$buildDir/test-results")
1084 1085 1086
	}

	test {
1087
		description = 'Runs JUnit tests.'
1088 1089
		dependsOn testNG
		useJUnit()
1090 1091 1092
		scanForTestClasses = false
		include(['**/*Tests.class', '**/*Test.class', '**/SpringJUnitJupiterTestSuite.class'])
		exclude(['**/testng/**/*.*'])
1093 1094
		// Java Util Logging for JUnit 5.
		// systemProperty('java.util.logging.manager', 'org.apache.logging.log4j.jul.LogManager')
1095
		reports.junitXml.destination = file("$buildDir/test-results")
1096
	}
1097 1098

	task aggregateTestReports(type: TestReport) {
1099
		description = 'Aggregates JUnit and TestNG test reports.'
1100 1101 1102 1103 1104
		destinationDir = test.reports.html.destination
		reportOn test, testNG
	}

	check.dependsOn aggregateTestReports
C
Chris Beams 已提交
1105 1106
}

P
Phillip Webb 已提交
1107 1108 1109
project("spring-aspects") {
	description = "Spring Aspects"
	apply from: "aspects.gradle"
1110

1111
	dependencies {
1112
		aspects(project(":spring-orm"))
1113 1114 1115
		ajc("org.aspectj:aspectjtools:${aspectjVersion}")
		rt("org.aspectj:aspectjrt:${aspectjVersion}")
		compile("org.aspectj:aspectjweaver:${aspectjVersion}")
J
Juergen Hoeller 已提交
1116
		provided("org.eclipse.persistence:javax.persistence:${jpaVersion}")
1117 1118 1119 1120 1121 1122
		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
1123
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")  // for @javax.transaction.Transactional support
1124
		optional("javax.cache:cache-api:${cacheApiVersion}")
1125
		testCompile(project(":spring-core"))  // for CodeStyleAspect
1126
		testCompile(project(":spring-test"))
1127
		testCompile("javax.mail:javax.mail-api:${javamailVersion}")
1128
	}
1129

1130
	eclipse.project {
P
Phillip Webb 已提交
1131
		natures += "org.eclipse.ajdt.ui.ajnature"
1132
		buildCommands = [new org.gradle.plugins.ide.eclipse.model.BuildCommand("org.eclipse.ajdt.core.ajbuilder")]
1133
	}
C
Chris Beams 已提交
1134 1135
}

1136 1137
project("spring-framework-bom") {
	description = "Spring Framework (Bill of Materials)"
1138

1139 1140 1141 1142 1143
	dependencyManagement {
		generatedPomCustomization {
			enabled = false
		}
	}
1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176

	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)
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}

1177 1178
sonarqube {
	properties {
S
Stephane Nicoll 已提交
1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190
		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"
	}
}

1191
configure(rootProject) {
P
Phillip Webb 已提交
1192
	description = "Spring Framework"
1193

1194
	apply plugin: "groovy"
R
Rob Winch 已提交
1195
	apply plugin: "io.spring.dependency-management"
1196
	// apply plugin: "detect-split-packages"
1197
	apply from: "${gradleScriptDir}/jdiff.gradle"
1198
	apply from: "${gradleScriptDir}/docs.gradle"
1199

R
Rob Winch 已提交
1200 1201 1202 1203 1204 1205 1206 1207 1208 1209
	dependencyManagement {
		imports {
			mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
		}
		resolutionStrategy {
			cacheChangingModulesFor 0, 'seconds'
		}
		applyMavenExclusions = false
	}

1210 1211 1212 1213 1214
	// 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")
	// }
1215

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

1219
	dependencies {  // for integration tests
1220
		testCompile(project(":spring-aop"))
1221
		testCompile(project(":spring-beans"))
1222
		testCompile(project(":spring-context"))
1223 1224
		testCompile(project(":spring-core"))
		testCompile(project(":spring-expression"))
1225
		testCompile(project(":spring-jdbc"))
1226
		testCompile(project(":spring-orm"))
1227
		testCompile(project(":spring-test"))
1228
		testCompile(project(":spring-tx"))
1229
		testCompile(project(":spring-web"))
1230
		testCompile("javax.servlet:javax.servlet-api:${servletVersion}")
1231
		testCompile("javax.inject:javax.inject:1")
J
Juergen Hoeller 已提交
1232
		testCompile("javax.resource:javax.resource-api:${jcaVersion}")
1233
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
1234
		testCompile("org.hibernate:hibernate-core:${hibernate5Version}")
P
Phillip Webb 已提交
1235
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
1236 1237 1238 1239 1240 1241 1242 1243 1244
	}

	artifacts {
		archives docsZip
		archives schemaZip
		archives distZip
	}

	task wrapper(type: Wrapper) {
P
Phillip Webb 已提交
1245
		description = "Generates gradlew[.bat] scripts"
S
Sam Brannen 已提交
1246
		gradleVersion = '3.5'
1247 1248

		doLast() {
1249
			def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
1250
			def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=256m"
P
Phillip Webb 已提交
1251
			File wrapperFile = file("gradlew")
1252 1253
			wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
				"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
P
Phillip Webb 已提交
1254
			File wrapperBatFile = file("gradlew.bat")
1255 1256 1257 1258
			wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=",
				"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
		}
	}
1259

1260
}
1261

S
Stephane Nicoll 已提交
1262
configure([project(':spring-build-src'), project(':spring-framework-bom')]) {
1263
	sonarqube {
S
Stephane Nicoll 已提交
1264 1265 1266 1267 1268
		skipProject = true
	}
}

configure(project(':spring-core')) {
1269 1270
	sonarqube {
		properties {
S
Stephane Nicoll 已提交
1271 1272 1273 1274 1275 1276
			property "sonar.exclusions",
					"src/main/java/org/springframework/cglib/**/*,src/main/java/org/springframework/asm/**/*"
		}
	}
}

1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287
/*
 * 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-")) {
1288
			return version.replace('BUILD', qualifier)
1289 1290
		}
	}
1291
	return version
1292
}