build.gradle 46.2 KB
Newer Older
1
buildscript {
S
Sebastien Deleuze 已提交
2
	ext.kotlinVersion = '1.1.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 {
R
Rob Winch 已提交
18
	id "org.sonarqube" version "2.5"
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
	ext.activationVersion    = "1.1.1"
	ext.aspectjVersion       = "1.9.0.BETA-6"
	ext.freemarkerVersion    = "2.3.26-incubating"
	ext.groovyVersion        = "2.4.12"
	ext.hsqldbVersion        = "2.4.0"
	ext.httpclientVersion    = "4.5.3"
	ext.jackson2Version      = "2.9.0"
	ext.javamailVersion      = "1.6.0"
	ext.jaxbVersion          = "2.2.11"
	ext.jaxwsVersion         = "2.2.11"
	ext.jettyVersion         = "9.4.7.RC0"
	ext.junitJupiterVersion  = '5.0.0-RC2'
	ext.junitPlatformVersion = '1.0.0-RC2'
	ext.junitVintageVersion  = "4.12.0-RC2"
	ext.log4jVersion         = '2.8.2'
	ext.nettyVersion         = "4.1.14.Final"
	ext.okhttp3Version       = "3.8.1"
	ext.reactorVersion       = "Bismuth-BUILD-SNAPSHOT"
	ext.rxjavaVersion        = '1.3.0'
	ext.rxjavaAdapterVersion = '1.2.1'
	ext.rxjava2Version       = '2.1.3'
	ext.slf4jVersion         = "1.7.25"
	ext.tiles3Version        = "3.0.7"
	ext.tomcatVersion        = "8.5.20"
	ext.undertowVersion      = "1.4.18.Final"
63

64
	ext.gradleScriptDir = "${rootProject.projectDir}/gradle"
65

66
	apply plugin: "propdeps"
P
Phillip Webb 已提交
67
	apply plugin: "java"
68
	apply plugin: "test-source-set-dependencies"
69
	apply from: "${gradleScriptDir}/ide.gradle"
70
	apply from: "${gradleScriptDir}/sniffer.gradle"
C
Chris Beams 已提交
71

S
Sebastien Deleuze 已提交
72 73 74
	apply plugin: "kotlin"
	compileKotlin {
		kotlinOptions.jvmTarget = "1.8"
75
		kotlinOptions.freeCompilerArgs = ["-Xskip-runtime-version-check", "-Xjsr305-annotations=enable"]
76

S
Sebastien Deleuze 已提交
77 78 79
	}
	compileTestKotlin {
		kotlinOptions.jvmTarget = "1.8"
80
		kotlinOptions.freeCompilerArgs = ["-Xskip-runtime-version-check", "-Xjsr305-annotations=enable"]
S
Sebastien Deleuze 已提交
81 82
	}

83
	configurations.all {
J
Juergen Hoeller 已提交
84
		// Check for updates every build
85 86
		resolutionStrategy.cacheChangingModulesFor 0, 'seconds'

J
Juergen Hoeller 已提交
87
		// Consistent netty version (e.g. clashes between netty-all vs netty-common)
88 89 90 91 92 93 94
		resolutionStrategy.eachDependency { DependencyResolveDetails details ->
			if (details.requested.group == 'io.netty') {
				details.useVersion nettyVersion
			}
		}
	}

P
Phillip Webb 已提交
95 96 97
	compileJava.options*.compilerArgs = [
		"-Xlint:serial", "-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile",
		"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
S
Stephane Nicoll 已提交
98
		"-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static",
P
Phillip Webb 已提交
99
		"-Xlint:try", "-Xlint:fallthrough", "-Xlint:rawtypes", "-Xlint:deprecation",
100
		"-Xlint:unchecked", "-Xlint:-options", "-Werror"
101
	]
C
Chris Beams 已提交
102

P
Phillip Webb 已提交
103
	compileTestJava.options*.compilerArgs = [
104
		"-Xlint:serial", "-Xlint:-varargs", "-Xlint:cast", "-Xlint:classfile",
P
Phillip Webb 已提交
105
		"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
S
Stephane Nicoll 已提交
106
		"-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static",
P
Phillip Webb 已提交
107 108 109
		"-Xlint:try", "-Xlint:-fallthrough", "-Xlint:-rawtypes", "-Xlint:-deprecation",
		"-Xlint:-unchecked", "-Xlint:-options"]

110
	compileJava {
111 112
		sourceCompatibility = 1.8
		targetCompatibility = 1.8
113
		options.encoding = 'UTF-8'
114 115 116
	}

	compileTestJava {
J
Juergen Hoeller 已提交
117 118
		sourceCompatibility = 1.8
		targetCompatibility = 1.8
119
		options.encoding = 'UTF-8'
120
		options.compilerArgs += "-parameters"
J
Juergen Hoeller 已提交
121 122
	}

C
Chris Beams 已提交
123 124
	test {
		systemProperty("java.awt.headless", "true")
125
		systemProperty("testGroups", project.properties.get("testGroups"))
126
		scanForTestClasses = false
127
		include(["**/*Tests.class", "**/*Test.class"])
128 129
		// Since we set scanForTestClasses to false, we need to filter out inner
		// classes with the "$" pattern; otherwise, using -Dtest.single=MyTests to
130
		// run MyTests by itself will fail if MyTests contains any inner classes.
131
		exclude(["**/Abstract*.class", '**/*$*'])
S
Stephane Nicoll 已提交
132
		reports.junitXml.destination = file("$buildDir/test-results")
C
Chris Beams 已提交
133
	}
C
Chris Beams 已提交
134

135
	repositories {
B
Brian Clozel 已提交
136
		maven { url "https://repo.spring.io/libs-release" }
137
		maven { url "https://repo.spring.io/milestone" }
138
		maven { url "https://repo.spring.io/snapshot" }
139
	}
C
Chris Beams 已提交
140

141
	dependencies {
142
		provided("com.google.code.findbugs:jsr305:3.0.2")
143
		testCompile("junit:junit:4.12") {
144 145
			exclude group:'org.hamcrest', module:'hamcrest-core'
		}
146
		testCompile("org.mockito:mockito-core:2.6.1") {
147 148
			exclude group:'org.hamcrest', module:'hamcrest-core'
		}
S
Sebastien Deleuze 已提交
149 150 151 152 153
		testCompile("com.nhaarman:mockito-kotlin:1.5.0") {
			exclude module:'kotlin-stdlib'
			exclude module:'kotlin-reflect'
			exclude module:'mockito-core'
		}
154 155
		testCompile("org.hamcrest:hamcrest-all:1.3")
		testCompile("org.xmlunit:xmlunit-matchers:2.3.0")
156
		testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
157
	}
C
Chris Beams 已提交
158 159

	ext.javadocLinks = [
160
		"http://docs.oracle.com/javase/8/docs/api/",
161
		"http://docs.oracle.com/javaee/7/api/",
162
		"http://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/",  // CommonJ
J
Juergen Hoeller 已提交
163 164
		"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 已提交
165 166
		"http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/",
		"http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/",
167
		"http://tiles.apache.org/tiles-request/apidocs/",
J
Juergen Hoeller 已提交
168
		"http://tiles.apache.org/framework/apidocs/",
C
Chris Beams 已提交
169
		"http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/",
170
		"http://ehcache.org/apidocs/2.10.4",
171
		"http://quartz-scheduler.org/api/2.2.1/",
172 173 174
		"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/",
175
		"http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/"
C
Chris Beams 已提交
176
	] as String[]
177 178
}

