build.gradle 50.7 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
	ext.activationApiVersion   = "1.1.1"
39
	ext.annotationApiVersion   = "1.3"
J
Juergen Hoeller 已提交
40
	ext.aspectjVersion         = "1.9.0.BETA-6"
41
	ext.beanvalVersion         = "2.0.0.Final"
42
	ext.cacheApiVersion        = "1.0.0"
43 44
	ext.caffeineVersion        = "2.5.5"
	ext.eclipselinkVersion     = "2.7.0-RC3"
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"
J
Juergen Hoeller 已提交
50
	ext.fileuploadVersion      = "1.3.3"
51
	ext.freemarkerVersion      = "2.3.26-incubating"
J
Juergen Hoeller 已提交
52
	ext.groovyVersion          = "2.5.0-beta-1"
53
	ext.gsonVersion            = "2.8.1"
54
	ext.hamcrestVersion        = "1.3"
55
	ext.hibernate5Version      = "5.2.10.Final"
56
	ext.hibvalVersion          = "6.0.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"
E
Eddú Meléndez 已提交
61
	ext.jackson2Version        = "2.9.0"
62
	ext.javamailVersion        = "1.6.0"
63
	ext.jaxbVersion            = "2.2.11"
64
	ext.jaxwsVersion           = "2.2.11"
65
	ext.jcaVersion             = "1.7"
66
	ext.jettyVersion           = "9.4.6.v20170531"
67
	ext.jmsVersion             = "2.0.1"
68
	ext.jodaVersion            = "2.9.9"
69
	ext.jpaVersion             = "2.2.0-RC3"
70
	ext.jsfVersion             = "2.2"
71
	ext.jsonassertVersion      = "1.5.0"
72 73 74
	ext.jspVersion             = "2.3.2-b02"
	ext.jtaVersion             = "1.2"
	ext.junitVersion           = "4.12"
J
Juergen Hoeller 已提交
75 76 77
	ext.junitVintageVersion    = "4.12.0-RC2"
	ext.junitJupiterVersion    = '5.0.0-RC2'
	ext.junitPlatformVersion   = '1.0.0-RC2'
78
	ext.log4jVersion           = '2.8.2'
79
	ext.nettyVersion           = "4.1.14.Final"
80
	ext.niomultipartVersion    = "1.1.0"
J
Juergen Hoeller 已提交
81
	ext.okhttp3Version         = "3.8.1"
82
	ext.poiVersion             = "3.16"
83
	ext.protobufVersion        = "3.4.0"
84
	ext.quartzVersion          = "2.3.0"
S
Stephane Maldini 已提交
85
	ext.reactorVersion         = "Bismuth-BUILD-SNAPSHOT"
86
	ext.romeVersion            = "1.7.4"
J
Juergen Hoeller 已提交
87
	ext.rxjavaVersion          = '1.3.0'
88
	ext.rxjavaAdapterVersion   = '1.2.1'
89
	ext.rxjava2Version         = '2.1.3'
90
	ext.rxnettyVersion         = '0.5.2'
91
	ext.servletVersion         = "3.1.0"
92
	ext.slf4jVersion           = "1.7.25"
93
	ext.snakeyamlVersion       = "1.18"
94
	ext.testngVersion          = "6.11"
J
Juergen Hoeller 已提交
95
	ext.tiles3Version          = "3.0.7"
96
	ext.tomcatVersion          = "8.5.20"
97
	ext.tyrusVersion           = "1.13.1"
98
	ext.undertowVersion        = "1.4.18.Final"
99
	ext.websocketVersion       = "1.1"
100
	ext.woodstoxVersion        = "5.0.3"
101
	ext.xmlunitVersion         = "2.3.0"
J
Juergen Hoeller 已提交
102
	ext.xstreamVersion         = "1.4.10"
103

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

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

