build.gradle 50.6 KB
Newer Older
1
buildscript {
2
	ext.kotlinVersion = '1.1.4-eap-33'
3
	repositories {
4
		maven { url "https://repo.spring.io/plugins-release" }
5
		maven { url "https://dl.bintray.com/kotlin/kotlin-eap-1.1" }
6 7
	}
	dependencies {
8
		classpath("io.spring.gradle:dependency-management-plugin:1.0.0.RELEASE")
R
Rob Winch 已提交
9
		classpath("io.spring.gradle:propdeps-plugin:0.0.8")
10
		classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
11
		classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
12 13 14
		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")
15
	}
16 17
}

18
plugins {
R
Rob Winch 已提交
19
	id "org.sonarqube" version "2.5"
20 21
}

S
Stephane Nicoll 已提交
22 23 24 25 26 27
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'
28
	linkScmDevConnection = 'scm:git:ssh://git@github.com:spring-projects/spring-framework.git'
29

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

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

39
	ext.activationApiVersion   = "1.1.1"
40
	ext.annotationApiVersion   = "1.3"
J
Juergen Hoeller 已提交
41
	ext.aspectjVersion         = "1.9.0.BETA-6"
42
	ext.beanvalVersion         = "1.1.0.Final"
43
	ext.cacheApiVersion        = "1.0.0"
44
	ext.caffeineVersion        = "2.5.3"
45
	ext.eclipselinkVersion     = "2.6.5-RC2"
46
	ext.ehcacheVersion         = "2.10.4"
47
	ext.ehcachejcacheVersion   = "1.0.1"
48
	ext.ehcache3Version        = "3.3.1"
49
	ext.ejbApiVersion          = "3.2"
J
Juergen Hoeller 已提交
50
	ext.elApiVersion           = "3.0.1-b04"
J
Juergen Hoeller 已提交
51
	ext.fileuploadVersion      = "1.3.3"
52
	ext.freemarkerVersion      = "2.3.26-incubating"
J
Juergen Hoeller 已提交
53
	ext.groovyVersion          = "2.5.0-beta-1"
54
	ext.gsonVersion            = "2.8.1"
55
	ext.hamcrestVersion        = "1.3"
56
	ext.hibernate5Version      = "5.2.10.Final"
57
	ext.hibvalVersion          = "5.4.1.Final"
58
	ext.hsqldbVersion          = "2.4.0"
59
	ext.httpasyncVersion       = "4.1.3"
60
	ext.httpclientVersion      = "4.5.3"
61
	ext.interceptorApiVersion  = "1.2"
S
Sebastien Deleuze 已提交
62
	ext.jackson2Version        = "2.9.0.pr4"
63
	ext.javamailVersion        = "1.6.0"
64
	ext.jaxbVersion            = "2.2.11"
65
	ext.jaxwsVersion           = "2.2.11"
66
	ext.jcaVersion             = "1.7"
67
	ext.jettyVersion           = "9.4.6.v20170531"
68
	ext.jmsVersion             = "2.0.1"
69
	ext.jodaVersion            = "2.9.9"
70
	ext.jpaVersion             = "2.1.1"
71
	ext.jsfVersion             = "2.2"
72
	ext.jsonassertVersion      = "1.5.0"
73 74 75
	ext.jspVersion             = "2.3.2-b02"
	ext.jtaVersion             = "1.2"
	ext.junitVersion           = "4.12"
S
Sam Brannen 已提交
76 77 78
	ext.junitVintageVersion    = "4.12.0-M6"
	ext.junitJupiterVersion    = '5.0.0-M6'
	ext.junitPlatformVersion   = '1.0.0-M6'
79
	ext.log4jVersion           = '2.8.2'
80
	ext.nettyVersion           = "4.1.13.Final"
81
	ext.niomultipartVersion    = "1.1.0"
J
Juergen Hoeller 已提交
82
	ext.okhttp3Version         = "3.8.1"
83
	ext.poiVersion             = "3.16"
84
	ext.protobufVersion        = "3.3.1"
85
	ext.quartzVersion          = "2.3.0"
86
	ext.reactorVersion         = "Bismuth-M3"
87
	ext.romeVersion            = "1.7.4"
J
Juergen Hoeller 已提交
88
	ext.rxjavaVersion          = '1.3.0'
89
	ext.rxjavaAdapterVersion   = '1.2.1'
90
	ext.rxjava2Version         = '2.1.2'
91
	ext.rxnettyVersion         = '0.5.2'
92
	ext.servletVersion         = "3.1.0"
93
	ext.slf4jVersion           = "1.7.25"
94
	ext.snakeyamlVersion       = "1.18"
95
	ext.testngVersion          = "6.11"
J
Juergen Hoeller 已提交
96
	ext.tiles3Version          = "3.0.7"
97
	ext.tomcatVersion          = "8.5.16"
