提交 155b88ff 编写于 作者: S Sam Brannen 提交者: Chris Beams

Improve dependency management for spring-test

In Spring 3.1 the spring-test Maven artifact did not have a required
dependency on spring-core, but there is practically no part of
spring-test that can be used without spring-core. Most test utilities
that are intended to be stand-alone utilities in fact use utility
classes from spring-core (e.g., ReflectionTestUtils). Even some of the
web mocks/stubs use spring-core (e.g., DelegatingServletInputStream).

In addition, the current Gradle build configuration for the spring-test
module is very simplistic -- in that it does not explicitly list any
optional dependencies such as the Servlet and Portlet APIs -- and it
defines a 'compile' dependency on spring-webmvc-portlet.

The resulting Maven dependencies in the generated POM are therefore not
what a typical consumer of the spring-test artifact would reasonably
expect.

To address these issues, the Gradle build configuration for the
spring-test module now explicitly defines the following 'compile'
dependencies:

 - spring-core
 - spring-webmvc, optional
 - spring-webmvc-portlet, optional
 - junit, optional
 - testng, optional
 - servlet-api, optional
 - jsp-api, optional
 - portlet-api, optional
 - activation, provided

The only required dependency is now spring-core; all other dependencies
are 'optional'.

Issue: SPR-8861
上级 9b10d38e
......@@ -423,11 +423,15 @@ project('spring-webmvc-portlet') {
project('spring-test') {
description = 'Spring TestContext Framework'
dependencies {
compile project(":spring-webmvc-portlet")
compile("javax.activation:activation:1.0", provided)
compile("org.testng:testng:6.5.2", optional)
compile project(":spring-core")
compile(project(":spring-webmvc"), optional)
compile(project(":spring-webmvc-portlet"), optional)
compile("junit:junit:4.10", optional)
compile("javax.servlet:servlet-api:2.5", provided)
compile("org.testng:testng:6.5.2", optional)
compile("javax.servlet:servlet-api:2.5", optional)
compile("javax.servlet.jsp:jsp-api:2.1", optional)
compile("javax.portlet:portlet-api:2.0", optional)
compile("javax.activation:activation:1.0", provided)
testCompile "org.slf4j:slf4j-jcl:1.5.3"
}
}
......
......@@ -32,6 +32,15 @@ Changes in version 3.2 M1
* support executor qualification with @Async#value (SPR-6847)
* add convenient WebAppInitializer base classes (SPR-9300)
* support initial delay attribute for scheduled tasks (SPR-7022)
* cache by-type lookups in DefaultListableBeanFactory (SPR-6870)
* merge rather than add URI vars to data binding values (SPR-9349)
* support not (!) operator for profile selection (SPR-8728)
* fix regression in ClassPathResource descriptions (SPR-9413)
* improve documentation of @Bean 'lite' mode (SPR-9401)
* improve documentation of annotated class support in the TestContext framework (SPR-9401)
* document support for JSR-250 lifecycle annotations in the TestContext framework (SPR-4868)
* improve dependency management for spring-test (SPR-8861)
Changes in version 3.1.1 (2012-02-16)
-------------------------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册