S
Sebastien Deleuze 已提交
112 113 114
	apply plugin: "kotlin"
	compileKotlin {
		kotlinOptions.jvmTarget = "1.8"
115
		kotlinOptions.freeCompilerArgs = ["-Xskip-runtime-version-check", "-Xjsr305-annotations=enable"]
116

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

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

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

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

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

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

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

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

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

181
	dependencies {
182
		provided("com.google.code.findbugs:jsr305:3.0.2")
183 184 185
		testCompile("junit:junit:${junitVersion}") {
			exclude group:'org.hamcrest', module:'hamcrest-core'
		}
186
		testCompile("org.mockito:mockito-core:2.6.1") {
187 188
			exclude group:'org.hamcrest', module:'hamcrest-core'
		}
S
Sebastien Deleuze 已提交
189 190 191 192 193
		testCompile("com.nhaarman:mockito-kotlin:1.5.0") {
			exclude module:'kotlin-stdlib'
			exclude module:'kotlin-reflect'
			exclude module:'mockito-core'
		}
194
		testCompile("org.hamcrest:hamcrest-all:${hamcrestVersion}")
195
		testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
196
	}
C
Chris Beams 已提交
197 198

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

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

	dependencyManagement {
		imports {
			mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
227
			mavenBom "io.netty:netty-bom:${nettyVersion}"
228 229 230 231 232 233
		}
		resolutionStrategy {
			cacheChangingModulesFor 0, 'seconds'
		}
		applyMavenExclusions = false
	}
234

S
Stephane Nicoll 已提交
235 236 237 238
	configurations {
		jacoco
	}
	dependencies {
239
		jacoco("org.jacoco:org.jacoco.agent:0.7.5.201505241946:runtime")
S
Stephane Nicoll 已提交
240 241 242
	}

	gradle.taskGraph.whenReady {taskGraph ->
243
		if (taskGraph.hasTask(':sonarqube')) {
S
Stephane Nicoll 已提交
244 245 246 247
			test.jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.*"
		}
	}

248
	jar {
P
Phillip Webb 已提交
249 250 251 252
		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
253 254 255 256 257

		from("${rootProject.projectDir}/src/dist") {
			include "license.txt"
			include "notice.txt"
			into "META-INF"
P
Phillip Webb 已提交
258
			expand(copyright: new Date().format("yyyy"), version: project.version)
259 260 261 262
		}
	}

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

265 266 267
		options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
		options.author = true
		options.header = project.name
268
		options.use = true
C
Chris Beams 已提交
269
		options.links(project.ext.javadocLinks)
270
		options.addStringOption('Xdoclint:none', '-quiet')
C
Chris Beams 已提交
271

272 273
		// Suppress warnings due to cross-module @see and @link references.
		// Note that global 'api' task does display all warnings.
C
Chris Beams 已提交
274
		logging.captureStandardError LogLevel.INFO
275
		logging.captureStandardOutput LogLevel.INFO  // suppress "## warnings" message
276 277
	}

278
	task sourcesJar(type: Jar, dependsOn: classes) {
279
		duplicatesStrategy = DuplicatesStrategy.EXCLUDE
280
		classifier = 'sources'
281
		from sourceSets.main.allSource
282
		// Don't include or exclude anything explicitly by default. See SPR-12085.
283 284 285
	}

	task javadocJar(type: Jar) {
P
Phillip Webb 已提交
286
		classifier = "javadoc"
287 288 289 290 291 292 293
		from javadoc
	}

	artifacts {
		archives sourcesJar
		archives javadocJar
	}
C
Chris Beams 已提交
294 295
}

296 297
project("spring-build-src") {
	description = "Exposes gradle buildSrc for IDE support"
298

299
	apply plugin: "groovy"
300 301 302

	dependencies {
		compile gradleApi()
R
Rob Winch 已提交
303
		compile localGroovy()
304 305 306 307 308
	}

	configurations.archives.artifacts.clear()
}

