build.gradle 52.1 KB
Newer Older
1
buildscript {
2
	repositories {
B
Brian Clozel 已提交
3
		maven { url "https://repo.spring.io/plugins-release" }
4 5
	}
	dependencies {
S
Sam Brannen 已提交
6
		classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
B
Brian Clozel 已提交
7
		classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.2")
8
		classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
9
		classpath("ws.antonov.gradle.plugins:gradle-plugin-protobuf:0.9.1")
10
	}
11 12
}

13
plugins {
14
	id "org.sonarqube" version "2.1-rc1"
15 16
}

S
Stephane Nicoll 已提交
17 18 19 20 21 22
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'
23
	linkScmDevConnection = 'scm:git:ssh://git@github.com:spring-projects/spring-framework.git'
24

25
	moduleProjects = subprojects.findAll {
26 27
		!it.name.equals('spring-build-src') && !it.name.equals('spring-framework-bom')
	}
S
Stephane Nicoll 已提交
28 29
}

C
Chris Beams 已提交
30
configure(allprojects) { project ->
31 32
	group = "org.springframework"
	version = qualifyVersionIfNecessary(version)
33

34
	ext.activationApiVersion   = "1.1.1"
35
	ext.annotationApiVersion   = "1.2"
J
Juergen Hoeller 已提交
36
	ext.aspectjVersion         = "1.9.0.BETA-5"
37
	ext.beanvalVersion         = "1.1.0.Final"
38
	ext.caffeineVersion        = "2.3.2"
39 40 41 42 43
	ext.eclipselinkVersion     = "2.6.3"
	ext.ehcacheVersion         = "2.10.2"
	ext.ehcachejcacheVersion   = "1.0.1"
	ext.ehcache3Version        = "3.1.1"
	ext.ejbApiVersion          = "3.2"
J
Juergen Hoeller 已提交
44
	ext.elApiVersion           = "3.0.1-b04"
45 46 47 48 49
	ext.fileuploadVersion      = "1.3.2"
	ext.freemarkerVersion      = "2.3.25-incubating"
	ext.groovyVersion          = "2.4.7"
	ext.gsonVersion            = "2.7"
	ext.hamcrestVersion        = "1.3"
50
	ext.hibernate5Version      = "5.2.2.Final"
51 52 53 54 55
	ext.hibval5Version         = "5.2.4.Final"
	ext.hsqldbVersion          = "2.3.4"
	ext.httpasyncVersion       = "4.1.2"
	ext.httpclientVersion      = "4.5.2"
	ext.interceptorApiVersion  = "1.2"
56
	ext.jackson2Version        = "2.8.2"
57 58
	ext.javamailVersion        = "1.5.5"
	ext.jaxbVersion            = "2.2.11"
59
	ext.jaxwsVersion           = "2.2.11"
60
	ext.jcaVersion             = "1.7"
61
	ext.jettyVersion           = "9.4.0.M1"
62 63
	ext.jodaVersion            = "2.9.4"
	ext.jpaVersion             = "2.1.1"
64
	ext.jsfVersion             = "2.2"
65 66 67
	ext.jspVersion             = "2.3.2-b02"
	ext.jtaVersion             = "1.2"
	ext.junitVersion           = "4.12"
S
Sam Brannen 已提交
68 69
	ext.junitJupiterVersion    = '5.0.0-M2'
	ext.junitPlatformVersion   = '1.0.0-M2'
70
	ext.log4jVersion           = '2.6.2'
71
	ext.nettyVersion           = "4.1.5.Final"
72 73 74
	ext.okhttpVersion          = "2.7.5"
	ext.okhttp3Version         = "3.4.1"
	ext.poiVersion             = "3.14"
B
Brian Clozel 已提交
75
	ext.protobufVersion        = "3.0.0"
76
	ext.quartzVersion          = "2.2.3"
77 78
	ext.reactivestreamsVersion = "1.0.0"
	ext.reactorVersion         = "2.0.8.RELEASE"
79 80
	ext.reactorCoreVersion     = '3.0.1.BUILD-SNAPSHOT'
	ext.reactorNettyVersion    = '0.6.0.BUILD-SNAPSHOT'
81
	ext.romeVersion            = "1.6.0"
82
	ext.rxjavaVersion          = '1.1.9'
S
Sebastien Deleuze 已提交
83
	ext.rxjava2Version         = '2.0.0-RC1'
84
	ext.rxnettyVersion         = '0.5.2-rc.3'
85 86 87 88 89 90 91 92
	ext.servletVersion         = "3.1.0"
	ext.slf4jVersion           = "1.7.21"
	ext.snakeyamlVersion       = "1.17"
	ext.snifferVersion         = "1.15"
	ext.testngVersion          = "6.9.10"
	ext.tiles3Version          = "3.0.5"
	ext.tomcatVersion          = "8.5.4"
	ext.tyrusVersion           = "1.13"
93
	ext.undertowVersion        = "1.4.0.Final"
94 95
	ext.websocketVersion       = "1.1"
	ext.woodstoxVersion        = "5.0.2"
96
	ext.xmlunitVersion         = "2.2.1"
97
	ext.xnioVersion            = "3.4.0.Final"
98
	ext.xstreamVersion         = "1.4.9"
99

100
	ext.gradleScriptDir = "${rootProject.projectDir}/gradle"
101

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

S
Stephane Nicoll 已提交
107 108 109 110 111
	configurations {
		sniffer
		javaApiSignature
	}

112 113 114 115 116 117 118 119 120 121
	configurations.all {
		// check for updates every build
		resolutionStrategy.cacheChangingModulesFor 0, 'seconds'

		// consistent netty version (e.g. clashes between netty-all vs netty-common)
		resolutionStrategy.eachDependency { DependencyResolveDetails details ->
			if (details.requested.group == 'io.netty') {
				details.useVersion nettyVersion
			}
		}
R
Rob Winch 已提交
122 123 124 125 126
		resolutionStrategy.eachDependency { DependencyResolveDetails details ->
			if (details.requested.name == 'reactor-core' && details.requested.version.startsWith('3.')) {
				details.useVersion reactorCoreVersion
			}
		}
127 128
	}

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

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

144
	compileJava {
145 146
		sourceCompatibility = 1.8
		targetCompatibility = 1.8
147
		options.encoding = 'UTF-8'
148 149 150
	}

	compileTestJava {
J
Juergen Hoeller 已提交
151 152
		sourceCompatibility = 1.8
		targetCompatibility = 1.8
153
		options.encoding = 'UTF-8'
154
		options.compilerArgs += "-parameters"
J
Juergen Hoeller 已提交
155 156
	}

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

169
	repositories {
B
Brian Clozel 已提交
170
		maven { url "https://repo.spring.io/libs-release" }
171
		maven { url "https://repo.spring.io/milestone" }
172
		maven { url "https://repo.spring.io/snapshot" }	// Reactor 3 snapshots
173
	}
C
Chris Beams 已提交
174

175
	dependencies {
176 177 178
		testCompile("junit:junit:${junitVersion}") {
			exclude group:'org.hamcrest', module:'hamcrest-core'
		}
179
		testCompile("org.mockito:mockito-core:1.10.19") {
180 181
			exclude group:'org.hamcrest', module:'hamcrest-core'
		}
182
		testCompile("org.hamcrest:hamcrest-all:${hamcrestVersion}")
183 184
		testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
		testRuntime("org.apache.logging.log4j:log4j-jcl:${log4jVersion}")
185

S
Stephane Nicoll 已提交
186
		sniffer("org.codehaus.mojo:animal-sniffer-ant-tasks:${snifferVersion}")
187
		javaApiSignature("org.codehaus.mojo.signature:java18:1.0@signature")
S
Stephane Nicoll 已提交
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
	}

	task copyJavaApiSignature(type: Copy) {
		ext.to = file("$buildDir/javaApiSignature/")
		description "Copy the resolved Animal Sniffer signature dependency artifact to a known location and name"
		from configurations.javaApiSignature
		into to
		rename '.*signature', 'javaApi.signature'
	}

	task sniff {
		group = "Verification"
		description = "Checks the Java API signatures"

		dependsOn compileJava
		dependsOn copyJavaApiSignature

		inputs.dir sourceSets.main.output.classesDir
		inputs.dir copyJavaApiSignature.to
207

S
Stephane Nicoll 已提交
208 209 210 211 212 213 214
		doLast {
			ant.taskdef(
				name: 'animalSniffer',
				classname: 'org.codehaus.mojo.animal_sniffer.ant.CheckSignatureTask',
				classpath: configurations.sniffer.asPath
			)

215 216 217 218 219 220 221
			// TODO: Animal Sniffer currently chokes on optional JDK 9 bytecode in AspectJ 1.9 beta 5
			// ant.animalSniffer(
			// 		signature: "$buildDir/javaApiSignature/javaApi.signature",
			// 		classpath: sourceSets.main.compileClasspath.asPath) {
			// 	path(path: sourceSets.main.output.classesDir)
			// 	annotation(className: "org.springframework.lang.UsesSunHttpServer")
			// }
S
Stephane Nicoll 已提交
222
		}
223
	}
C
Chris Beams 已提交
224 225

	ext.javadocLinks = [
226
		"http://docs.oracle.com/javase/8/docs/api/",
227
		"http://docs.oracle.com/javaee/7/api/",
228
		"http://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/",  // CommonJ
J
Juergen Hoeller 已提交
229 230
		"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 已提交
231 232
		"http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/",
		"http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/",
233
		"http://tiles.apache.org/tiles-request/apidocs/",
J
Juergen Hoeller 已提交
234
		"http://tiles.apache.org/framework/apidocs/",
C
Chris Beams 已提交
235
		"http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/",
B
Brian Clozel 已提交
236 237
		"http://ehcache.org/apidocs/${ehcacheVersion}",
		"http://ehcache.org/apidocs/${ehcache3Version}",
238
		"http://quartz-scheduler.org/api/2.2.1/",
239 240 241
		"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/",
242
		"http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/"
C
Chris Beams 已提交
243
	] as String[]
244 245
}