179
configure(subprojects - project(":spring-build-src")) { subproject ->
180
	apply plugin: "merge"
181
	apply from: "${gradleScriptDir}/publish-maven.gradle"
182 183 184 185 186
	apply plugin: "io.spring.dependency-management"

	dependencyManagement {
		imports {
			mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
187
			mavenBom "io.netty:netty-bom:${nettyVersion}"
188 189 190 191 192 193
		}
		resolutionStrategy {
			cacheChangingModulesFor 0, 'seconds'
		}
		applyMavenExclusions = false
	}
194

S
Stephane Nicoll 已提交
195 196 197 198
	configurations {
		jacoco
	}
	dependencies {
199
		jacoco("org.jacoco:org.jacoco.agent:0.7.5.201505241946:runtime")
S
Stephane Nicoll 已提交
200 201 202
	}

	gradle.taskGraph.whenReady {taskGraph ->
203
		if (taskGraph.hasTask(':sonarqube')) {
S
Stephane Nicoll 已提交
204 205 206 207
			test.jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.*"
		}
	}

208
	jar {
P
Phillip Webb 已提交
209 210 211 212
		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
213 214 215 216 217

		from("${rootProject.projectDir}/src/dist") {
			include "license.txt"
			include "notice.txt"
			into "META-INF"
P
Phillip Webb 已提交
218
			expand(copyright: new Date().format("yyyy"), version: project.version)
219 220 221 222
		}
	}

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

225 226 227
		options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
		options.author = true
		options.header = project.name
228
		options.use = true
C
Chris Beams 已提交
229
		options.links(project.ext.javadocLinks)
230
		options.addStringOption('Xdoclint:none', '-quiet')
C
Chris Beams 已提交
231

232 233
		// Suppress warnings due to cross-module @see and @link references.
		// Note that global 'api' task does display all warnings.
C
Chris Beams 已提交
234
		logging.captureStandardError LogLevel.INFO
235
		logging.captureStandardOutput LogLevel.INFO  // suppress "## warnings" message
236 237
	}

238
	task sourcesJar(type: Jar, dependsOn: classes) {
239
		duplicatesStrategy = DuplicatesStrategy.EXCLUDE
240
		classifier = 'sources'
241
		from sourceSets.main.allSource
242
		// Don't include or exclude anything explicitly by default. See SPR-12085.
243 244 245
	}

	task javadocJar(type: Jar) {
P
Phillip Webb 已提交
246
		classifier = "javadoc"
247 248 249 250 251 252 253
		from javadoc
	}

	artifacts {
		archives sourcesJar
		archives javadocJar
	}
C
Chris Beams 已提交
254 255
}

256 257
project("spring-build-src") {
	description = "Exposes gradle buildSrc for IDE support"
258

259
	apply plugin: "groovy"
260 261 262

	dependencies {
		compile gradleApi()
R
Rob Winch 已提交
263
		compile localGroovy()
264 265 266 267 268
	}

	configurations.archives.artifacts.clear()
}

269 270 271 272 273 274 275 276 277
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 已提交
278 279
project("spring-core") {
	description = "Spring Core"
280

281 282
	// 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
283
	// further transformed by the JarJar task to depend on org.springframework.asm; this
284
	// avoids including two different copies of asm unnecessarily.
J
Juergen Hoeller 已提交
285
	def cglibVersion = "3.2.5"
286
	def objenesisVersion = "2.6"
287 288 289 290

	configurations {
		jarjar
		cglib
291
		objenesis
292 293 294 295 296 297 298 299 300 301 302 303 304 305
	}

	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 已提交
306
					// Repackage net.sf.cglib => org.springframework.cglib
P
Phillip Webb 已提交
307
					rule(pattern: "net.sf.cglib.**", result: "org.springframework.cglib.@1")
J
Juergen Hoeller 已提交
308
					// As mentioned above, transform cglib"s internal asm dependencies from
309 310
					// 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 已提交
311
					rule(pattern: "org.objectweb.asm.**", result: "org.springframework.asm.@1")
312 313 314 315 316
				}
			}
		}
	}

317 318 319 320 321 322 323 324 325 326 327 328
	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 已提交
329
					// Repackage org.objenesis => org.springframework.objenesis
330 331 332 333 334 335
					rule(pattern: "org.objenesis.**", result: "org.springframework.objenesis.@1")
				}
			}
		}
	}