309 310 311 312 313 314 315 316 317
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 已提交
318 319
project("spring-core") {
	description = "Spring Core"
320

321 322
	// 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
323
	// further transformed by the JarJar task to depend on org.springframework.asm; this
324
	// avoids including two different copies of asm unnecessarily.
J
Juergen Hoeller 已提交
325
	def cglibVersion = "3.2.5"
326
	def objenesisVersion = "2.6"
327 328 329 330

	configurations {
		jarjar
		cglib
331
		objenesis
332 333 334 335 336 337 338 339 340 341 342 343 344 345
	}

	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 已提交
346
					// Repackage net.sf.cglib => org.springframework.cglib
P
Phillip Webb 已提交
347
					rule(pattern: "net.sf.cglib.**", result: "org.springframework.cglib.@1")
J
Juergen Hoeller 已提交
348
					// As mentioned above, transform cglib"s internal asm dependencies from
349 350
					// 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 已提交
351
					rule(pattern: "org.objectweb.asm.**", result: "org.springframework.asm.@1")
352 353 354 355 356
				}
			}
		}
	}

357 358 359 360 361 362 363 364 365 366 367 368
	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 已提交
369
					// Repackage org.objenesis => org.springframework.objenesis
370 371 372 373 374 375
					rule(pattern: "org.objenesis.**", result: "org.springframework.objenesis.@1")
				}
			}
		}
	}

376
	dependencies {
377
		cglib("cglib:cglib:${cglibVersion}@jar")
378
		objenesis("org.objenesis:objenesis:${objenesisVersion}@jar")
379
		jarjar("com.googlecode.jarjar:jarjar:1.3")
380

P
Phillip Webb 已提交
381
		compile(files(cglibRepackJar))
382
		compile(files(objenesisRepackJar))
383
		compile(project(":spring-jcl"))
384
		optional("net.sf.jopt-simple:jopt-simple:5.0.3")
385
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
386
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
S
Sebastien Deleuze 已提交
387
		optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
388 389
		optional("org.reactivestreams:reactive-streams")
		optional("io.projectreactor:reactor-core")
390 391 392
		optional("io.reactivex:rxjava:${rxjavaVersion}")
		optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
		optional("io.reactivex.rxjava2:rxjava:${rxjava2Version}")
393
		optional("io.netty:netty-buffer")
R
Rob Winch 已提交
394
		testCompile("io.projectreactor:reactor-test")
395
		testCompile("javax.xml.bind:jaxb-api:${jaxbVersion}")
396
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
397
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
398
		testCompile("com.fasterxml.woodstox:woodstox-core:${woodstoxVersion}") {
P
Phillip Webb 已提交
399 400
			exclude group: "stax", module: "stax-api"
		}
401 402 403
	}

	jar {
J
Juergen Hoeller 已提交
404
		// Inline repackaged cglib classes directly into spring-core jar
405 406
		dependsOn cglibRepackJar
		from(zipTree(cglibRepackJar.archivePath)) {
P
Phillip Webb 已提交
407
			include "org/springframework/cglib/**"
408
		}
409 410 411 412 413

		dependsOn objenesisRepackJar
		from(zipTree(objenesisRepackJar.archivePath)) {
			include "org/springframework/objenesis/**"
		}
414
	}
C
Chris Beams 已提交
415 416
}

P
Phillip Webb 已提交
417 418
project("spring-beans") {
	description = "Spring Beans"
419

420
	dependencies {
421 422
		compile(project(":spring-core"))
		compile(files(project(":spring-core").cglibRepackJar))
423
		optional("javax.inject:javax.inject:1")
424
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
S
Sebastien Deleuze 已提交
425
		optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
426
		optional("org.yaml:snakeyaml:${snakeyamlVersion}")
427
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
J
Juergen Hoeller 已提交
428
	}
C
Chris Beams 已提交
429 430
}

