Spring Framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

292 lines
9.6 KiB

buildscript {
repositories {
maven { url "https://repo.spring.io/plugins-release" }
}
dependencies {
classpath("io.spring.nohttp:nohttp-gradle:0.0.3.RELEASE")
classpath("org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16")
classpath("io.spring.asciidoctor:spring-asciidoctor-extensions:0.1.3.RELEASE")
}
}
// 3rd party plugin repositories can be configured in settings.gradle
plugins {
id 'org.springframework.build.test-sources' apply false
id "io.spring.dependency-management" version "1.0.7.RELEASE" apply false
id "org.jetbrains.kotlin.jvm" version "1.3.41" apply false
id "org.jetbrains.dokka" version "0.9.18"
id "org.asciidoctor.convert" version "1.5.8"
}
ext {
linkHomepage = "https://spring.io/projects/spring-framework"
linkCi = "https://build.spring.io/browse/SPR"
linkIssue = "https://github.com/spring-projects/spring-framework/issues"
linkScmUrl = "https://github.com/spring-projects/spring-framework"
linkScmConnection = "scm:git:git://github.com/spring-projects/spring-framework.git"
linkScmDevConnection = "scm:git:ssh://git@github.com:spring-projects/spring-framework.git"
moduleProjects = subprojects.findAll {
(it.name != "spring-framework-bom") && (it.name != "spring-core-coroutines")
}
aspectjVersion = "1.9.4"
coroutinesVersion = "1.3.0-RC"
freemarkerVersion = "2.3.28"
groovyVersion = "2.5.7"
hsqldbVersion = "2.5.0"
jackson2Version = "2.9.9"
jettyVersion = "9.4.19.v20190610"
junit5Version = "5.5.1"
kotlinVersion = "1.3.41"
log4jVersion = "2.12.0"
nettyVersion = "4.1.38.Final"
reactorVersion = "Dysprosium-M3"
rsocketVersion = "1.0.0-RC2"
rxjavaVersion = "1.3.8"
rxjavaAdapterVersion = "1.2.1"
rxjava2Version = "2.2.10"
slf4jVersion = "1.7.26" // spring-jcl + consistent 3rd party deps
tiles3Version = "3.0.8"
tomcatVersion = "9.0.22"
undertowVersion = "2.0.23.Final"
gradleScriptDir = "${rootProject.projectDir}/gradle"
withoutJclOverSlf4j = {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
}
}
configure(allprojects) { project ->
group = "org.springframework"
apply plugin: "java"
apply plugin: "kotlin"
apply plugin: "checkstyle"
apply plugin: 'org.springframework.build.compile'
apply plugin: 'org.springframework.build.optional-dependencies'
apply plugin: 'org.springframework.build.test-sources'
apply plugin: "io.spring.dependency-management"
apply from: "${gradleScriptDir}/ide.gradle"
dependencyManagement {
resolutionStrategy {
cacheChangingModulesFor 0, "seconds"
}
applyMavenExclusions = false
generatedPomCustomization {
enabled = false
}
imports {
mavenBom "org.junit:junit-bom:${junit5Version}"
mavenBom "org.jetbrains.kotlin:kotlin-bom:${kotlinVersion}"
mavenBom "org.jetbrains.kotlinx:kotlinx-coroutines-bom:${coroutinesVersion}"
}
}
configurations.all {
// Check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
// Consistent slf4j version (e.g. clashes between slf4j versions)
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == "org.slf4j") {
details.useVersion slf4jVersion
}
}
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = ["-Xjsr305=strict"]
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = ["-Xjsr305=strict"]
}
}
test {
systemProperty("java.awt.headless", "true")
systemProperty("testGroups", project.properties.get("testGroups"))
systemProperty("io.netty.leakDetection.level", "paranoid")
useJUnitPlatform()
scanForTestClasses = false
include(["**/*Tests.class", "**/*Test.class"])
// Since we set scanForTestClasses to false, we need to filter out inner
// classes with the "$" pattern; otherwise, using -Dtest.single=MyTests to
// run MyTests by itself will fail if MyTests contains any inner classes.
exclude(["**/Abstract*.class", '**/*$*'])
}
checkstyle {
toolVersion = "8.23"
configDir = rootProject.file("src/checkstyle")
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/libs-release" }
maven { url "https://repo.spring.io/milestone" } // Reactor
mavenLocal()
}
dependencies {
testCompile("junit:junit:4.13-beta-3") {
exclude group: "org.hamcrest", module: "hamcrest-core"
}
testCompile("org.mockito:mockito-core:3.0.0") {
exclude group: "org.hamcrest", module: "hamcrest-core"
}
testCompile("io.mockk:mockk:1.9.3")
testCompile("org.hamcrest:hamcrest-all:1.3")
testCompile("org.assertj:assertj-core:3.13.1")
// Pull in the latest JUnit 5 Launcher API and the Vintage engine as well
// so that we can run JUnit 4 tests in IDEs.
testRuntime("org.junit.platform:junit-platform-launcher")
testRuntime("org.junit.vintage:junit-vintage-engine")
testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
testRuntime("org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}")
testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}")
// JSR-305 only used for non-required meta-annotations
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
testCompileOnly("com.google.code.findbugs:jsr305:3.0.2")
checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.7")
}
Eliminate all Javadoc warnings - Support external Javadoc links using Gradle's javadoc.options.links - Fix all other Javadoc warnings, such as typos, references to non-existent (or no longer existent) types and members, etc, including changes related to the Quartz 2.0 upgrade (SPR-8275) and adding the HTTP PATCH method (SPR-7985). - Suppress all output for project-level `javadoc` tasks in order to hide false-negative warnings about cross-module @see and @link references (e.g. spring-core having a @see reference to spring-web). Use the `--info` (-i) flag to gradle at any time to see project-level javadoc warnings without running the entire `api` task. e.g. `gradle :spring-core:javadoc -i` - Favor root project level `api` task for detection of legitimate Javadoc warnings. There are now zero Javadoc warnings across the entirety of spring-framework. Goal: keep it that way. - Remove all @link and @see references to types and members that exist only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+ respectively. This is necessary because only one version of each of these dependencies can be present on the global `api` javadoc task's classpath. To that end, the `api` task classpath has now been customized to ensure that the Servlet 3 API and Hibernate Core 4 jars have precedence. - SPR-8896 replaced our dependency on aspectjrt with a dependency on aspectjweaver, which is fine from a POM point of view, but causes a spurious warning to be emitted from the ant iajc task that it "cannot find aspectjrt on the classpath" - even though aspectjweaver is perfectly sufficient. In the name of keeping the console quiet, a new `rt` configuration has been added, and aspectjrt added as a dependency to it. In turn, configurations.rt.asPath is appended to the iajc classpath during both compileJava and compileTestJava for spring-aspects. Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
12 years ago
ext.javadocLinks = [
URL Cleanup (#22515) This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed Success These URLs were fixed successfully. * http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/ migrated to: https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/ ([https](https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/) result 200). * http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/ migrated to: https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/ ([https](https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/) result 200). * http://docs.oracle.com/javaee/7/api/ migrated to: https://docs.oracle.com/javaee/7/api/ ([https](https://docs.oracle.com/javaee/7/api/) result 200). * http://docs.oracle.com/javase/8/docs/api/ migrated to: https://docs.oracle.com/javase/8/docs/api/ ([https](https://docs.oracle.com/javase/8/docs/api/) result 200). * http://fasterxml.github.io/jackson-core/javadoc/2.9/ migrated to: https://fasterxml.github.io/jackson-core/javadoc/2.9/ ([https](https://fasterxml.github.io/jackson-core/javadoc/2.9/) result 200). * http://fasterxml.github.io/jackson-databind/javadoc/2.9/ migrated to: https://fasterxml.github.io/jackson-databind/javadoc/2.9/ ([https](https://fasterxml.github.io/jackson-databind/javadoc/2.9/) result 200). * http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/ migrated to: https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/ ([https](https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/) result 200). * http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/ migrated to: https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/ ([https](https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/) result 200). * http://issues.gradle.org/browse/GRADLE-1116 migrated to: https://issues.gradle.org/browse/GRADLE-1116 ([https](https://issues.gradle.org/browse/GRADLE-1116) result 200). * http://projectreactor.io/docs/core/release/api/ migrated to: https://projectreactor.io/docs/core/release/api/ ([https](https://projectreactor.io/docs/core/release/api/) result 200). * http://tiles.apache.org/framework/apidocs/ migrated to: https://tiles.apache.org/framework/apidocs/ ([https](https://tiles.apache.org/framework/apidocs/) result 200). * http://tiles.apache.org/tiles-request/apidocs/ migrated to: https://tiles.apache.org/tiles-request/apidocs/ ([https](https://tiles.apache.org/tiles-request/apidocs/) result 200). * http://www.apache.org/licenses/LICENSE-2.0 migrated to: https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200). * http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/ migrated to: https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/ ([https](https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/) result 200). * http://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/ migrated to: https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/ ([https](https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/) result 200). * http://docs.spring.io/spring-framework/docs migrated to: https://docs.spring.io/spring-framework/docs ([https](https://docs.spring.io/spring-framework/docs) result 301). * http://glassfish.java.net/nonav/docs/v3/api/ migrated to: https://glassfish.java.net/nonav/docs/v3/api/ ([https](https://glassfish.java.net/nonav/docs/v3/api/) result 301). * http://projects.spring.io/spring-framework migrated to: https://projects.spring.io/spring-framework ([https](https://projects.spring.io/spring-framework) result 301). * http://springframework.org/schema migrated to: https://springframework.org/schema ([https](https://springframework.org/schema) result 301). * http://ehcache.org/apidocs/2.10.4 (301) migrated to: https://www.ehcache.org/apidocs/2.10.4 ([https](https://ehcache.org/apidocs/2.10.4) result 301).
6 years ago
"https://docs.oracle.com/javase/8/docs/api/",
"https://docs.oracle.com/javaee/7/api/",
"https://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/", // CommonJ
"https://www.ibm.com/support/knowledgecenter/SS7JFU_8.5.5/com.ibm.websphere.javadoc.doc/web/apidocs/",
URL Cleanup (#22515) This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed Success These URLs were fixed successfully. * http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/ migrated to: https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/ ([https](https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/) result 200). * http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/ migrated to: https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/ ([https](https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/) result 200). * http://docs.oracle.com/javaee/7/api/ migrated to: https://docs.oracle.com/javaee/7/api/ ([https](https://docs.oracle.com/javaee/7/api/) result 200). * http://docs.oracle.com/javase/8/docs/api/ migrated to: https://docs.oracle.com/javase/8/docs/api/ ([https](https://docs.oracle.com/javase/8/docs/api/) result 200). * http://fasterxml.github.io/jackson-core/javadoc/2.9/ migrated to: https://fasterxml.github.io/jackson-core/javadoc/2.9/ ([https](https://fasterxml.github.io/jackson-core/javadoc/2.9/) result 200). * http://fasterxml.github.io/jackson-databind/javadoc/2.9/ migrated to: https://fasterxml.github.io/jackson-databind/javadoc/2.9/ ([https](https://fasterxml.github.io/jackson-databind/javadoc/2.9/) result 200). * http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/ migrated to: https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/ ([https](https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/) result 200). * http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/ migrated to: https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/ ([https](https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/) result 200). * http://issues.gradle.org/browse/GRADLE-1116 migrated to: https://issues.gradle.org/browse/GRADLE-1116 ([https](https://issues.gradle.org/browse/GRADLE-1116) result 200). * http://projectreactor.io/docs/core/release/api/ migrated to: https://projectreactor.io/docs/core/release/api/ ([https](https://projectreactor.io/docs/core/release/api/) result 200). * http://tiles.apache.org/framework/apidocs/ migrated to: https://tiles.apache.org/framework/apidocs/ ([https](https://tiles.apache.org/framework/apidocs/) result 200). * http://tiles.apache.org/tiles-request/apidocs/ migrated to: https://tiles.apache.org/tiles-request/apidocs/ ([https](https://tiles.apache.org/tiles-request/apidocs/) result 200). * http://www.apache.org/licenses/LICENSE-2.0 migrated to: https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200). * http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/ migrated to: https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/ ([https](https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/) result 200). * http://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/ migrated to: https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/ ([https](https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/) result 200). * http://docs.spring.io/spring-framework/docs migrated to: https://docs.spring.io/spring-framework/docs ([https](https://docs.spring.io/spring-framework/docs) result 301). * http://glassfish.java.net/nonav/docs/v3/api/ migrated to: https://glassfish.java.net/nonav/docs/v3/api/ ([https](https://glassfish.java.net/nonav/docs/v3/api/) result 301). * http://projects.spring.io/spring-framework migrated to: https://projects.spring.io/spring-framework ([https](https://projects.spring.io/spring-framework) result 301). * http://springframework.org/schema migrated to: https://springframework.org/schema ([https](https://springframework.org/schema) result 301). * http://ehcache.org/apidocs/2.10.4 (301) migrated to: https://www.ehcache.org/apidocs/2.10.4 ([https](https://ehcache.org/apidocs/2.10.4) result 301).
6 years ago
"https://glassfish.java.net/nonav/docs/v3/api/",
"https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/",
"https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/",
"https://tiles.apache.org/tiles-request/apidocs/",
"https://tiles.apache.org/framework/apidocs/",
"https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/",
"https://www.ehcache.org/apidocs/2.10.4",
"https://www.quartz-scheduler.org/api/2.3.0/",
URL Cleanup (#22515) This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed Success These URLs were fixed successfully. * http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/ migrated to: https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/ ([https](https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/) result 200). * http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/ migrated to: https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/ ([https](https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/) result 200). * http://docs.oracle.com/javaee/7/api/ migrated to: https://docs.oracle.com/javaee/7/api/ ([https](https://docs.oracle.com/javaee/7/api/) result 200). * http://docs.oracle.com/javase/8/docs/api/ migrated to: https://docs.oracle.com/javase/8/docs/api/ ([https](https://docs.oracle.com/javase/8/docs/api/) result 200). * http://fasterxml.github.io/jackson-core/javadoc/2.9/ migrated to: https://fasterxml.github.io/jackson-core/javadoc/2.9/ ([https](https://fasterxml.github.io/jackson-core/javadoc/2.9/) result 200). * http://fasterxml.github.io/jackson-databind/javadoc/2.9/ migrated to: https://fasterxml.github.io/jackson-databind/javadoc/2.9/ ([https](https://fasterxml.github.io/jackson-databind/javadoc/2.9/) result 200). * http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/ migrated to: https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/ ([https](https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/) result 200). * http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/ migrated to: https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/ ([https](https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/) result 200). * http://issues.gradle.org/browse/GRADLE-1116 migrated to: https://issues.gradle.org/browse/GRADLE-1116 ([https](https://issues.gradle.org/browse/GRADLE-1116) result 200). * http://projectreactor.io/docs/core/release/api/ migrated to: https://projectreactor.io/docs/core/release/api/ ([https](https://projectreactor.io/docs/core/release/api/) result 200). * http://tiles.apache.org/framework/apidocs/ migrated to: https://tiles.apache.org/framework/apidocs/ ([https](https://tiles.apache.org/framework/apidocs/) result 200). * http://tiles.apache.org/tiles-request/apidocs/ migrated to: https://tiles.apache.org/tiles-request/apidocs/ ([https](https://tiles.apache.org/tiles-request/apidocs/) result 200). * http://www.apache.org/licenses/LICENSE-2.0 migrated to: https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200). * http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/ migrated to: https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/ ([https](https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/) result 200). * http://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/ migrated to: https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/ ([https](https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/) result 200). * http://docs.spring.io/spring-framework/docs migrated to: https://docs.spring.io/spring-framework/docs ([https](https://docs.spring.io/spring-framework/docs) result 301). * http://glassfish.java.net/nonav/docs/v3/api/ migrated to: https://glassfish.java.net/nonav/docs/v3/api/ ([https](https://glassfish.java.net/nonav/docs/v3/api/) result 301). * http://projects.spring.io/spring-framework migrated to: https://projects.spring.io/spring-framework ([https](https://projects.spring.io/spring-framework) result 301). * http://springframework.org/schema migrated to: https://springframework.org/schema ([https](https://springframework.org/schema) result 301). * http://ehcache.org/apidocs/2.10.4 (301) migrated to: https://www.ehcache.org/apidocs/2.10.4 ([https](https://ehcache.org/apidocs/2.10.4) result 301).
6 years ago
"https://fasterxml.github.io/jackson-core/javadoc/2.9/",
"https://fasterxml.github.io/jackson-databind/javadoc/2.9/",
"https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/",
"https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/",
"https://junit.org/junit4/javadoc/4.12/",
"https://junit.org/junit5/docs/${junit5Version}/api/"
Eliminate all Javadoc warnings - Support external Javadoc links using Gradle's javadoc.options.links - Fix all other Javadoc warnings, such as typos, references to non-existent (or no longer existent) types and members, etc, including changes related to the Quartz 2.0 upgrade (SPR-8275) and adding the HTTP PATCH method (SPR-7985). - Suppress all output for project-level `javadoc` tasks in order to hide false-negative warnings about cross-module @see and @link references (e.g. spring-core having a @see reference to spring-web). Use the `--info` (-i) flag to gradle at any time to see project-level javadoc warnings without running the entire `api` task. e.g. `gradle :spring-core:javadoc -i` - Favor root project level `api` task for detection of legitimate Javadoc warnings. There are now zero Javadoc warnings across the entirety of spring-framework. Goal: keep it that way. - Remove all @link and @see references to types and members that exist only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+ respectively. This is necessary because only one version of each of these dependencies can be present on the global `api` javadoc task's classpath. To that end, the `api` task classpath has now been customized to ensure that the Servlet 3 API and Hibernate Core 4 jars have precedence. - SPR-8896 replaced our dependency on aspectjrt with a dependency on aspectjweaver, which is fine from a POM point of view, but causes a spurious warning to be emitted from the ant iajc task that it "cannot find aspectjrt on the classpath" - even though aspectjweaver is perfectly sufficient. In the name of keeping the console quiet, a new `rt` configuration has been added, and aspectjrt added as a dependency to it. In turn, configurations.rt.asPath is appended to the iajc classpath during both compileJava and compileTestJava for spring-aspects. Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
12 years ago
] as String[]
Upgrade to JUnit 4.11 snapshot in support of JDK7 Class#getDeclaredMembers returns arbitrary results under JDK7. This results in non-deterministic execution of JUnit test methods, often revealing unintended dependencies between methods that rely on a specific order to succeed. JUnit 4.11 contains support for predictable test ordering [1], but at the time of this commit, JUnit 4.11 has not yet been released. Therefore we are testing against a snapshot version [2], which has been uploaded to repo.springsource.org [3] for easy access. Note that this artifact may be removed when JUnit 4.11 goes GA. - Care has been taken to ensure that spring-test's compile-time dependency on JUnit remains at 4.10. This means that the spring-test pom.xml will continue to have an optional <dependency> on JUnit 4.10, instead of the 4.11 snapshot. - For reasons not fully understood, the upgrade to the 4.11 snapshot of junit-dep caused NoSuchMethodErrors around certain Hamcrest types, particularly CoreMatchers and Matchers. import statements have been updated accordingly throughout affected test cases. - Runtime errors also occurred around uses of JUnit @Rule and ExpectedException. These have been reverted to use simpler mechanisms like @Test(expected) in the meantime. - Some test methods with order-based dependencies on one another have been renamed in order to fall in line with JUnit 4.11's new method ordering (as opposed to actually fixing the inter-test dependencies). In other areas, the fix was as simple as adding a tearDown method and cleaning up state. - For no apparent reason, the timeout in AspectJAutoProxyCreatorTests' testAspectsAndAdvisorNotAppliedToPrototypeIsFastEnough method begins to be exceeded. Prior to this commit the timeout value was 3000 ms; on the CI server under Linux/JDK6 and JDK7, the test begins taking anywhere from 3500-5500 ms with this commit. It is presumed that this is an incidental artifact of the upgrade to JUnit 4.11. In any case, there are no changes to src/main in this commit, so this should not actually represent a performance risk for Spring Framework users. The timeout has been increased to 6000 ms to accommodate this situation. [1]: https://github.com/KentBeck/junit/pull/293 [2]: https://github.com/downloads/KentBeck/junit/junit-dep-4.11-SNAPSHOT-20120805-1225.jar [3]: https://repo.springsource.org/simple/ext-release-local/junit/junit-dep/4.11.20120805.1225 Issue: SPR-9783
12 years ago
}
configure(subprojects.findAll { (it.name != "spring-core-coroutines") } ) { subproject ->
apply from: "${gradleScriptDir}/publish-maven.gradle"
jar {
manifest.attributes["Implementation-Title"] = subproject.name
manifest.attributes["Implementation-Version"] = subproject.version
manifest.attributes["Automatic-Module-Name"] = subproject.name.replace('-', '.') // for Jigsaw
manifest.attributes["Created-By"] =
"${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
from("${rootProject.projectDir}/src/docs/dist") {
include "license.txt"
include "notice.txt"
into "META-INF"
expand(copyright: new Date().format("yyyy"), version: project.version)
}
}
javadoc {
description = "Generates project-level javadoc for use in -javadoc jar"
Eliminate all Javadoc warnings - Support external Javadoc links using Gradle's javadoc.options.links - Fix all other Javadoc warnings, such as typos, references to non-existent (or no longer existent) types and members, etc, including changes related to the Quartz 2.0 upgrade (SPR-8275) and adding the HTTP PATCH method (SPR-7985). - Suppress all output for project-level `javadoc` tasks in order to hide false-negative warnings about cross-module @see and @link references (e.g. spring-core having a @see reference to spring-web). Use the `--info` (-i) flag to gradle at any time to see project-level javadoc warnings without running the entire `api` task. e.g. `gradle :spring-core:javadoc -i` - Favor root project level `api` task for detection of legitimate Javadoc warnings. There are now zero Javadoc warnings across the entirety of spring-framework. Goal: keep it that way. - Remove all @link and @see references to types and members that exist only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+ respectively. This is necessary because only one version of each of these dependencies can be present on the global `api` javadoc task's classpath. To that end, the `api` task classpath has now been customized to ensure that the Servlet 3 API and Hibernate Core 4 jars have precedence. - SPR-8896 replaced our dependency on aspectjrt with a dependency on aspectjweaver, which is fine from a POM point of view, but causes a spurious warning to be emitted from the ant iajc task that it "cannot find aspectjrt on the classpath" - even though aspectjweaver is perfectly sufficient. In the name of keeping the console quiet, a new `rt` configuration has been added, and aspectjrt added as a dependency to it. In turn, configurations.rt.asPath is appended to the iajc classpath during both compileJava and compileTestJava for spring-aspects. Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
12 years ago
options.encoding = "UTF-8"
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = project.name
options.use = true
Eliminate all Javadoc warnings - Support external Javadoc links using Gradle's javadoc.options.links - Fix all other Javadoc warnings, such as typos, references to non-existent (or no longer existent) types and members, etc, including changes related to the Quartz 2.0 upgrade (SPR-8275) and adding the HTTP PATCH method (SPR-7985). - Suppress all output for project-level `javadoc` tasks in order to hide false-negative warnings about cross-module @see and @link references (e.g. spring-core having a @see reference to spring-web). Use the `--info` (-i) flag to gradle at any time to see project-level javadoc warnings without running the entire `api` task. e.g. `gradle :spring-core:javadoc -i` - Favor root project level `api` task for detection of legitimate Javadoc warnings. There are now zero Javadoc warnings across the entirety of spring-framework. Goal: keep it that way. - Remove all @link and @see references to types and members that exist only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+ respectively. This is necessary because only one version of each of these dependencies can be present on the global `api` javadoc task's classpath. To that end, the `api` task classpath has now been customized to ensure that the Servlet 3 API and Hibernate Core 4 jars have precedence. - SPR-8896 replaced our dependency on aspectjrt with a dependency on aspectjweaver, which is fine from a POM point of view, but causes a spurious warning to be emitted from the ant iajc task that it "cannot find aspectjrt on the classpath" - even though aspectjweaver is perfectly sufficient. In the name of keeping the console quiet, a new `rt` configuration has been added, and aspectjrt added as a dependency to it. In turn, configurations.rt.asPath is appended to the iajc classpath during both compileJava and compileTestJava for spring-aspects. Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
12 years ago
options.links(project.ext.javadocLinks)
options.addStringOption("Xdoclint:none", "-quiet")
Eliminate all Javadoc warnings - Support external Javadoc links using Gradle's javadoc.options.links - Fix all other Javadoc warnings, such as typos, references to non-existent (or no longer existent) types and members, etc, including changes related to the Quartz 2.0 upgrade (SPR-8275) and adding the HTTP PATCH method (SPR-7985). - Suppress all output for project-level `javadoc` tasks in order to hide false-negative warnings about cross-module @see and @link references (e.g. spring-core having a @see reference to spring-web). Use the `--info` (-i) flag to gradle at any time to see project-level javadoc warnings without running the entire `api` task. e.g. `gradle :spring-core:javadoc -i` - Favor root project level `api` task for detection of legitimate Javadoc warnings. There are now zero Javadoc warnings across the entirety of spring-framework. Goal: keep it that way. - Remove all @link and @see references to types and members that exist only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+ respectively. This is necessary because only one version of each of these dependencies can be present on the global `api` javadoc task's classpath. To that end, the `api` task classpath has now been customized to ensure that the Servlet 3 API and Hibernate Core 4 jars have precedence. - SPR-8896 replaced our dependency on aspectjrt with a dependency on aspectjweaver, which is fine from a POM point of view, but causes a spurious warning to be emitted from the ant iajc task that it "cannot find aspectjrt on the classpath" - even though aspectjweaver is perfectly sufficient. In the name of keeping the console quiet, a new `rt` configuration has been added, and aspectjrt added as a dependency to it. In turn, configurations.rt.asPath is appended to the iajc classpath during both compileJava and compileTestJava for spring-aspects. Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
12 years ago
// Suppress warnings due to cross-module @see and @link references.
// Note that global 'api' task does display all warnings.
Eliminate all Javadoc warnings - Support external Javadoc links using Gradle's javadoc.options.links - Fix all other Javadoc warnings, such as typos, references to non-existent (or no longer existent) types and members, etc, including changes related to the Quartz 2.0 upgrade (SPR-8275) and adding the HTTP PATCH method (SPR-7985). - Suppress all output for project-level `javadoc` tasks in order to hide false-negative warnings about cross-module @see and @link references (e.g. spring-core having a @see reference to spring-web). Use the `--info` (-i) flag to gradle at any time to see project-level javadoc warnings without running the entire `api` task. e.g. `gradle :spring-core:javadoc -i` - Favor root project level `api` task for detection of legitimate Javadoc warnings. There are now zero Javadoc warnings across the entirety of spring-framework. Goal: keep it that way. - Remove all @link and @see references to types and members that exist only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+ respectively. This is necessary because only one version of each of these dependencies can be present on the global `api` javadoc task's classpath. To that end, the `api` task classpath has now been customized to ensure that the Servlet 3 API and Hibernate Core 4 jars have precedence. - SPR-8896 replaced our dependency on aspectjrt with a dependency on aspectjweaver, which is fine from a POM point of view, but causes a spurious warning to be emitted from the ant iajc task that it "cannot find aspectjrt on the classpath" - even though aspectjweaver is perfectly sufficient. In the name of keeping the console quiet, a new `rt` configuration has been added, and aspectjrt added as a dependency to it. In turn, configurations.rt.asPath is appended to the iajc classpath during both compileJava and compileTestJava for spring-aspects. Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
12 years ago
logging.captureStandardError LogLevel.INFO
logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message
}
task sourcesJar(type: Jar, dependsOn: classes) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
classifier = "sources"
from sourceSets.main.allSource
// Don't include or exclude anything explicitly by default. See SPR-12085.
}
task javadocJar(type: Jar) {
classifier = "javadoc"
from javadoc
}
artifacts {
archives sourcesJar
archives javadocJar
}
}
configure(rootProject) {
description = "Spring Framework"
apply plugin: "groovy"
apply plugin: "io.spring.nohttp"
apply from: "${gradleScriptDir}/jdiff.gradle"
apply from: "${gradleScriptDir}/docs.gradle"
nohttp {
source.exclude "**/test-output/**"
whitelistFile = project.file("src/nohttp/whitelist.lines")
def projectDirURI = project.projectDir.toURI()
allprojects.forEach { p ->
def outURI = p.file("out").toURI()
def pattern = projectDirURI.relativize(outURI).path + "**"
source.exclude pattern
}
}
dependencyManagement {
imports {
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
}
}
// Don't publish the default jar for the root project
configurations.archives.artifacts.clear()
dependencies { // for integration tests
testCompile(project(":spring-aop"))
testCompile(project(":spring-beans"))
testCompile(project(":spring-context"))
testCompile(project(":spring-core"))
testCompile(project(":spring-expression"))
testCompile(project(":spring-jdbc"))
testCompile(project(":spring-orm"))
testCompile(project(":spring-test"))
testCompile(project(":spring-tx"))
testCompile(project(":spring-web"))
testCompile("javax.inject:javax.inject:1")
testCompile("javax.resource:javax.resource-api:1.7.1")
testCompile("javax.servlet:javax.servlet-api:3.1.0")
testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
testCompile("org.hibernate:hibernate-core:5.1.17.Final")
asciidoctor("io.spring.asciidoctor:spring-asciidoctor-extensions:0.1.3.RELEASE")
}
artifacts {
archives docsZip
archives schemaZip
archives distZip
}
}