336
	dependencies {
337
		cglib("cglib:cglib:${cglibVersion}@jar")
338
		objenesis("org.objenesis:objenesis:${objenesisVersion}@jar")
339
		jarjar("com.googlecode.jarjar:jarjar:1.3")
340

P
Phillip Webb 已提交
341
		compile(files(cglibRepackJar))
342
		compile(files(objenesisRepackJar))
343
		compile(project(":spring-jcl"))
344
		optional("net.sf.jopt-simple:jopt-simple:5.0.3")
345
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
346
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
S
Sebastien Deleuze 已提交
347
		optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
348
		optional("io.projectreactor:reactor-core")
349 350 351
		optional("io.reactivex:rxjava:${rxjavaVersion}")
		optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
		optional("io.reactivex.rxjava2:rxjava:${rxjava2Version}")
352
		optional("io.netty:netty-buffer")
R
Rob Winch 已提交
353
		testCompile("io.projectreactor:reactor-test")
354
		testCompile("javax.xml.bind:jaxb-api:${jaxbVersion}")
355
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
356
		testCompile("com.fasterxml.woodstox:woodstox-core:5.0.3") {
P
Phillip Webb 已提交
357 358
			exclude group: "stax", module: "stax-api"
		}
359 360 361
	}

	jar {
J
Juergen Hoeller 已提交
362
		// Inline repackaged cglib classes directly into spring-core jar
363 364
		dependsOn cglibRepackJar
		from(zipTree(cglibRepackJar.archivePath)) {
P
Phillip Webb 已提交
365
			include "org/springframework/cglib/**"
366
		}
367 368 369 370 371

		dependsOn objenesisRepackJar
		from(zipTree(objenesisRepackJar.archivePath)) {
			include "org/springframework/objenesis/**"
		}
372
	}
C
Chris Beams 已提交
373 374
}

P
Phillip Webb 已提交
375 376
project("spring-beans") {
	description = "Spring Beans"
377

378
	dependencies {
379 380
		compile(project(":spring-core"))
		compile(files(project(":spring-core").cglibRepackJar))
381
		optional("javax.inject:javax.inject:1")
382
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
S
Sebastien Deleuze 已提交
383
		optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
384
		optional("org.yaml:snakeyaml:1.18")
385
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
J
Juergen Hoeller 已提交
386
	}
C
Chris Beams 已提交
387 388
}

389 390
project("spring-beans-groovy") {
	description "Groovy Bean Definitions"
391

J
Juergen Hoeller 已提交
392
	merge.into = project(":spring-beans")
393
	apply plugin: "groovy"
J
Juergen Hoeller 已提交
394 395 396

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

J
Juergen Hoeller 已提交
400
	// This module's Java and Groovy sources need to be compiled together.
401
	compileJava.enabled = false
J
Juergen Hoeller 已提交
402 403 404
	sourceSets {
		main {
			groovy {
405
				srcDir "src/main/java"
J
Juergen Hoeller 已提交
406 407 408
			}
		}
	}
409 410

	compileGroovy {
411 412
		sourceCompatibility = 1.8
		targetCompatibility = 1.8
413
	}
J
Juergen Hoeller 已提交
414 415
}

P
Phillip Webb 已提交
416 417
project("spring-aop") {
	description = "Spring AOP"
418

419
	dependencies {
420
		compile(project(":spring-beans"))
421 422
		compile(project(":spring-core"))
		compile(files(project(":spring-core").cglibRepackJar))
423
		compile(files(project(":spring-core").objenesisRepackJar))
424
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
425
		optional("org.apache.commons:commons-pool2:2.4.2")
426
		optional("com.jamonapi:jamon:2.81")
427
	}
C
Chris Beams 已提交
428 429
}

P
Phillip Webb 已提交
430 431
project("spring-expression") {
	description = "Spring Expression Language (SpEL)"
432

433
	dependencies {
434
		compile(project(":spring-core"))
435
	}
C
Chris Beams 已提交
436 437
}

P
Phillip Webb 已提交
438 439
project("spring-instrument") {
	description = "Spring Instrument"
440

441
	jar {
P
Phillip Webb 已提交
442 443
		manifest.attributes["Premain-Class"] =
			"org.springframework.instrument.InstrumentationSavingAgent"
444 445
		manifest.attributes["Agent-Class"] =
			"org.springframework.instrument.InstrumentationSavingAgent"
446 447 448
		manifest.attributes["Can-Redefine-Classes"] = "true"
		manifest.attributes["Can-Retransform-Classes"] = "true"
		manifest.attributes["Can-Set-Native-Method-Prefix"] = "false"
449
	}
C
Chris Beams 已提交
450 451
}