98
	ext.tyrusVersion           = "1.13.1"
99
	ext.undertowVersion        = "1.4.18.Final"
100
	ext.websocketVersion       = "1.1"
101
	ext.woodstoxVersion        = "5.0.3"
102
	ext.xmlunitVersion         = "2.3.0"
J
Juergen Hoeller 已提交
103
	ext.xstreamVersion         = "1.4.10"
104

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	artifacts {
		archives sourcesJar
		archives javadocJar
	}
C
Chris Beams 已提交
296 297
}

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

301
	apply plugin: "groovy"
302 303 304

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

	configurations.archives.artifacts.clear()
}

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

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

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

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

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

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

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

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

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

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

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

433 434
project("spring-beans-groovy") {
	description "Groovy Bean Definitions"
435

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

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

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

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

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

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

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

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

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

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

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

499
	apply plugin: "groovy"
500

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

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

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

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

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

P
Phillip Webb 已提交
608 609
project("spring-tx") {
	description = "Spring Transaction"
610

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

P
Phillip Webb 已提交
627 628
project("spring-jms") {
	description = "Spring JMS"
629

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

P
Phillip Webb 已提交
645 646
project("spring-jdbc") {
	description = "Spring JDBC"
647

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

P
Phillip Webb 已提交
663 664
project("spring-context-support") {
	description = "Spring Context Support"
665

666
	dependencies {
667 668
		compile(project(":spring-beans"))
		compile(project(":spring-context"))
669
		compile(project(":spring-core"))
670 671
		optional(project(":spring-jdbc"))  // for Quartz support
		optional(project(":spring-tx"))  // for Quartz support
672
		optional("javax.activation:activation:${activationApiVersion}")
673
		optional("javax.mail:javax.mail-api:${javamailVersion}")
674
		optional("javax.cache:cache-api:${cacheApiVersion}")
B
Ben Manes 已提交
675
		optional("com.github.ben-manes.caffeine:caffeine:${caffeineVersion}")
676
		optional("net.sf.ehcache:ehcache:${ehcacheVersion}")
677
		optional("org.quartz-scheduler:quartz:${quartzVersion}")
678
		optional("org.codehaus.fabric3.api:commonj:1.1.0")
679
		optional("org.freemarker:freemarker:${freemarkerVersion}")
680
		optional("com.lowagie:itext:2.1.7")
681
		testCompile(project(":spring-context"))
682
		testCompile("org.apache.poi:poi:${poiVersion}")
P
Phillip Webb 已提交
683
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
684
		testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
685
		testRuntime("com.sun.mail:javax.mail:${javamailVersion}")
686
		testRuntime("org.ehcache:jcache:${ehcachejcacheVersion}")
687
	}
C
Chris Beams 已提交
688 689
}

690 691 692 693 694 695 696 697 698 699 700
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 已提交
701 702
project("spring-web") {
	description = "Spring Web"
S
Sebastien Deleuze 已提交
703

704
	apply plugin: "groovy"
705

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

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

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

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

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

903 904 905 906 907
project("spring-websocket") {
	description = "Spring WebSocket"

	dependencies {
		compile(project(":spring-context"))
908
		compile(project(":spring-core"))
909 910 911
		compile(project(":spring-web"))
		optional(project(":spring-messaging"))
		optional(project(":spring-webmvc"))
912 913
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
		optional("javax.websocket:javax.websocket-api:${websocketVersion}")
914 915 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
		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}")
941 942
		testCompile("io.projectreactor:reactor-core")
		testCompile("io.projectreactor.ipc:reactor-netty")
943
		testCompile("io.netty:netty-all")
944 945 946
	}
}

947 948 949 950
project("spring-webflux") {
	description = "Spring WebFlux"

	dependencies {
951
		compile(project(":spring-beans"))
952 953 954 955
		compile(project(":spring-core"))
		compile(project(":spring-web"))
		compile("org.reactivestreams:reactive-streams")
		compile("io.projectreactor:reactor-core")
956
		optional(project(":spring-context"))
957
		optional(project(":spring-context-support"))  // for FreeMarker support
958
		optional "javax.servlet:javax.servlet-api:${servletVersion}"
959 960
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
961
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jackson2Version}")
962 963 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
		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}")
1001
		testRuntime("org.jruby:jruby:9.1.12.0")
1002 1003 1004 1005 1006 1007 1008 1009 1010 1011
		testRuntime("org.python:jython-standalone:2.5.3")
		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 已提交
1012 1013
project("spring-test") {
	description = "Spring TestContext Framework"
1014

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

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

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

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

	check.dependsOn aggregateTestReports
C
Chris Beams 已提交
1131 1132
}

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

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

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

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

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

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

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

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

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

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

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

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

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

	artifacts {
		archives docsZip
		archives schemaZip
		archives distZip
	}

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

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

1286
}
1287

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

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

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