431 432
project("spring-beans-groovy") {
	description "Groovy Bean Definitions"
433

J
Juergen Hoeller 已提交
434
	merge.into = project(":spring-beans")
435
	apply plugin: "groovy"
J
Juergen Hoeller 已提交
436 437 438

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

J
Juergen Hoeller 已提交
442
	// This module's Java and Groovy sources need to be compiled together.
443
	compileJava.enabled = false
J
Juergen Hoeller 已提交
444 445 446
	sourceSets {
		main {
			groovy {
447
				srcDir "src/main/java"
J
Juergen Hoeller 已提交
448 449 450
			}
		}
	}
451 452

	compileGroovy {
453 454
		sourceCompatibility = 1.8
		targetCompatibility = 1.8
455
	}
J
Juergen Hoeller 已提交
456 457
}

P
Phillip Webb 已提交
458 459
project("spring-aop") {
	description = "Spring AOP"
460

461
	dependencies {
462
		compile(project(":spring-beans"))
463 464
		compile(project(":spring-core"))
		compile(files(project(":spring-core").cglibRepackJar))
465
		compile(files(project(":spring-core").objenesisRepackJar))
466
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
467
		optional("org.apache.commons:commons-pool2:2.4.2")
468
		optional("com.jamonapi:jamon:2.81")
469
	}
C
Chris Beams 已提交
470 471
}

P
Phillip Webb 已提交
472 473
project("spring-expression") {
	description = "Spring Expression Language (SpEL)"
474

475
	dependencies {
476
		compile(project(":spring-core"))
477
	}
C
Chris Beams 已提交
478 479
}

P
Phillip Webb 已提交
480 481
project("spring-instrument") {
	description = "Spring Instrument"
482

483
	jar {
P
Phillip Webb 已提交
484 485
		manifest.attributes["Premain-Class"] =
			"org.springframework.instrument.InstrumentationSavingAgent"
486 487
		manifest.attributes["Agent-Class"] =
			"org.springframework.instrument.InstrumentationSavingAgent"
488 489 490
		manifest.attributes["Can-Redefine-Classes"] = "true"
		manifest.attributes["Can-Retransform-Classes"] = "true"
		manifest.attributes["Can-Set-Native-Method-Prefix"] = "false"
491
	}
C
Chris Beams 已提交
492 493
}