246
configure(subprojects - project(":spring-build-src")) { subproject ->
247
	apply plugin: "merge"
248 249
	apply from: "${gradleScriptDir}/publish-maven.gradle"

S
Stephane Nicoll 已提交
250 251 252 253 254
	configurations {
		jacoco
	}

	dependencies {
255
		jacoco("org.jacoco:org.jacoco.agent:0.7.5.201505241946:runtime")
S
Stephane Nicoll 已提交
256 257 258
	}

	gradle.taskGraph.whenReady {taskGraph ->
259
		if (taskGraph.hasTask(':sonarqube')) {
S
Stephane Nicoll 已提交
260 261 262 263
			test.jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.*"
		}
	}

264
	jar {
P
Phillip Webb 已提交
265 266 267 268
		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
269 270 271 272 273

		from("${rootProject.projectDir}/src/dist") {
			include "license.txt"
			include "notice.txt"
			into "META-INF"
P
Phillip Webb 已提交
274
			expand(copyright: new Date().format("yyyy"), version: project.version)
275 276 277 278
		}
	}

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

281 282 283
		options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
		options.author = true
		options.header = project.name
C
Chris Beams 已提交
284
		options.links(project.ext.javadocLinks)
285
		options.addStringOption('Xdoclint:none', '-quiet')
C
Chris Beams 已提交
286 287 288 289 290

		// suppress warnings due to cross-module @see and @link references;
		// note that global 'api' task does display all warnings.
		logging.captureStandardError LogLevel.INFO
		logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message
291 292
	}