P
Phillip Webb 已提交
452 453
project("spring-context") {
	description = "Spring Context"
454

455
	apply plugin: "groovy"
456

457
	dependencies {
458 459 460 461 462
		compile(project(":spring-aop"))
		compile(project(":spring-beans"))
		compile(project(":spring-expression"))
		compile(project(":spring-core"))
		compile(files(project(":spring-core").cglibRepackJar))
463
		optional(project(":spring-instrument"))
464
		optional("javax.inject:javax.inject:1")
465
		optional("javax.annotation:javax.annotation-api:1.3")
466
		optional("javax.xml.ws:jaxws-api:${jaxwsVersion}")
467 468
		optional("javax.ejb:javax.ejb-api:3.2")
		optional("javax.interceptor:javax.interceptor-api:1.2")
469
		optional("javax.enterprise.concurrent:javax.enterprise.concurrent-api:1.0")
470
		optional("javax.money:money-api:1.0.1")
471 472
		optional("javax.validation:validation-api:1.1.0.Final")
		optional("org.hibernate:hibernate-validator:5.4.1.Final")
473
		optional("joda-time:joda-time:2.9.9")
474
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
J
Juergen Hoeller 已提交
475
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
476
		optional("org.beanshell:bsh:2.0b5")
477
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
S
Sebastien Deleuze 已提交
478
		optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
479
		testCompile("org.apache.commons:commons-pool2:2.4.2")
480
		testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
481
		testCompile("javax.inject:javax.inject-tck:1")
482
		testRuntime("javax.xml.bind:jaxb-api:${jaxbVersion}")
483 484
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
		testRuntime("org.javamoney:moneta:1.1")
485 486 487 488 489 490 491 492 493 494
	}
}

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

	dependencies {
		compile(project(":spring-beans"))
		compile(project(":spring-core"))
495
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
496
		optional("javax.activation:activation:${activationVersion}")
497 498 499
		optional("org.codehaus.castor:castor-xml:1.4.1")  {
			exclude group: 'stax', module: 'stax-api'
			exclude group: "org.springframework", module: "spring-context"
500
			exclude group: "commons-logging", module: "commons-logging"
501
		}
502
		optional("com.thoughtworks.xstream:xstream:1.4.10") {
503 504 505
			exclude group: 'xpp3', module: 'xpp3_min'
			exclude group: 'xmlpull', module: 'xmlpull'
		}
506
		optional("org.jibx:jibx-run:1.3.1")
507
		testCompile(project(":spring-context"))
508
		testCompile("org.ogce:xpp3:1.1.6")
509
		testCompile("org.codehaus.jettison:jettison:1.3.8") {
510 511
			exclude group: 'stax', module: 'stax-api'
		}
512 513
        testCompile(files(genCastor.classesDir).builtBy(genCastor))
        testCompile(files(genJaxb.classesDir).builtBy(genJaxb))
514 515 516
		testRuntime("xerces:xercesImpl:2.11.0")  // for Castor
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
517
	}
518 519 520 521 522 523 524 525
}

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

	dependencies {
		compile(project(":spring-beans"))
		compile(project(":spring-core"))
526
		optional(project(":spring-context"))
527
		optional(project(":spring-oxm"))
528
		optional("io.projectreactor.ipc:reactor-netty")
B
Brian Clozel 已提交
529
		optional("org.eclipse.jetty.websocket:websocket-server:${jettyVersion}") {
B
Brian Clozel 已提交
530 531
			exclude group: "javax.servlet", module: "javax.servlet-api"
		}
B
Brian Clozel 已提交
532
		optional("org.eclipse.jetty.websocket:websocket-client:${jettyVersion}")
533
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
534
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
535
		testCompile("javax.inject:javax.inject-tck:1")
536 537 538
		testCompile("javax.servlet:javax.servlet-api:3.1.0")
		testCompile("javax.validation:validation-api:1.1.0.Final")
		testCompile("com.thoughtworks.xstream:xstream:1.4.10")
539 540 541 542 543
		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 已提交
544
		testCompile("org.eclipse.jetty:jetty-webapp:${jettyVersion}") {
B
Brian Clozel 已提交
545
			exclude group: "javax.servlet", module: "javax.servlet-api"
546
		}
547 548
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
		testCompile("org.apache.tomcat.embed:tomcat-embed-websocket:${tomcatVersion}")
S
Sebastien Deleuze 已提交
549
		testCompile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
S
Sebastien Deleuze 已提交
550
		testCompile("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
551 552
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
553
		testRuntime("javax.activation:activation:${activationVersion}")
554
	}
C
Chris Beams 已提交
555 556
}

P
Phillip Webb 已提交
557 558
project("spring-tx") {
	description = "Spring Transaction"
559

560
	dependencies {
561 562
		compile(project(":spring-beans"))
		compile(project(":spring-core"))
563
		optional(project(":spring-aop"))
564
		optional(project(":spring-context"))  // for JCA, @EnableTransactionManagement
565 566 567 568
		optional("javax.ejb:javax.ejb-api:3.2")
		optional("javax.interceptor:javax.interceptor-api:1.2")
		optional("javax.resource:javax.resource-api:1.7")
		optional("javax.transaction:javax.transaction-api:1.2")
569
		optional("com.ibm.websphere:uow:6.0.2.17")
570
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
571
		testCompile("org.codehaus.groovy:groovy-all:${groovyVersion}")
572
		testCompile("org.eclipse.persistence:javax.persistence:2.1.1")
573
	}
C
Chris Beams 已提交
574 575
}

P
Phillip Webb 已提交
576 577
project("spring-jms") {
	description = "Spring JMS"
578

579
	dependencies {
580
		provided("javax.jms:javax.jms-api:2.0.1")
581
		compile(project(":spring-beans"))
582
		compile(project(":spring-core"))
583
		compile(project(":spring-messaging"))
584
		compile(project(":spring-tx"))
585 586
		optional(project(":spring-aop"))
		optional(project(":spring-context"))
587
		optional(project(":spring-oxm"))
588 589
		optional("javax.resource:javax.resource-api:1.7")
		optional("javax.transaction:javax.transaction-api:1.2")
590
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
591
	}
C
Chris Beams 已提交
592 593
}

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

597
	dependencies {
598
		compile(project(":spring-beans"))
599
		compile(project(":spring-core"))
600
		compile(project(":spring-tx"))
601
		optional(project(":spring-context"))  // for JndiDataSourceLookup
602
		optional("javax.transaction:javax.transaction-api:1.2")
P
Phillip Webb 已提交
603
		optional("org.hsqldb:hsqldb:${hsqldbVersion}")
604
		optional("com.h2database:h2:1.4.196")
605 606
		optional("org.apache.derby:derby:10.13.1.1")
		optional("org.apache.derby:derbyclient:10.13.1.1")
M
Mario Arias 已提交
607
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
S
Sebastien Deleuze 已提交
608
		optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
609
	}
C
Chris Beams 已提交
610 611
}

612 613 614 615 616 617
project("spring-context-indexer") {
	description = "Spring Context Indexer"

	dependencies {
		testCompile(project(":spring-context"))
		testCompile("javax.inject:javax.inject:1")
618 619
		testCompile("javax.annotation:javax.annotation-api:1.3")
		testCompile("org.eclipse.persistence:javax.persistence:2.1.1")
620 621 622
	}
}