P
Phillip Webb 已提交
494 495
project("spring-context") {
	description = "Spring Context"
496

497
	apply plugin: "groovy"
498

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

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

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

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

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

P
Phillip Webb 已提交
605 606
project("spring-tx") {
	description = "Spring Transaction"
607

608
	dependencies {
609 610
		compile(project(":spring-beans"))
		compile(project(":spring-core"))
611
		optional(project(":spring-aop"))
612
		optional(project(":spring-context"))  // for JCA, @EnableTransactionManagement
613
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")
J
Juergen Hoeller 已提交
614
		optional("javax.resource:javax.resource-api:${jcaVersion}")
615
		optional("javax.ejb:javax.ejb-api:${ejbApiVersion}")
S
Stephane Nicoll 已提交
616
		optional("javax.interceptor:javax.interceptor-api:${interceptorApiVersion}")
617
		optional("com.ibm.websphere:uow:6.0.2.17")
618
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
J
Juergen Hoeller 已提交
619
		testCompile("org.eclipse.persistence:javax.persistence:${jpaVersion}")
620
		testCompile("org.codehaus.groovy:groovy-all:${groovyVersion}")
621
	}
C
Chris Beams 已提交
622 623
}

P
Phillip Webb 已提交
624 625
project("spring-jms") {
	description = "Spring JMS"
626

627
	dependencies {
628
		compile(project(":spring-beans"))
629
		compile(project(":spring-core"))
630
		compile(project(":spring-messaging"))
631
		compile(project(":spring-tx"))
632
		provided("javax.jms:javax.jms-api:${jmsVersion}")
633 634
		optional(project(":spring-aop"))
		optional(project(":spring-context"))
635
		optional(project(":spring-oxm"))
636
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")
J
Juergen Hoeller 已提交
637
		optional("javax.resource:javax.resource-api:${jcaVersion}")
638
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
639
	}
C
Chris Beams 已提交
640 641
}

P
Phillip Webb 已提交
642 643
project("spring-jdbc") {
	description = "Spring JDBC"
644

645
	dependencies {
646
		compile(project(":spring-beans"))
647
		compile(project(":spring-core"))
648
		compile(project(":spring-tx"))
649
		optional(project(":spring-context"))  // for JndiDataSourceLookup
650
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")
P
Phillip Webb 已提交
651
		optional("org.hsqldb:hsqldb:${hsqldbVersion}")
652
		optional("com.h2database:h2:1.4.196")
653 654
		optional("org.apache.derby:derby:10.13.1.1")
		optional("org.apache.derby:derbyclient:10.13.1.1")
M
Mario Arias 已提交
655
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
S
Sebastien Deleuze 已提交
656
		optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
657
	}
C
Chris Beams 已提交
658 659
}

660 661 662 663 664 665 666 667 668 669 670
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 已提交
671 672
project("spring-context-support") {
	description = "Spring Context Support"
673

674
	dependencies {
675 676
		compile(project(":spring-beans"))
		compile(project(":spring-context"))
677
		compile(project(":spring-core"))
678 679
		optional(project(":spring-jdbc"))  // for Quartz support
		optional(project(":spring-tx"))  // for Quartz support
680
		optional("javax.activation:activation:${activationApiVersion}")
681
		optional("javax.mail:javax.mail-api:${javamailVersion}")
682
		optional("javax.cache:cache-api:${cacheApiVersion}")
B
Ben Manes 已提交
683
		optional("com.github.ben-manes.caffeine:caffeine:${caffeineVersion}")
684
		optional("net.sf.ehcache:ehcache:${ehcacheVersion}")
685
		optional("org.quartz-scheduler:quartz:${quartzVersion}")
686
		optional("org.codehaus.fabric3.api:commonj:1.1.0")
687
		optional("org.freemarker:freemarker:${freemarkerVersion}")
688
		optional("com.lowagie:itext:2.1.7")
689
		testCompile(project(":spring-context"))
690
		testCompile("org.apache.poi:poi:${poiVersion}")
P
Phillip Webb 已提交
691
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
692
		testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
693 694 695 696 697
		testCompile("javax.validation:validation-api:${beanvalVersion}")
		testCompile("org.hibernate:hibernate-validator:${hibvalVersion}")
		testRuntime("javax.el:javax.el-api:${elApiVersion}")
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
		testRuntime("javax.annotation:javax.annotation-api:${annotationApiVersion}")
698
		testRuntime("com.sun.mail:javax.mail:${javamailVersion}")
699
		testRuntime("org.ehcache:jcache:${ehcachejcacheVersion}")
700
	}
C
Chris Beams 已提交
701 702
}

P
Phillip Webb 已提交
703 704
project("spring-web") {
	description = "Spring Web"
S
Sebastien Deleuze 已提交
705

706
	apply plugin: "groovy"
707

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

P
Phillip Webb 已提交
791 792
project("spring-orm") {
	description = "Spring Object/Relational Mapping"
793

794
	dependencies {
795 796 797 798 799 800 801
		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 已提交
802
		optional("org.eclipse.persistence:javax.persistence:${jpaVersion}")
803 804
		optional("org.eclipse.persistence:org.eclipse.persistence.core:${eclipselinkVersion}")
		optional("org.eclipse.persistence:org.eclipse.persistence.jpa:${eclipselinkVersion}") {
805 806
			exclude group: 'org.eclipse.persistence', module: 'javax.persistence'
		}
807
		optional("org.hibernate:hibernate-core:${hibernate5Version}")
808
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
S
Sam Brannen 已提交
809
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
P
Phillip Webb 已提交
810
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
811
		testRuntime("javax.xml.bind:jaxb-api:${jaxbVersion}")
812
	}
C
Chris Beams 已提交
813 814
}

P
Phillip Webb 已提交
815 816
project("spring-webmvc") {
	description = "Spring Web MVC"
817

818
	dependencies {
819
		compile(project(":spring-aop"))
820 821
		compile(project(":spring-beans"))
		compile(project(":spring-context"))
822
		compile(project(":spring-core"))
823
		compile(files(project(":spring-core").objenesisRepackJar))
824 825
		compile(project(":spring-expression"))
		compile(project(":spring-web"))
826
		provided("javax.servlet:javax.servlet-api:${servletVersion}")
827
		optional(project(":spring-context-support"))  // for FreeMarker support
828
		optional(project(":spring-oxm"))
829
		optional("javax.servlet.jsp:javax.servlet.jsp-api:${jspVersion}")
830
		optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1")
831
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
832 833
		optional("org.apache.poi:poi:${poiVersion}")
		optional("org.apache.poi:poi-ooxml:${poiVersion}")
834
		optional("org.freemarker:freemarker:${freemarkerVersion}")
835
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
836 837
		optional("com.lowagie:itext:2.1.7")
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
838
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jackson2Version}")
839 840
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jackson2Version}")
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jackson2Version}")
841
		optional("com.rometools:rome:${romeVersion}")
842
		optional("javax.el:javax.el-api:${elApiVersion}")
843 844
		optional("org.apache.tiles:tiles-api:${tiles3Version}")
		optional("org.apache.tiles:tiles-core:${tiles3Version}") {
845 846
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
847
		optional("org.apache.tiles:tiles-servlet:${tiles3Version}") {
848 849
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
850
		optional("org.apache.tiles:tiles-jsp:${tiles3Version}") {
851 852
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
853
		optional("org.apache.tiles:tiles-el:${tiles3Version}") {
854 855
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
856
		optional("org.apache.tiles:tiles-extras:${tiles3Version}") {
857 858 859
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
			exclude group: "org.springframework", module: "spring-web"
		}
860
		optional('org.webjars:webjars-locator:0.32-1')
861
		optional("org.reactivestreams:reactive-streams")
862 863
		optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
		optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
864
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
865
		testCompile("dom4j:dom4j:1.6.1") {
P
Phillip Webb 已提交
866
			exclude group: "xml-apis", module: "xml-apis"
867 868
		}
		testCompile("jaxen:jaxen:1.1.1") {
P
Phillip Webb 已提交
869 870 871
			exclude group: "xml-apis", module: "xml-apis"
			exclude group: "xom", module: "xom"
			exclude group: "xerces", module: "xercesImpl"
872
		}
B
Brian Clozel 已提交
873
		testCompile("org.eclipse.jetty:jetty-servlet:${jettyVersion}") {
B
Brian Clozel 已提交
874
			exclude group: "javax.servlet", module: "javax.servlet"
875
		}
B
Brian Clozel 已提交
876
		testCompile("org.eclipse.jetty:jetty-server:${jettyVersion}") {
B
Brian Clozel 已提交
877
			exclude group: "javax.servlet", module: "javax.servlet"
878
		}
J
Juergen Hoeller 已提交
879
		testCompile("javax.validation:validation-api:${beanvalVersion}")
880
		testCompile("org.hibernate:hibernate-validator:${hibvalVersion}")
881 882 883
		testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}") {
			exclude group: "commons-logging", module: "commons-logging"
		}
884
		testCompile("commons-fileupload:commons-fileupload:${fileuploadVersion}")
885
		testCompile("commons-io:commons-io:2.5")
886
		testCompile("joda-time:joda-time:${jodaVersion}")
887
		testCompile("org.mozilla:rhino:1.7.7.1")
888 889 890 891
		testCompile("io.projectreactor:reactor-core")
		testCompile("io.reactivex:rxjava:${rxjavaVersion}")
		testCompile("io.reactivex.rxjava2:rxjava:${rxjava2Version}")
		testCompile("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
892
		testCompile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
893
		testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
894
		testRuntime("org.jetbrains.kotlin:kotlin-compiler:${kotlinVersion}")
895
		testRuntime("org.jruby:jruby:9.1.12.0")
896
		testRuntime("org.python:jython-standalone:2.7.1")
897
		testRuntime("org.webjars:underscorejs:1.8.3")
898
		testRuntime("org.glassfish:javax.el:3.0.1-b08")
899 900
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
901
		testRuntime("javax.activation:activation:${activationApiVersion}")
902 903 904
	}
}

905 906 907 908 909
project("spring-websocket") {
	description = "Spring WebSocket"

	dependencies {
		compile(project(":spring-context"))
910
		compile(project(":spring-core"))
911 912 913
		compile(project(":spring-web"))
		optional(project(":spring-messaging"))
		optional(project(":spring-webmvc"))
914 915
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
		optional("javax.websocket:javax.websocket-api:${websocketVersion}")
916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942
		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}")
943 944
		testCompile("io.projectreactor:reactor-core")
		testCompile("io.projectreactor.ipc:reactor-netty")
945
		testCompile("io.netty:netty-all")
946 947 948
	}
}

949 950 951 952
project("spring-webflux") {
	description = "Spring WebFlux"

	dependencies {
953
		compile(project(":spring-beans"))
954 955 956 957
		compile(project(":spring-core"))
		compile(project(":spring-web"))
		compile("org.reactivestreams:reactive-streams")
		compile("io.projectreactor:reactor-core")
958
		optional(project(":spring-context"))
959
		optional(project(":spring-context-support"))  // for FreeMarker support
960
		optional "javax.servlet:javax.servlet-api:${servletVersion}"
961 962
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
963
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jackson2Version}")
964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002
		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("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"
		}
		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}")
		testCompile("io.projectreactor:reactor-test")
		testCompile("javax.validation:validation-api:${beanvalVersion}")
		testCompile("org.hibernate:hibernate-validator:${hibvalVersion}")
		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}")
		testCompile("io.reactivex:rxnetty-http:${rxnettyVersion}") {
			exclude group: 'io.reactivex', module: 'rxjava'
		}
		testCompile("com.fasterxml:aalto-xml:1.0.0")
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
		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}")