293 294
	task sourcesJar(type: Jar, dependsOn: classes) {
		classifier = 'sources'
295
		from sourceSets.main.allSource
296
		// don't include or exclude anything explicitly by default. See SPR-12085.
297 298 299
	}

	task javadocJar(type: Jar) {
P
Phillip Webb 已提交
300
		classifier = "javadoc"
301 302 303 304 305 306 307
		from javadoc
	}

	artifacts {
		archives sourcesJar
		archives javadocJar
	}
C
Chris Beams 已提交
308 309
}

310 311
project("spring-build-src") {
	description = "Exposes gradle buildSrc for IDE support"
312
	apply plugin: "groovy"
313 314 315

	dependencies {
		compile gradleApi()
R
Rob Winch 已提交
316
		compile localGroovy()
317 318 319 320 321
	}

	configurations.archives.artifacts.clear()
}

P
Phillip Webb 已提交
322 323
project("spring-core") {
	description = "Spring Core"
324

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

	configurations {
		jarjar
		cglib
335
		objenesis
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350
	}

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

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

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

P
Phillip Webb 已提交
385
		compile(files(cglibRepackJar))
386
		compile(files(objenesisRepackJar))
387
		compile("commons-logging:commons-logging:1.2")
388
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
389
		optional("net.sf.jopt-simple:jopt-simple:5.0.2")
390
		optional("org.reactivestreams:reactive-streams:${reactivestreamsVersion}")
391
		optional("io.projectreactor:reactor-core:${reactorCoreVersion}")
392
		optional "io.reactivex:rxjava:${rxjavaVersion}"
S
Sebastien Deleuze 已提交
393
		optional "io.reactivex.rxjava2:rxjava:${rxjava2Version}"
394
		optional("io.netty:netty-buffer:${nettyVersion}")
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 {
404
		// inline repackaged cglib classes directly into the 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("javax.el:javax.el-api:${elApiVersion}")
425
		optional("org.yaml:snakeyaml:${snakeyamlVersion}")
426
		testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
J
Juergen Hoeller 已提交
427
	}
C
Chris Beams 已提交
428 429
}