P
Phillip Webb 已提交
623 624
project("spring-context-support") {
	description = "Spring Context Support"
625

626
	dependencies {
627 628
		compile(project(":spring-beans"))
		compile(project(":spring-context"))
629
		compile(project(":spring-core"))
630 631
		optional(project(":spring-jdbc"))  // for Quartz support
		optional(project(":spring-tx"))  // for Quartz support
632
		optional("javax.activation:activation:${activationVersion}")
633
		optional("javax.mail:javax.mail-api:${javamailVersion}")
634 635 636 637
		optional("javax.cache:cache-api:1.0.0")
		optional("com.github.ben-manes.caffeine:caffeine:2.5.5")
		optional("net.sf.ehcache:ehcache:2.10.4")
		optional("org.quartz-scheduler:quartz:2.3.0")
638
		optional("org.codehaus.fabric3.api:commonj:1.1.0")
639
		optional("org.freemarker:freemarker:${freemarkerVersion}")
640
		testCompile(project(":spring-context"))
P
Phillip Webb 已提交
641
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
642
		testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
643 644 645
		testCompile("org.hibernate:hibernate-validator:6.0.1.Final")
		testRuntime("org.ehcache:jcache:1.0.1")
		testRuntime("org.ehcache:ehcache:3.3.1")
646
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
647
		testRuntime("javax.annotation:javax.annotation-api:1.3")
648
		testRuntime("com.sun.mail:javax.mail:${javamailVersion}")
649
	}
C
Chris Beams 已提交
650 651
}

P
Phillip Webb 已提交
652 653
project("spring-web") {
	description = "Spring Web"
S
Sebastien Deleuze 已提交
654

655
	apply plugin: "groovy"
656

657
	dependencies {
658
		compile(project(":spring-beans"))
659
		compile(project(":spring-core"))
660 661 662
		optional(project(":spring-aop"))
		optional(project(":spring-context"))
		optional(project(":spring-oxm"))
663 664 665 666 667
		optional("javax.servlet:javax.servlet-api:3.1.0")
		optional("javax.servlet.jsp:javax.servlet.jsp-api:2.3.2-b02")
		optional("javax.el:javax.el-api:3.0.1-b04")
		optional("javax.faces:javax.faces-api:2.2")
		optional("javax.validation:validation-api:1.1.0.Final")
668
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
669
		optional("com.caucho:hessian:4.0.38")
670 671
		optional("commons-fileupload:commons-fileupload:1.3.3")
		optional("org.synchronoss.cloud:nio-multipart-parser:1.1.0")
672
		optional("io.projectreactor.ipc:reactor-netty")
673
		optional("io.reactivex:rxjava:${rxjavaVersion}")
674
		optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
675
		optional("io.reactivex.rxjava2:rxjava:${rxjava2Version}")
B
Brian Clozel 已提交
676
		optional("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
677
		optional("io.undertow:undertow-core:${undertowVersion}")
678
	  	optional("com.fasterxml.woodstox:woodstox-core:5.0.3") {  // woodstox before aalto
679 680
			exclude group: "stax", module: "stax-api"
		}
681
		optional("com.fasterxml:aalto-xml:1.0.0")
682 683 684
		optional("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
685
		optional("org.apache.httpcomponents:httpasyncclient:4.1.3") {
686 687
			exclude group: "commons-logging", module: "commons-logging"
		}
688
		optional("io.netty:netty-all")
689
		optional("com.squareup.okhttp3:okhttp:${okhttp3Version}")
690
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
691
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jackson2Version}")
692 693
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jackson2Version}")
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jackson2Version}")
694
		optional("com.google.code.gson:gson:2.8.1")
695
		optional("javax.json.bind:javax.json.bind-api:1.0")
696
		optional("com.rometools:rome:1.7.4")
B
Brian Clozel 已提交
697
		optional("org.eclipse.jetty:jetty-servlet:${jettyVersion}") {
B
Brian Clozel 已提交
698
			exclude group: "javax.servlet", module: "javax.servlet-api"
699
		}
B
Brian Clozel 已提交
700
		optional("org.eclipse.jetty:jetty-server:${jettyVersion}") {
B
Brian Clozel 已提交
701
			exclude group: "javax.servlet", module: "javax.servlet-api"
702
		}
703
		optional("com.google.protobuf:protobuf-java-util:3.4.0")
704
		optional("com.googlecode.protobuf-java-format:protobuf-java-format:1.4")
705 706
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
		optional("javax.xml.ws:jaxws-api:${jaxwsVersion}")
707
		optional("javax.mail:javax.mail-api:${javamailVersion}")
708
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
S
Sebastien Deleuze 已提交
709
		optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
R
Rob Winch 已提交
710
		testCompile("io.projectreactor:reactor-test")
711 712 713
		testCompile("org.apache.taglibs:taglibs-standard-jstlel:1.2.1") {
			exclude group: "org.apache.taglibs", module: "taglibs-standard-spec"
		}
714
		testCompile("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${jackson2Version}")
J
Juergen Hoeller 已提交
715
		testCompile("com.fasterxml.jackson.datatype:jackson-datatype-joda:${jackson2Version}")
716
		testCompile("com.fasterxml.jackson.module:jackson-module-kotlin:${jackson2Version}")
717 718 719 720
		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}")
721
		testCompile("io.reactivex:rxnetty-http:0.5.2") {
722 723
			exclude group: 'io.reactivex', module: 'rxjava'
		}
724
		testCompile("com.squareup.okhttp3:mockwebserver:${okhttp3Version}")
S
Sebastien Deleuze 已提交
725
		testCompile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
726
		testCompile("org.skyscreamer:jsonassert:1.5.0")
727
		testRuntime("com.sun.mail:javax.mail:${javamailVersion}")
728 729
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
730
		testRuntime("javax.json:javax.json-api:1.1")
731
		testRuntime("org.apache.johnzon:johnzon-jsonb:1.1.2")
732 733 734
	}
}