1003
		testRuntime("org.jruby:jruby:9.1.12.0")
1004
		testRuntime("org.python:jython-standalone:2.7.1")
1005 1006 1007 1008 1009 1010 1011 1012 1013
		testRuntime("org.synchronoss.cloud:nio-multipart-parser:${niomultipartVersion}")
		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}")
		testRuntime("javax.activation:activation:${activationApiVersion}")
	}
}

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

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

	task testNG(type: Test) {
1104
		description = 'Runs TestNG tests.'
1105
		useTestNG()
1106
		scanForTestClasses = false
1107 1108
		include(["**/testng/**/*Tests.class", "**/testng/**/*Test.class"])
		// Show STD_OUT & STD_ERR of the test JVM(s) on the console:
1109
		// testLogging.showStandardStreams = true
1110
		// forkEvery 1
1111
		reports.junitXml.destination = file("$buildDir/test-results")
1112 1113 1114
	}

	test {
1115
		description = 'Runs JUnit tests.'
1116 1117
		dependsOn testNG
		useJUnit()
1118 1119 1120
		scanForTestClasses = false
		include(['**/*Tests.class', '**/*Test.class', '**/SpringJUnitJupiterTestSuite.class'])
		exclude(['**/testng/**/*.*'])
1121 1122
		// Java Util Logging for JUnit 5.
		// systemProperty('java.util.logging.manager', 'org.apache.logging.log4j.jul.LogManager')
1123
		reports.junitXml.destination = file("$buildDir/test-results")
1124
	}