430 431
project("spring-beans-groovy") {
	description "Groovy Bean Definitions"
J
Juergen Hoeller 已提交
432
	merge.into = project(":spring-beans")
433
	apply plugin: "groovy"
J
Juergen Hoeller 已提交
434 435 436

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

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

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

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

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

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

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

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

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

P
Phillip Webb 已提交
492 493
project("spring-context") {
	description = "Spring Context"
494
	apply plugin: "groovy"
495

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

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

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

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

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

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

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

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

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

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

644
	dependencies {
645
		compile(project(":spring-beans"))
646
		compile(project(":spring-core"))
647
		compile(project(":spring-tx"))
648
		optional(project(":spring-context"))  // for JndiDataSourceLookup
649
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")
650
		optional("com.mchange:c3p0:0.9.5.2")
P
Phillip Webb 已提交
651
		optional("org.hsqldb:hsqldb:${hsqldbVersion}")
652
		optional("com.h2database:h2:1.4.192")
653 654
		optional("org.apache.derby:derby:10.12.1.1")
		optional("org.apache.derby:derbyclient:10.12.1.1")
655
	}
C
Chris Beams 已提交
656 657
}

P
Phillip Webb 已提交
658 659
project("spring-context-support") {
	description = "Spring Context Support"
660

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

P
Phillip Webb 已提交
685 686
project("spring-web") {
	description = "Spring Web"
687
	apply plugin: "groovy"
688

689 690 691 692 693 694 695 696 697 698 699 700 701 702 703
	// Re-generate Protobuf classes from *.proto files and move them in test sources
	if (project.hasProperty('genProtobuf')) {
		apply plugin: 'protobuf'

		task updateGenProtobuf(type:Copy, dependsOn: ":spring-web:generateTestProto") {
			from "${project.buildDir}/generated-sources/test/"
			into "${projectDir}/src/test/java"
			doLast {
				project.delete "${project.buildDir}/generated-sources/test"
			}
		}

		tasks.getByPath("compileTestJava").dependsOn "updateGenProtobuf"
	}

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

project("spring-web-reactive") {
	description = "Spring Web Reactive"
781

782 783 784 785 786 787 788
	dependencies {
		compile(project(":spring-core"))
		compile(project(":spring-web"))
		compile "org.reactivestreams:reactive-streams:${reactivestreamsVersion}"
		compile "io.projectreactor:reactor-core:${reactorCoreVersion}"
		optional(project(":spring-context-support"))  // for FreeMarker support
		provided "javax.servlet:javax.servlet-api:${servletVersion}"
789
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
790 791
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
		optional("org.freemarker:freemarker:${freemarkerVersion}")
792
		optional "org.apache.httpcomponents:httpclient:${httpclientVersion}"
793
		testCompile("javax.validation:validation-api:${beanvalVersion}")
794 795 796 797
		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}")
798
		testCompile("io.projectreactor.ipc:reactor-netty:${reactorNettyVersion}")
J
Juergen Hoeller 已提交
799
		testCompile("io.reactivex:rxnetty-http:${rxnettyVersion}") {
800 801 802
			exclude group: 'io.reactivex', module: 'rxjava'
		}
		testCompile("io.reactivex:rxjava:${rxjavaVersion}")
S
Sebastien Deleuze 已提交
803
		testCompile "io.reactivex.rxjava2:rxjava:${rxjava2Version}"
804
		testCompile("io.undertow:undertow-core:${undertowVersion}")
805
		testCompile("org.jboss.xnio:xnio-api:${xnioVersion}")
806
		testCompile("com.fasterxml:aalto-xml:1.0.0")
807
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
808
		testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
809 810 811
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
		testRuntime("javax.activation:activation:${activationApiVersion}")
812
		testRuntime("org.jboss.xnio:xnio-nio:${xnioVersion}")
813
		testRuntime("org.jboss.logging:jboss-logging:3.3.0.Final")
814
	}
C
Chris Beams 已提交
815 816
}

P
Phillip Webb 已提交
817 818
project("spring-orm") {
	description = "Spring Object/Relational Mapping"
819

820
	dependencies {
821 822 823 824 825 826 827
		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 已提交
828
		optional("org.eclipse.persistence:javax.persistence:${jpaVersion}")
829 830
		optional("org.eclipse.persistence:org.eclipse.persistence.core:${eclipselinkVersion}")
		optional("org.eclipse.persistence:org.eclipse.persistence.jpa:${eclipselinkVersion}") {
831 832
			exclude group: 'org.eclipse.persistence', module: 'javax.persistence'
		}
833
		optional("org.hibernate:hibernate-core:${hibernate5Version}")
834
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
S
Sam Brannen 已提交
835
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
P
Phillip Webb 已提交
836
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
837
		testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
838
		testRuntime("javax.xml.bind:jaxb-api:${jaxbVersion}")
839
	}
C
Chris Beams 已提交
840 841
}

P
Phillip Webb 已提交
842 843
project("spring-webmvc") {
	description = "Spring Web MVC"
844

845
	dependencies {
846
		compile(project(":spring-aop"))
847 848
		compile(project(":spring-beans"))
		compile(project(":spring-context"))
849
		compile(project(":spring-core"))
850
		compile(files(project(":spring-core").objenesisRepackJar))
851 852
		compile(project(":spring-expression"))
		compile(project(":spring-web"))
853
		provided("javax.servlet:javax.servlet-api:${servletVersion}")
854
		optional(project(":spring-context-support"))  // for FreeMarker support
855
		optional(project(":spring-oxm"))  // for MarshallingView
856
		optional("javax.servlet.jsp:javax.servlet.jsp-api:${jspVersion}")
857
		optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1")
858
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
859 860
		optional("org.apache.poi:poi:${poiVersion}")
		optional("org.apache.poi:poi-ooxml:${poiVersion}")
861
		optional("org.freemarker:freemarker:${freemarkerVersion}")
862
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
863 864
		optional("com.lowagie:itext:2.1.7")
		optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
865
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jackson2Version}")
866 867
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jackson2Version}")
		optional("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jackson2Version}")
868
		optional("com.rometools:rome:${romeVersion}")
869
		optional("javax.el:javax.el-api:${elApiVersion}")
870 871
		optional("org.apache.tiles:tiles-api:${tiles3Version}")
		optional("org.apache.tiles:tiles-core:${tiles3Version}") {
872 873
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
874
		optional("org.apache.tiles:tiles-servlet:${tiles3Version}") {
875 876
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
877
		optional("org.apache.tiles:tiles-jsp:${tiles3Version}") {
878 879
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
880
		optional("org.apache.tiles:tiles-el:${tiles3Version}") {
881 882
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
883
		optional("org.apache.tiles:tiles-extras:${tiles3Version}") {
884 885 886
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
			exclude group: "org.springframework", module: "spring-web"
		}
887
		optional('org.webjars:webjars-locator:0.32')
888
		testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
889
		testCompile("dom4j:dom4j:1.6.1") {
P
Phillip Webb 已提交
890
			exclude group: "xml-apis", module: "xml-apis"
891 892
		}
		testCompile("jaxen:jaxen:1.1.1") {
P
Phillip Webb 已提交
893 894 895
			exclude group: "xml-apis", module: "xml-apis"
			exclude group: "xom", module: "xom"
			exclude group: "xerces", module: "xercesImpl"
896
		}
B
Brian Clozel 已提交
897
		testCompile("org.eclipse.jetty:jetty-servlet:${jettyVersion}") {
B
Brian Clozel 已提交
898
			exclude group: "javax.servlet", module: "javax.servlet"
899
		}
B
Brian Clozel 已提交
900
		testCompile("org.eclipse.jetty:jetty-server:${jettyVersion}") {
B
Brian Clozel 已提交
901
			exclude group: "javax.servlet", module: "javax.servlet"
902
		}
J
Juergen Hoeller 已提交
903
		testCompile("javax.validation:validation-api:${beanvalVersion}")
904
		testCompile("org.hibernate:hibernate-validator:${hibval5Version}")
905 906
		testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}")
		testCompile("commons-fileupload:commons-fileupload:${fileuploadVersion}")
907
		testCompile("commons-io:commons-io:1.3")
908
		testCompile("joda-time:joda-time:${jodaVersion}")
909
		testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
910
		testCompile("org.mozilla:rhino:1.7.7.1")
911 912 913
		testRuntime("org.jruby:jruby:9.1.2.0")
		testRuntime("org.python:jython-standalone:2.5.3")
		testRuntime("org.webjars:underscorejs:1.8.3")
914 915 916
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
		testRuntime("javax.activation:activation:${activationApiVersion}")
917 918 919
	}
}

920 921 922 923 924 925 926 927 928
project("spring-websocket") {
	description = "Spring WebSocket"

	dependencies {
		compile(project(":spring-core"))
		compile(project(":spring-context"))
		compile(project(":spring-web"))
		optional(project(":spring-messaging"))
		optional(project(":spring-webmvc"))
929 930
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
		optional("javax.websocket:javax.websocket-api:${websocketVersion}")
931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954
		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"
		}
955
		optional("org.jboss.xnio:xnio-api:${xnioVersion}")
956 957 958
		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}")
959
		testCompile("io.projectreactor:reactor-core:${reactorVersion}") {
960
			force = true  // enforce 2.0.x
961
		}
962 963 964
		testCompile("io.projectreactor:reactor-net:${reactorVersion}")
		testCompile("io.netty:netty-all:${nettyVersion}")
		testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
965
		testRuntime("org.jboss.xnio:xnio-nio:${xnioVersion}")
966
		testRuntime("org.jboss.logging:jboss-logging:3.3.0.Final")
967 968 969
	}
}

P
Phillip Webb 已提交
970 971
project("spring-test") {
	description = "Spring TestContext Framework"
972

973
	dependencies {
974
		compile(project(":spring-core"))
975 976 977 978 979 980 981
		optional(project(":spring-beans"))
		optional(project(":spring-context"))
		optional(project(":spring-jdbc"))
		optional(project(":spring-tx"))
		optional(project(":spring-orm"))
		optional(project(":spring-web"))
		optional(project(":spring-webmvc"))
982
		optional(project(":spring-websocket"))
983
		optional("junit:junit:${junitVersion}")
984
		optional("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
985
		optional("org.testng:testng:${testngVersion}")
986
		optional("javax.inject:javax.inject:1")
987 988
		optional("javax.servlet:javax.servlet-api:${servletVersion}")
		optional("javax.servlet.jsp:javax.servlet.jsp-api:${jspVersion}")
989 990 991 992
		optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1")
		optional("org.apache.taglibs:taglibs-standard-jstlel:1.2.1") {
			exclude group: "org.apache.taglibs", module: "taglibs-standard-spec"
		}
993
		optional("javax.el:javax.el-api:${elApiVersion}")
994
		optional("javax.websocket:javax.websocket-api:${websocketVersion}")
995 996
		optional("javax.activation:activation:${activationApiVersion}")
		optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
997
		optional("org.aspectj:aspectjweaver:${aspectjVersion}")
S
Sam Brannen 已提交
998
		optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
999
		optional("org.hamcrest:hamcrest-core:${hamcrestVersion}")
1000
		optional("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
1001 1002
		optional("net.sourceforge.htmlunit:htmlunit:2.22")
		optional("org.seleniumhq.selenium:htmlunit-driver:2.21")
1003 1004 1005
		optional("org.seleniumhq.selenium:selenium-java:2.53.1") {
			exclude group: "io.netty", module: "netty"
		}
1006 1007
		optional("org.skyscreamer:jsonassert:1.3.0")
		optional("com.jayway.jsonpath:json-path:2.2.0")
1008 1009
		testCompile(project(":spring-context-support"))
		testCompile(project(":spring-oxm"))
1010
		testCompile("javax.mail:javax.mail-api:${javamailVersion}")
1011
		testCompile("javax.ejb:javax.ejb-api:${ejbApiVersion}")
S
Stephane Nicoll 已提交
1012
		testCompile("javax.interceptor:javax.interceptor-api:${interceptorApiVersion}")
1013
		testCompile("org.hibernate:hibernate-core:${hibernate5Version}")
1014
		testCompile("org.hibernate:hibernate-validator:${hibval5Version}")
1015 1016
		// Enable use of the JUnitPlatform Runner
		testCompile("org.junit.platform:junit-platform-runner:${junitPlatformVersion}")
1017
		testCompile("com.thoughtworks.xstream:xstream:${xstreamVersion}")
1018
		testCompile("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
1019
		testCompile("com.rometools:rome:${romeVersion}")
1020 1021
		testCompile("org.apache.tiles:tiles-api:${tiles3Version}")
		testCompile("org.apache.tiles:tiles-core:${tiles3Version}") {
1022 1023
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
1024
		testCompile("org.apache.tiles:tiles-servlet:${tiles3Version}") {
1025 1026
			exclude group: "org.slf4j", module: "jcl-over-slf4j"
		}
1027
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
S
Sam Brannen 已提交
1028
		testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
1029
		testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}")
1030
		testCompile("javax.cache:cache-api:1.0.0")
1031 1032
		testCompile('de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1')

1033
		testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
1034
		testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}")  // Java Util Logging for JUnit 5
1035
		testRuntime("org.ehcache:ehcache:${ehcache3Version}")
J
Juergen Hoeller 已提交
1036
		testRuntime("org.terracotta:management-model:2.0.0")
1037 1038
		testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
		testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
1039
	}
1040 1041

	task testNG(type: Test) {
1042
		description = 'Runs TestNG tests.'
1043
		useTestNG()
1044
		scanForTestClasses = false
1045 1046
		include(["**/testng/**/*Tests.class", "**/testng/**/*Test.class"])
		// Show STD_OUT & STD_ERR of the test JVM(s) on the console:
1047
		// testLogging.showStandardStreams = true
1048
		// forkEvery 1
1049
		reports.junitXml.destination = file("$buildDir/test-results")
1050 1051 1052
	}

	test {
1053
		description = 'Runs JUnit tests.'
1054 1055
		dependsOn testNG
		useJUnit()
1056 1057 1058
		scanForTestClasses = false
		include(['**/*Tests.class', '**/*Test.class', '**/SpringJUnitJupiterTestSuite.class'])
		exclude(['**/testng/**/*.*'])
1059 1060
		// Java Util Logging for JUnit 5.
		// systemProperty('java.util.logging.manager', 'org.apache.logging.log4j.jul.LogManager')
1061
		reports.junitXml.destination = file("$buildDir/test-results")
1062
	}
1063 1064

	task aggregateTestReports(type: TestReport) {
1065
		description = 'Aggregates JUnit and TestNG test reports.'
1066 1067 1068 1069 1070
		destinationDir = test.reports.html.destination
		reportOn test, testNG
	}

	check.dependsOn aggregateTestReports
C
Chris Beams 已提交
1071 1072
}

P
Phillip Webb 已提交
1073 1074 1075
project("spring-aspects") {
	description = "Spring Aspects"
	apply from: "aspects.gradle"
1076

1077
	dependencies {
1078
		aspects(project(":spring-orm"))
1079 1080 1081
		ajc("org.aspectj:aspectjtools:${aspectjVersion}")
		rt("org.aspectj:aspectjrt:${aspectjVersion}")
		compile("org.aspectj:aspectjweaver:${aspectjVersion}")
J
Juergen Hoeller 已提交
1082
		provided("org.eclipse.persistence:javax.persistence:${jpaVersion}")
1083 1084 1085 1086 1087 1088
		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
1089
		optional("javax.transaction:javax.transaction-api:${jtaVersion}")  // for @javax.transaction.Transactional support
S
Stephane Nicoll 已提交
1090
		optional("javax.cache:cache-api:1.0.0")
1091
		testCompile(project(":spring-core"))  // for CodeStyleAspect
1092
		testCompile(project(":spring-test"))
1093
		testCompile("javax.mail:javax.mail-api:${javamailVersion}")
1094
	}
1095

1096
	eclipse.project {
P
Phillip Webb 已提交
1097
		natures += "org.eclipse.ajdt.ui.ajnature"
1098
		buildCommands = [new org.gradle.plugins.ide.eclipse.model.BuildCommand("org.eclipse.ajdt.core.ajbuilder")]
1099
	}
C
Chris Beams 已提交
1100 1101
}

1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136
project("spring-framework-bom") {
	description = "Spring Framework (Bill of Materials)"

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

1137 1138
sonarqube {
	properties {
S
Stephane Nicoll 已提交
1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150
		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"
	}
}

1151
configure(rootProject) {
P
Phillip Webb 已提交
1152
	description = "Spring Framework"
1153

B
Brian Clozel 已提交
1154
	apply plugin: "org.asciidoctor.convert"
1155
	apply plugin: "docbook-reference"
1156
	apply plugin: "groovy"
R
Rob Winch 已提交
1157

1158
	// apply plugin: "detect-split-packages"
1159 1160
	apply from: "${gradleScriptDir}/jdiff.gradle"

R
Rob Winch 已提交
1161
	asciidoctor {
B
Brian Clozel 已提交
1162 1163
		sourceDir project.file('src/asciidoc')
		separateOutputDirs = false
1164
		backends = ['docbook']
B
Brian Clozel 已提交
1165
		options doctype: 'book', eruby: 'erubis'
J
Juergen Hoeller 已提交
1166
		attributes 'spring-version': project.version, 'revnumber': project.version, 'docinfo': ""
1167 1168
	}

1169 1170 1171
	reference {
		sourceDir = asciidoctor.outputDir
		pdfFilename = "spring-framework-reference.pdf"
1172
		epubFilename = "spring-framework-reference.epub"
1173 1174 1175 1176 1177 1178 1179
		expandPlaceholders = ""
	}

	afterEvaluate {
		tasks.findAll { it.name.startsWith("reference") }.each{ it.dependsOn.add("asciidoctor") }
	}

1180 1181 1182 1183 1184
	// 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")
	// }
1185

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

1189
	dependencies {  // for integration tests
1190
		testCompile(project(":spring-aop"))
1191
		testCompile(project(":spring-beans"))
1192
		testCompile(project(":spring-context"))
1193 1194
		testCompile(project(":spring-core"))
		testCompile(project(":spring-expression"))
1195
		testCompile(project(":spring-jdbc"))
1196
		testCompile(project(":spring-orm"))
1197
		testCompile(project(":spring-test"))
1198
		testCompile(project(":spring-tx"))
1199
		testCompile(project(":spring-web"))
1200
		testCompile("javax.servlet:javax.servlet-api:${servletVersion}")
1201
		testCompile("javax.inject:javax.inject:1")
J
Juergen Hoeller 已提交
1202
		testCompile("javax.resource:javax.resource-api:${jcaVersion}")
1203
		testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
1204
		testCompile("org.hibernate:hibernate-core:${hibernate5Version}")
P
Phillip Webb 已提交
1205
		testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
1206 1207 1208
	}

	task api(type: Javadoc) {
P
Phillip Webb 已提交
1209 1210
		group = "Documentation"
		description = "Generates aggregated Javadoc API documentation."
1211
		title = "${rootProject.description} ${version} API"
C
Chris Beams 已提交
1212

1213 1214 1215 1216 1217
		dependsOn {
			subprojects.collect {
				it.tasks.getByName("jar")
			}
		}
1218 1219 1220
		options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
		options.author = true
		options.header = rootProject.description
P
Phillip Webb 已提交
1221
		options.overview = "src/api/overview.html"
1222
		options.stylesheetFile = file("src/api/stylesheet.css")
1223
		options.splitIndex = true
C
Chris Beams 已提交
1224
		options.links(project.ext.javadocLinks)
1225
		options.addStringOption('Xdoclint:none', '-quiet')
C
Chris Beams 已提交
1226

1227 1228 1229
		source subprojects.collect { project ->
			project.sourceSets.main.allJava
		}
C
Chris Beams 已提交
1230

P
Phillip Webb 已提交
1231
		maxMemory = "1024m"
C
Chris Beams 已提交
1232
		destinationDir = new File(buildDir, "api")
1233 1234 1235

		doFirst {
			classpath = files(
1236 1237
                // ensure Servlet 3.x has precedence on the javadoc classpath
                project(":spring-webmvc").sourceSets.main.compileClasspath.files.find { it =~ "servlet-api" },
1238 1239 1240 1241 1242
				// ensure the javadoc process can resolve types compiled from .aj sources
				project(":spring-aspects").sourceSets.main.output
			)
			classpath += files(subprojects.collect { it.sourceSets.main.compileClasspath })
		}
1243 1244
	}

1245
	task docsZip(type: Zip, dependsOn: 'reference') {
P
Phillip Webb 已提交
1246 1247 1248
		group = "Distribution"
		baseName = "spring-framework"
		classifier = "docs"
1249 1250 1251
		description = "Builds -${classifier} archive containing api and reference " +
			"for deployment at http://static.springframework.org/spring-framework/docs."

P
Phillip Webb 已提交
1252 1253
		from("src/dist") {
			include "changelog.txt"
1254 1255 1256
		}

		from (api) {
1257
			into "javadoc-api"
1258 1259
		}

1260 1261
		from (reference) {
			into "spring-framework-reference"
1262 1263 1264 1265
		}
	}

	task schemaZip(type: Zip) {
P
Phillip Webb 已提交
1266 1267 1268
		group = "Distribution"
		baseName = "spring-framework"
		classifier = "schema"
1269 1270
		description = "Builds -${classifier} archive containing all " +
			"XSDs for deployment at http://springframework.org/schema."
S
Stephane Nicoll 已提交
1271
		duplicatesStrategy 'exclude'
1272
		moduleProjects.each { subproject ->
1273 1274 1275
			def Properties schemas = new Properties();

			subproject.sourceSets.main.resources.find {
P
Phillip Webb 已提交
1276
				it.path.endsWith("META-INF/spring.schemas")
1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293
			}?.withInputStream { schemas.load(it) }

			for (def key : schemas.keySet()) {
				def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
				assert shortName != key
				File xsdFile = subproject.sourceSets.main.resources.find {
					it.path.endsWith(schemas.get(key))
				}
				assert xsdFile != null
				into (shortName) {
					from xsdFile.path
				}
			}
		}
	}

	task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
P
Phillip Webb 已提交
1294 1295 1296
		group = "Distribution"
		baseName = "spring-framework"
		classifier = "dist"
1297
		description = "Builds -${classifier} archive, containing all jars and docs, " +
J
Juergen Hoeller 已提交
1298
			"suitable for community download page."
1299 1300 1301

		ext.baseDir = "${baseName}-${project.version}";

P
Phillip Webb 已提交
1302 1303 1304 1305
		from("src/dist") {
			include "readme.txt"
			include "license.txt"
			include "notice.txt"
1306
			into "${baseDir}"
P
Phillip Webb 已提交
1307
			expand(copyright: new Date().format("yyyy"), version: project.version)
1308 1309 1310 1311 1312 1313 1314 1315 1316 1317
		}

		from(zipTree(docsZip.archivePath)) {
			into "${baseDir}/docs"
		}

		from(zipTree(schemaZip.archivePath)) {
			into "${baseDir}/schema"
		}

1318
		moduleProjects.each { subproject ->
1319 1320
			into ("${baseDir}/libs") {
				from subproject.jar
P
Phillip Webb 已提交
1321
				if (subproject.tasks.findByPath("sourcesJar")) {
1322 1323
					from subproject.sourcesJar
				}
P
Phillip Webb 已提交
1324
				if (subproject.tasks.findByPath("javadocJar")) {
1325 1326 1327 1328 1329 1330
					from subproject.javadocJar
				}
			}
		}
	}

1331
	// Create a distribution that contains all dependencies (required and optional).
1332 1333
	// Not published by default; only for use when building from source.
	task depsZip(type: Zip, dependsOn: distZip) { zipTask ->
P
Phillip Webb 已提交
1334 1335 1336
		group = "Distribution"
		baseName = "spring-framework"
		classifier = "dist-with-deps"
1337 1338 1339 1340 1341 1342 1343 1344 1345 1346
		description = "Builds -${classifier} archive, containing everything " +
			"in the -${distZip.classifier} archive plus all runtime dependencies."

		from zipTree(distZip.archivePath)

		gradle.taskGraph.whenReady { taskGraph ->
			if (taskGraph.hasTask(":${zipTask.name}")) {
				def projectNames = rootProject.subprojects*.name
				def artifacts = new HashSet()
				subprojects.each { subproject ->
1347 1348
					(subproject.configurations.runtime.resolvedConfiguration.resolvedArtifacts +
					subproject.configurations.optional.resolvedConfiguration.resolvedArtifacts).each { artifact ->
1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369
						def dependency = artifact.moduleVersion.id
						if (!projectNames.contains(dependency.name)) {
							artifacts << artifact.file
						}
					}
				}

				zipTask.from(artifacts) {
					into "${distZip.baseDir}/deps"
				}
			}
		}
	}

	artifacts {
		archives docsZip
		archives schemaZip
		archives distZip
	}

	task wrapper(type: Wrapper) {
P
Phillip Webb 已提交
1370
		description = "Generates gradlew[.bat] scripts"
S
Sam Brannen 已提交
1371
		gradleVersion = '3.0'
1372 1373

		doLast() {
1374
			def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
1375
			def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=256m"
P
Phillip Webb 已提交
1376
			File wrapperFile = file("gradlew")
1377 1378
			wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
				"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
P
Phillip Webb 已提交
1379
			File wrapperBatFile = file("gradlew.bat")
1380 1381 1382 1383
			wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=",
				"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
		}
	}
1384

1385
}
1386

S
Stephane Nicoll 已提交
1387
configure([project(':spring-build-src'), project(':spring-framework-bom')]) {
1388
	sonarqube {
S
Stephane Nicoll 已提交
1389 1390 1391 1392 1393
		skipProject = true
	}
}

configure(project(':spring-core')) {
1394 1395
	sonarqube {
		properties {
S
Stephane Nicoll 已提交
1396 1397 1398 1399 1400 1401
			property "sonar.exclusions",
					"src/main/java/org/springframework/cglib/**/*,src/main/java/org/springframework/asm/**/*"
		}
	}
}

1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412
/*
 * 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-")) {
1413
			return version.replace('BUILD', qualifier)
1414 1415
		}
	}
1416
	return version
1417
}