P
Phillip Webb 已提交
735 736
project("spring-orm") {
	description = "Spring Object/Relational Mapping"
737

738
	dependencies {
739 740 741 742 743 744 745
		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"))
746 747 748
		optional("org.eclipse.persistence:org.eclipse.persistence.jpa:2.7.0-RC3")
		optional("org.hibernate:hibernate-core:5.2.10.Final")
		optional("javax.servlet:javax.servlet-api:3.1.0")
S
Sam Brannen 已提交
749
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
P
Phillip Webb 已提交
750
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
751
		testRuntime("javax.xml.bind:jaxb-api:${jaxbVersion}")
752
	}
C
Chris Beams 已提交
753 754
}

P
Phillip Webb 已提交
755 756
project("spring-webmvc") {
	description = "Spring Web MVC"
757

758
	dependencies {
759
		provided("javax.servlet:javax.servlet-api:4.0.0")
760
		compile(project(":spring-aop"))
761 762
		compile(project(":spring-beans"))
		compile(project(":spring-context"))
763
		compile(project(":spring-core"))
764
		compile(files(project(":spring-core").objenesisRepackJar))
765 766
		compile(project(":spring-expression"))
		compile(project(":spring-web"))
767
		optional(project(":spring-context-support"))  // for FreeMarker support
768
		optional(project(":spring-oxm"))
769
		optional("javax.servlet.jsp:javax.servlet.jsp-api:2.3.2-b02")
770
		optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1")
771
		optional("javax.el:javax.el-api:3.0.1-b04")
772
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
773 774 775
		optional("org.apache.poi:poi-ooxml:3.16")
		optional("com.lowagie:itext:2.1.7")
		optional("com.rometools:rome:1.7.4")
776
		optional("org.freemarker:freemarker:${freemarkerVersion}")
777
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
778
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
779
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jackson2Version}")
780 781
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jackson2Version}")
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jackson2Version}")
782 783
		optional("org.apache.tiles:tiles-api:${tiles3Version}")
		optional("org.apache.tiles:tiles-core:${tiles3Version}") {
784 785
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
786
		optional("org.apache.tiles:tiles-servlet:${tiles3Version}") {
787 788
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
789
		optional("org.apache.tiles:tiles-jsp:${tiles3Version}") {
790 791
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
792
		optional("org.apache.tiles:tiles-el:${tiles3Version}") {
793 794
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
795
		optional("org.apache.tiles:tiles-extras:${tiles3Version}") {
796 797 798
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
			exclude group: "org.springframework", module: "spring-web"
		}
799
		optional('org.webjars:webjars-locator:0.32-1')
800 801
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
		optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
802 803
		optional("org.reactivestreams:reactive-streams")
		testCompile("javax.servlet:javax.servlet-api:4.0.0")
B
Brian Clozel 已提交
804
		testCompile("org.eclipse.jetty:jetty-servlet:${jettyVersion}") {
B
Brian Clozel 已提交
805
			exclude group: "javax.servlet", module: "javax.servlet"
806
		}
B
Brian Clozel 已提交
807
		testCompile("org.eclipse.jetty:jetty-server:${jettyVersion}") {
B
Brian Clozel 已提交
808
			exclude group: "javax.servlet", module: "javax.servlet"
809
		}
810
		testCompile("org.hibernate:hibernate-validator:6.0.1.Final")
811 812 813
		testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
814
		testCompile("commons-fileupload:commons-fileupload:1.3.3")
815
		testCompile("commons-io:commons-io:2.5")
816
		testCompile("joda-time:joda-time:2.9.9")
817
		testCompile("org.mozilla:rhino:1.7.7.1")
818 819 820 821 822 823 824 825
		testCompile("dom4j:dom4j:1.6.1") {
			exclude group: "xml-apis", module: "xml-apis"
		}
		testCompile("jaxen:jaxen:1.1.1") {
			exclude group: "xml-apis", module: "xml-apis"
			exclude group: "xom", module: "xom"
			exclude group: "xerces", module: "xercesImpl"
		}
826 827 828
		testCompile("io.projectreactor:reactor-core")
		testCompile("io.reactivex:rxjava:${rxjavaVersion}")
		testCompile("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
829
		testCompile("io.reactivex.rxjava2:rxjava:${rxjava2Version}")
830
		testCompile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
831
		testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
832
		testRuntime("org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}")
833
		testRuntime("org.jruby:jruby:9.1.12.0")
834
		testRuntime("org.python:jython-standalone:2.7.1")
835
		testRuntime("org.webjars:underscorejs:1.8.3")
836
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
837 838
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
839
		testRuntime("javax.activation:activation:${activationVersion}")
840 841 842
	}
}

843 844 845 846 847
project("spring-websocket") {
	description = "Spring WebSocket"

	dependencies {
		compile(project(":spring-context"))
848
		compile(project(":spring-core"))
849 850 851
		compile(project(":spring-web"))
		optional(project(":spring-messaging"))
		optional(project(":spring-webmvc"))
852 853
		optional("javax.servlet:javax.servlet-api:3.1.0")
		optional("javax.websocket:javax.websocket-api:1.1")
854 855 856 857
		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"
		}
858
		optional("org.glassfish.tyrus:tyrus-container-servlet:1.13.1")
859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876
		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-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}")
877
		testCompile("io.projectreactor.ipc:reactor-netty")
878 879 880
	}
}

881 882 883 884
project("spring-webflux") {
	description = "Spring WebFlux"

	dependencies {
885
		compile(project(":spring-beans"))
886 887 888
		compile(project(":spring-core"))
		compile(project(":spring-web"))
		compile("io.projectreactor:reactor-core")
889
		optional(project(":spring-context"))
890
		optional(project(":spring-context-support"))  // for FreeMarker support
891 892
		optional("javax.servlet:javax.servlet-api:3.1.0")
		optional("javax.websocket:javax.websocket-api:1.1")
893
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
894
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jackson2Version}")
895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914
		optional("org.freemarker:freemarker:${freemarkerVersion}")
		optional("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
		optional('org.webjars:webjars-locator:0.32-1')
		optional("io.projectreactor.ipc:reactor-netty")
		optional("io.reactivex:rxjava:${rxjavaVersion}")
		optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
		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.eclipse.jetty.websocket:websocket-server:${jettyVersion}") {
			exclude group: "javax.servlet", module: "javax.servlet"
		}
		optional("io.undertow:undertow-websockets-jsr:${undertowVersion}") {
			exclude group: "org.jboss.spec.javax.websocket", module: "jboss-websocket-api_1.1_spec"
		}
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
		optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
915
		testCompile("javax.xml.bind:jaxb-api:${jaxbVersion}")
916
		testCompile("io.projectreactor:reactor-test")
917
		testCompile("org.hibernate:hibernate-validator:6.0.1.Final")
918 919 920 921 922 923
		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}")
		testCompile "io.reactivex.rxjava2:rxjava:${rxjava2Version}"
		testCompile("io.undertow:undertow-core:${undertowVersion}")
924
		testCompile("io.reactivex:rxnetty-http:0.5.2") {
925 926 927 928 929 930 931
			exclude group: 'io.reactivex', module: 'rxjava'
		}
		testCompile("com.fasterxml:aalto-xml:1.0.0")
		testCompile("com.squareup.okhttp3:mockwebserver:${okhttp3Version}")
		testCompile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
		testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
		testRuntime("org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}")
932
		testRuntime("org.jruby:jruby:9.1.12.0")
933
		testRuntime("org.python:jython-standalone:2.7.1")
934
		testRuntime("org.synchronoss.cloud:nio-multipart-parser:1.1.0")
935 936 937 938
		testRuntime("org.webjars:underscorejs:1.8.3")
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
939
		testRuntime("javax.activation:activation:${activationVersion}")
940 941 942
	}
}