1125 1126

	task aggregateTestReports(type: TestReport) {
1127
		description = 'Aggregates JUnit and TestNG test reports.'
1128 1129 1130 1131 1132
		destinationDir = test.reports.html.destination
		reportOn test, testNG
	}

	check.dependsOn aggregateTestReports
C
Chris Beams 已提交
1133 1134
}

P
Phillip Webb 已提交
1135 1136 1137
project("spring-aspects") {
	description = "Spring Aspects"
	apply from: "aspects.gradle"
1138

1139
	dependencies {
1140
		aspects(project(":spring-orm"))
1141 1142 1143
		ajc("org.aspectj:aspectjtools:${aspectjVersion}")
		rt("org.aspectj:aspectjrt:${aspectjVersion}")
		compile("org.aspectj:aspectjweaver:${aspectjVersion}")
1144 1145 1146 1147 1148 1149
		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
1150
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")  // for @javax.transaction.Transactional support
1151
		optional("javax.cache:cache-api:${cacheApiVersion}")
1152
		testCompile(project(":spring-core"))  // for CodeStyleAspect
1153
		testCompile(project(":spring-test"))
1154
		testCompile("javax.mail:javax.mail-api:${javamailVersion}")
1155
	}
1156

1157
	eclipse.project {
P
Phillip Webb 已提交
1158
		natures += "org.eclipse.ajdt.ui.ajnature"
1159
		buildCommands = [new org.gradle.plugins.ide.eclipse.model.BuildCommand("org.eclipse.ajdt.core.ajbuilder")]
1160
	}
C
Chris Beams 已提交
1161 1162
}