P
Phillip Webb 已提交
943 944
project("spring-test") {
	description = "Spring TestContext Framework"
945

946
	dependencies {
947
		compile(project(":spring-core"))
948
		optional(project(":spring-aop"))
949 950 951 952
		optional(project(":spring-beans"))
		optional(project(":spring-context"))
		optional(project(":spring-jdbc"))
		optional(project(":spring-orm"))
953
		optional(project(":spring-tx"))
954
		optional(project(":spring-web"))
955
		optional(project(":spring-webflux"))
J
Juergen Hoeller 已提交
956
		optional(project(":spring-webmvc"))
957
		optional(project(":spring-websocket"))
958
		optional("junit:junit:4.12")
959
		optional("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
960
		optional("org.testng:testng:6.11")
961
		optional("javax.inject:javax.inject:1")
962 963
		optional("javax.servlet:javax.servlet-api:4.0.0")
		optional("javax.servlet.jsp:javax.servlet.jsp-api:2.3.2-b02")
964
		optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1")
965
		optional("org.apache.taglibs:taglibs-standard-jstlel:1.2.5") {
966 967
			exclude group: "org.apache.taglibs", module: "taglibs-standard-spec"
		}
968 969 970
		optional("javax.el:javax.el-api:3.0.1-b04")
		optional("javax.websocket:javax.websocket-api:1.1")
		optional("javax.activation:activation:${activationVersion}")
971
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
972
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
S
Sam Brannen 已提交
973
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
974
		optional("org.hamcrest:hamcrest-core:1.3")
975
		optional("net.sourceforge.htmlunit:htmlunit:2.27") {
976 977
			exclude group: "commons-logging", module: "commons-logging"
		}
978
		optional("org.seleniumhq.selenium:htmlunit-driver:2.27")
979
		optional("org.seleniumhq.selenium:selenium-java:3.4.0") {
980 981
			exclude group: "io.netty", module: "netty"
		}
982 983
		optional("org.xmlunit:xmlunit-matchers:2.3.0")
		optional("org.skyscreamer:jsonassert:1.5.0")
984
		optional("com.jayway.jsonpath:json-path:2.4.0")
985
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
986
		optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
987
		optional("io.projectreactor:reactor-test")
988 989
		testCompile(project(":spring-context-support"))
		testCompile(project(":spring-oxm"))
990
		testCompile("javax.mail:javax.mail-api:${javamailVersion}")
991 992 993 994 995
		testCompile("javax.ejb:javax.ejb-api:3.2")
		testCompile("javax.interceptor:javax.interceptor-api:1.2")
		testCompile("javax.cache:cache-api:1.0.0")
		testCompile("org.hibernate:hibernate-core:5.2.10.Final")
		testCompile("org.hibernate:hibernate-validator:6.0.1.Final")
996 997
		// Enable use of the JUnitPlatform Runner
		testCompile("org.junit.platform:junit-platform-runner:${junitPlatformVersion}")
998
		testCompile("org.junit.jupiter:junit-jupiter-params:${junitJupiterVersion}")
999
		testCompile("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
1000 1001
		testCompile("com.thoughtworks.xstream:xstream:1.4.10")
		testCompile("com.rometools:rome:1.7.4")
1002 1003
		testCompile("org.apache.tiles:tiles-api:${tiles3Version}")
		testCompile("org.apache.tiles:tiles-core:${tiles3Version}") {
1004 1005
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
1006
		testCompile("org.apache.tiles:tiles-servlet:${tiles3Version}") {
1007 1008
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
1009
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
1010 1011 1012
		testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
1013
		testCompile('io.projectreactor.ipc:reactor-netty')
1014 1015
		// 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.
1016
		testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
1017
		testRuntime("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}")
1018
		testRuntime("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}")
1019
		testCompile('de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1')
1020
		testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}")  // Java Util Logging for JUnit 5
1021
		testRuntime("javax.annotation:javax.annotation-api:1.3")
1022
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
1023 1024
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
1025
	}
1026 1027

	task testNG(type: Test) {
1028
		description = 'Runs TestNG tests.'
1029
		useTestNG()
1030
		scanForTestClasses = false
1031 1032
		include(["**/testng/**/*Tests.class", "**/testng/**/*Test.class"])
		// Show STD_OUT & STD_ERR of the test JVM(s) on the console:
1033
		// testLogging.showStandardStreams = true
1034
		// forkEvery 1
1035
		reports.junitXml.destination = file("$buildDir/test-results")
1036 1037 1038
	}

	test {
1039
		description = 'Runs JUnit tests.'
1040 1041
		dependsOn testNG
		useJUnit()
1042 1043 1044
		scanForTestClasses = false
		include(['**/*Tests.class', '**/*Test.class', '**/SpringJUnitJupiterTestSuite.class'])
		exclude(['**/testng/**/*.*'])
1045 1046
		// Java Util Logging for JUnit 5.
		// systemProperty('java.util.logging.manager', 'org.apache.logging.log4j.jul.LogManager')
1047
		reports.junitXml.destination = file("$buildDir/test-results")
1048
	}
1049 1050

	task aggregateTestReports(type: TestReport) {
1051
		description = 'Aggregates JUnit and TestNG test reports.'
1052 1053 1054 1055 1056
		destinationDir = test.reports.html.destination
		reportOn test, testNG
	}

	check.dependsOn aggregateTestReports
C
Chris Beams 已提交
1057 1058
}

P
Phillip Webb 已提交
1059 1060 1061
project("spring-aspects") {
	description = "Spring Aspects"
	apply from: "aspects.gradle"
1062

1063
	dependencies {
1064
		aspects(project(":spring-orm"))
1065 1066 1067
		ajc("org.aspectj:aspectjtools:${aspectjVersion}")
		rt("org.aspectj:aspectjrt:${aspectjVersion}")
		compile("org.aspectj:aspectjweaver:${aspectjVersion}")
1068 1069 1070 1071 1072 1073
		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
1074 1075
		optional("javax.cache:cache-api:1.0.0") // for JCache aspect
		optional("javax.transaction:javax.transaction-api:1.2")  // for @javax.transaction.Transactional support
1076
		testCompile(project(":spring-core"))  // for CodeStyleAspect
1077
		testCompile(project(":spring-test"))
1078
		testCompile("javax.mail:javax.mail-api:${javamailVersion}")
1079
	}
1080

1081
	eclipse.project {
P
Phillip Webb 已提交
1082
		natures += "org.eclipse.ajdt.ui.ajnature"
1083
		buildCommands = [new org.gradle.plugins.ide.eclipse.model.BuildCommand("org.eclipse.ajdt.core.ajbuilder")]
1084
	}
C
Chris Beams 已提交
1085 1086
}

1087 1088
project("spring-framework-bom") {
	description = "Spring Framework (Bill of Materials)"
1089

1090 1091 1092 1093 1094
	dependencyManagement {
		generatedPomCustomization {
			enabled = false
		}
	}
1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127

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

1128 1129
sonarqube {
	properties {
S
Stephane Nicoll 已提交
1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141
		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"
	}
}

1142
configure(rootProject) {
P
Phillip Webb 已提交
1143
	description = "Spring Framework"
1144

1145
	apply plugin: "groovy"
R
Rob Winch 已提交
1146
	apply plugin: "io.spring.dependency-management"
1147
	// apply plugin: "detect-split-packages"
1148
	apply from: "${gradleScriptDir}/jdiff.gradle"
1149
	apply from: "${gradleScriptDir}/docs.gradle"
1150

R
Rob Winch 已提交
1151 1152 1153 1154 1155 1156 1157 1158 1159 1160
	dependencyManagement {
		imports {
			mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
		}
		resolutionStrategy {
			cacheChangingModulesFor 0, 'seconds'
		}
		applyMavenExclusions = false
	}

1161 1162 1163 1164 1165
	// 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")
	// }
1166

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

1170
	dependencies {  // for integration tests
1171
		testCompile(project(":spring-aop"))
1172
		testCompile(project(":spring-beans"))
1173
		testCompile(project(":spring-context"))
1174 1175
		testCompile(project(":spring-core"))
		testCompile(project(":spring-expression"))
1176
		testCompile(project(":spring-jdbc"))
1177
		testCompile(project(":spring-orm"))
1178
		testCompile(project(":spring-test"))
1179
		testCompile(project(":spring-tx"))
1180
		testCompile(project(":spring-web"))
1181
		testCompile("javax.inject:javax.inject:1")
1182 1183
		testCompile("javax.resource:javax.resource-api:1.7")
		testCompile("javax.servlet:javax.servlet-api:3.1.0")
1184
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
P
Phillip Webb 已提交
1185
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
1186
		testCompile("org.hibernate:hibernate-core:5.1.10.Final")
1187 1188 1189 1190 1191 1192 1193 1194 1195
	}

	artifacts {
		archives docsZip
		archives schemaZip
		archives distZip
	}

	task wrapper(type: Wrapper) {
P
Phillip Webb 已提交
1196
		description = "Generates gradlew[.bat] scripts"
1197
		gradleVersion = '4.1'
1198 1199

		doLast() {
1200
			def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
1201
			def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=256m"
P
Phillip Webb 已提交
1202
			File wrapperFile = file("gradlew")
1203 1204
			wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
				"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
P
Phillip Webb 已提交
1205
			File wrapperBatFile = file("gradlew.bat")
1206 1207 1208 1209
			wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=",
				"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
		}
	}
1210

1211
}
1212

S
Stephane Nicoll 已提交
1213
configure([project(':spring-build-src'), project(':spring-framework-bom')]) {
1214
	sonarqube {
S
Stephane Nicoll 已提交
1215 1216 1217 1218 1219
		skipProject = true
	}
}

configure(project(':spring-core')) {
1220 1221
	sonarqube {
		properties {
S
Stephane Nicoll 已提交
1222 1223 1224 1225 1226 1227
			property "sonar.exclusions",
					"src/main/java/org/springframework/cglib/**/*,src/main/java/org/springframework/asm/**/*"
		}
	}
}

1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238
/*
 * 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-")) {
1239
			return version.replace('BUILD', qualifier)
1240 1241
		}
	}
1242
	return version
1243
}