1163 1164
project("spring-framework-bom") {
	description = "Spring Framework (Bill of Materials)"
1165

1166 1167 1168 1169 1170
	dependencyManagement {
		generatedPomCustomization {
			enabled = false
		}
	}
1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203

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

1204 1205
sonarqube {
	properties {
S
Stephane Nicoll 已提交
1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217
		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"
	}
}

1218
configure(rootProject) {
P
Phillip Webb 已提交
1219
	description = "Spring Framework"
1220

1221
	apply plugin: "groovy"
R
Rob Winch 已提交
1222
	apply plugin: "io.spring.dependency-management"
1223
	// apply plugin: "detect-split-packages"
1224
	apply from: "${gradleScriptDir}/jdiff.gradle"
1225
	apply from: "${gradleScriptDir}/docs.gradle"
1226

R
Rob Winch 已提交
1227 1228 1229 1230 1231 1232 1233 1234 1235 1236
	dependencyManagement {
		imports {
			mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
		}
		resolutionStrategy {
			cacheChangingModulesFor 0, 'seconds'
		}
		applyMavenExclusions = false
	}

1237 1238 1239 1240 1241
	// 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")
	// }
1242

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

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

	artifacts {
		archives docsZip
		archives schemaZip
		archives distZip
	}

	task wrapper(type: Wrapper) {
P
Phillip Webb 已提交
1272
		description = "Generates gradlew[.bat] scripts"
1273
		gradleVersion = '4.1'
1274 1275

		doLast() {
1276
			def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
1277
			def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=256m"
P
Phillip Webb 已提交
1278
			File wrapperFile = file("gradlew")
1279 1280
			wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
				"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
P
Phillip Webb 已提交
1281
			File wrapperBatFile = file("gradlew.bat")
1282 1283 1284 1285
			wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=",
				"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
		}
	}
1286

1287
}
1288

S
Stephane Nicoll 已提交
1289
configure([project(':spring-build-src'), project(':spring-framework-bom')]) {
1290
	sonarqube {
S
Stephane Nicoll 已提交
1291 1292 1293 1294 1295
		skipProject = true
	}
}

configure(project(':spring-core')) {
1296 1297
	sonarqube {
		properties {
S
Stephane Nicoll 已提交
1298 1299 1300 1301 1302 1303
			property "sonar.exclusions",
					"src/main/java/org/springframework/cglib/**/*,src/main/java/org/springframework/asm/**/*"
		}
	}
}

1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314
/*
 * 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-")) {
1315
			return version.replace('BUILD', qualifier)
1316 1317
		}
	}
1318
	return version
1319
}