Commit Graph

304 Commits

Author SHA1 Message Date
Rossen Stoyanchev de899820c9 Add Message, MessageChannel and refactor stomp support 2013-06-09 19:36:46 -04:00
Sam Brannen 96da406057 Upgrade to TestNG 6.8.5
Issue: SPR-10638
2013-06-08 20:21:06 +02:00
Stevo Slavic ecf8464d2f Replace MaxPermSize use in build scripts
Since JDK 8 is required to build Spring framework 4, and permanent
generation is gone from Java 8, to eliminate warnings about no longer
available MaxPermSize switch, it should be removed or replaced with new
MaxMetaspaceSize switch.

This fix replaces old with new switch to limit the amount of native
memory used for class metadata.

Issue: SPR-10571
2013-06-03 14:09:33 -07:00
Rossen Stoyanchev 4de40fad8e Refactor STOMP package and class names 2013-05-30 15:29:20 -04:00
Rossen Stoyanchev 3eac62925b Add basic stomp error handling 2013-05-30 15:28:42 -04:00
Rossen Stoyanchev 730d456e84 Add early STOMP/reactor support 2013-05-30 15:28:42 -04:00
Rossen Stoyanchev 827e20e37f Upgrade javax.websocket and tyrus dependencies to 1.0 2013-05-30 15:25:01 -04:00
Dave Syer 7860af8624 Make CommandLinePropertySource enumerable
JOpt 4.4 has enumerable options, so this change can be made
if we upgrade. The only awkward thing is that JOpt allows
aliases for options, so we have to pick one to avoid double
counting. This implementation picks the last one in the list
which is the alphebtically last of the long options, if there
are any (e.g. "o1", "option1" returns "option1"). Most of the
time there will only be one or two aliases for each option so
it won't matter.

Issue: SPR-10579
2013-05-28 12:57:01 +02:00
Rossen Stoyanchev 9ca03cf772 Upgrade spring-websocket to Jetty 9.0.3 2013-05-14 14:30:55 -04:00
Rob Winch 6a5acb9372 Update to Gradle 1.6 2013-05-14 12:24:00 -05:00
Phillip Webb 13e460827e Fix external Javadoc references. 2013-05-08 15:16:18 -07:00
Juergen Hoeller cd1c584243 Reordered spring-websocket module descriptor 2013-05-08 00:02:14 +02:00
Juergen Hoeller 1ca943c681 Fixed javadoc warnings
Issue: SPR-10373
2013-05-07 21:26:01 +02:00
Phillip Webb a22bb43c0c Include cglib repack in core 2013-05-06 15:29:36 -07:00
Rossen Stoyanchev 37c6a94905 Update deps for spring-websocket 2013-05-06 16:42:42 -04:00
Rossen Stoyanchev e7f38e5b17 Merge branch 'websocket' 2013-05-06 14:46:29 -04:00
Juergen Hoeller 255eab5bed Jaxb2Marshaller doesn't need to depend on ResourceLoaderAware
Issue: SPR-10512
2013-05-03 17:23:24 +02:00
Rossen Stoyanchev 4faf0d265f Rename classes 2013-05-02 20:25:09 -04:00
Juergen Hoeller 767bd3f3f8 Upgraded to Jackson 1.9 (raising minimum to 1.8+) and 2.2 2013-05-02 15:51:59 +02:00
Rossen Stoyanchev 46bcffcf30 Add JettyWebSocketClient
Also split out JSR-356 related configuration and load it conditionally.
2013-04-30 17:35:20 -04:00
Juergen Hoeller 657bd80bf9 Removed unnecessary CGLIB 2.2 dependency from spring-test-mvc module 2013-04-30 22:09:17 +02:00
Juergen Hoeller 161530da21 Temporarily deactivated DetectSplitPackagesPlugin due to failure on JDK 8 on CI server 2013-04-30 17:07:01 +02:00
Juergen Hoeller 89de99e871 Fixed javadoc build on JDK 8 (deactivating the super-strict doclint checks) 2013-04-30 15:56:40 +02:00
Juergen Hoeller 1295c6f340 Upgraded to Hessian 4.0.7; deprecated Burlap support 2013-04-30 15:13:23 +02:00
Sam Brannen cb2ffb79e4 Set Ant build.compiler to javac1.7 2013-04-28 12:39:27 +02:00
Phillip Webb a14161f0ca JettyRequestUpgradeStrategy 2013-04-23 13:47:43 -07:00
Juergen Hoeller cd996ba18f Upgrading to JDK 1.8 bytecode along with ASM 4.1 patch
ASM has been patched to accept 1.8 bytecode simply through removing an assertion. As a consequence, we have an embedded copy of the ASM sources now instead of jarjar'ing the original ASM jar. The sources originate from ASM 4.1; for CGLIB 3.0 compatibility, a further assertion has been removed.

Issue: SPR-9639
2013-04-23 13:57:26 +02:00
Rossen Stoyanchev 592da431a8 Add Glassfish request upgrade strategy 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 4ad6091510 Debug and test SockJS server support 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 88447e503b Add first cut of SockJS server support 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev cdd7d7bd88 Add javax.websocket.Endpoint configuration support 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 4e67f809fb Add spring-websocket module 2013-04-15 11:03:23 -04:00
Phillip Webb db3bbb5f8c Update javadoc external links
Fix broken external javadoc links for URLs that have been recently
moved.
2013-03-29 19:48:42 -07:00
Juergen Hoeller 184455d630 Upgraded to Hibernate 4.2.0
HibernateJpaDialect's HibernateConnectionHandle does not call close() for Hibernate 4.x anymore, since on 4.2, the exposed Connection handle isn't a "borrowed connection" wrapper but rather the actual underlying Connection - with a close() call immediately returning the Connection to the pool and making the local handle invalid for further use within the transaction.

Also using JPA 2.0's EntityManager unwrap method now for retrieving the underlying Hibernate Session.

Issue: SPR-10395
2013-03-30 01:34:18 +01:00
Juergen Hoeller 6d710563cc Upgraded to Commons FileUpload 1.3 and JSF 2.1, removing deprecated JSF 1.1 VariableResolvers 2013-03-29 22:51:42 +01:00
Juergen Hoeller 15441da969 Removed Apache Commons HttpClient support (superseded by Apache HttpComponents) 2013-03-29 15:03:55 +01:00
Juergen Hoeller 8fab14dfeb Upgraded to JasperReports 5.0 (preserving compatibility with all previous releases) and POI 3.9 (preserving compatibility with POI 3.5+) 2013-03-29 14:52:30 +01:00
Juergen Hoeller e0c56a124a Consistently refer to most recent version of javax.el, in order to be compatible with Hibernate Validator 5.0 when doing integration tests
Issue: SPR-8199
2013-03-28 21:55:47 +01:00
Juergen Hoeller 52fd84bb57 JTA 1.2 support, in particular for the javax.transaction.Transactional annotation
Issue: SPR-9139
2013-03-27 22:33:17 +01:00
Juergen Hoeller 0d23a9d4a6 Upgraded integration test dependencies to Servlet 3.0 as well 2013-03-20 17:39:15 +01:00
Juergen Hoeller deba32cad9 Upgraded all Servlet API mocks to Servlet 3.0 (with a little bit of Servlet 3.1 support in MockHttpServletResponse) 2013-03-20 17:19:34 +01:00
Juergen Hoeller d03de21d62 Removed explicit JAXB 2.1 dependency (included in JDK 1.7 anyway) 2013-03-20 12:26:07 +01:00
Juergen Hoeller e3fe9b1171 Upgraded to Quartz 1.8 and Velocity 1.7 2013-03-19 23:02:57 +01:00
Juergen Hoeller f0ffb1edc6 Removed spring-struts module (Struts 1.x support) 2013-03-19 18:38:16 +01:00
Juergen Hoeller ceb9a05ecb General JPA 2.0+ requirement; upgraded build and tests to EclipseLink 2.4, OpenJPA 2.2, Hibernate 3.6 2013-03-19 18:34:04 +01:00
Juergen Hoeller 7331937511 Raised source and target compatibility to JDK 1.6 2013-03-19 12:28:28 +01:00
Phillip Webb 05765d7520 Replace EasyMock with Mockito
Issue: SPR-10126
2013-03-06 11:06:15 -08:00
Rob Winch 21a49ef4c5 Polish whitespace in *.aj
Previously we had restored the whitespace for *.aj files in 6888a6f28
to avoid a but in aspectj.

We have updated to the latest version of apsectj and restored the
changes in commit 6888a6f28 which included a significant cleanup of
whitespace.

Issue: SPR-10208
2013-02-27 15:06:11 -06:00
Phillip Webb 01a6a110c9 Upgrade docbook-reference-plugin to 0.2.6 2013-02-26 09:46:23 -08:00
Phillip Webb 2642cf2e05 Replace EasyMock with Mockito in spring-jms
Issue: SPR-10126
2013-02-10 12:19:39 -08:00
Phillip Webb 1c724069c3 Improve presentation of code blocks in Javadoc
Include custom javadoc css that formats <pre class="code"> blocks.

Issue: SPR-10155
2013-02-04 15:05:08 -08:00
Phillip Webb bc80d25b49 Restore compile dependencies in generated POMs
Ensure that merge projects do not downgrade the compile time
dependencies of the projects that they are merged into.

This commit restores the scope of the following dependencies which
were inadvertently changed between Spring 3.2.0 and 3.2.1:

    spring-orm
    -> spring-tx
    -> spring-jdbc

    spring-webmvc
    -> spring-context
    -> spring-web

    spring-test
    -> spring-webmvc

Issue: SPR-10218
2013-01-25 16:45:30 -08:00
Phillip Webb 7f928e83ff Change merge.into project dependencies to provided
Change 'compile' dependencies to 'provided' for projects that are
merged into other projects. This seems to prevent '-sources' and
'-javadoc' jars from appearing on the classpath which can break
javadoc generation.
2013-01-23 15:19:33 -08:00
Rossen Stoyanchev 8e1685caef Fix ClassCastException in TilesConfigurer
Issue: SPR-10195
2013-01-21 12:01:42 -05:00
Chris Beams 06017e7ecc Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Ensure -PtestGroups is passed through to unit tests
2013-01-21 14:00:21 +01:00
Chris Beams 4dc3fcecbd Ensure -PtestGroups is passed through to unit tests
Issue: SPR-9984
2013-01-21 13:57:32 +01:00
Chris Beams 19445508b3 Polish build.gradle 2013-01-16 08:55:58 +01:00
Phillip Webb 5ddc313bef Upgrade to prop-deps gradle plugin 0.0.3 2013-01-11 15:07:06 -08:00
Phillip Webb 2db7a12288 Generate eclipse project settings from gradle
Update gradle to generate the following project specific eclipse
settings:

- Java formatting
- Cleanup options
- Warning settings
- Code template with copyright header
- WTP module meta-data

In addition this commit changes the eclipse project .classpath file
to output test and main classes to different folders. This is required
to prevent eclipse WTP from packaging test classes into /WEB-INF/lib
jar files.

Issue: SPR-9518
2013-01-11 12:43:16 -08:00
Sam Brannen 5b147bfba8 Improve speed of spring-test build
- Now excluding *TestSuite classes from the JUnit test task.
- Renamed SpringJUnit4SuiteTests to SpringJUnit4TestSuite so that it is
  no longer executed in the build.
- Reduced sleep time in various timing related tests.
2013-01-11 21:31:46 +01:00
Chris Beams 54d2846816 Merge pull request #214 from glyn/SPR-9990
# By Chris Beams (2) and others
* SPR-9990:
  Refactor detect-split-packages Gradle plugin
  Replace space indentation with tabs
  Rework split package detection code
  Example SplitPackageDetectorPlugin
  Detect split packages at build time
2013-01-11 15:55:33 +01:00
Chris Beams 654c07db34 Refactor detect-split-packages Gradle plugin
- Use conventional plugin naming, i.e. "detect-split-packages" instead
   of applying plugin based on fully-qualified class name

 - Rename "diagnose" => "detect" consistently throughout plugin, task
   and method names and generally refactor naming throughout to follow
   "detect split packages" phrasing

 - Add Javadoc to DetectSplitPackagesPlugin

 - Improve error reporting when split packages are detected

   Upon detecting one or more split packages, `detectSplitPackages` now
   fails idiomatically, throwing a GradleException to signal task failure
   (as opposed to the previous approach of using an assert assertion), and
   the output reads as follows:

       $ gradle detectSplitPackages
       [...]
       :buildSrc:build UP-TO-DATE
       :detectSplitPackages FAILED

       FAILURE: Build failed with an exception.

       * What went wrong:
       Execution failed for task ':detectSplitPackages'.
       > The following split package(s) have been detected:
          - org.springframework.beans (split across spring-beans and spring-orm)
          - org.springframework.core.env (split across spring-context and spring-core)

 - DetectSplitPackagesTask now automatically attaches itself to `check`
   task lifecycle if the enclosing project contains a `check` task

 - DetectSplitPackagesTask adds itself to the 'Verification' task group,
   ensuring that it shows up correctly in `gradle tasks` task listings

 - packagesToScan now defaults to all subprojects; users may then
   customize this by removing individual subprojects from the collection

Issue: SPR-9990
2013-01-11 15:54:11 +01:00
Chris Beams b8f408ed5f Replace space indentation with tabs
Issue: SPR-9990
2013-01-11 15:44:00 +01:00
Phillip Webb a0e5394203 Exclude stax test dependency
Exclude transitive stax 1.0 dependency to prevent compile time
eclipse errors.
2013-01-10 23:17:34 -08:00
Sam Brannen 4ae9cf7cf1 Ensure JUnit & TestNG tests run in spring-test
Prior to this commit, the Gradle build configuration only executed
TestNG-based tests and effectively disabled all JUnit-based tests in the
spring-test module. Furthermore, TestNG-based tests were not properly
reported in Bamboo CI builds.

This commit ensures that both JUnit and TestNG tests are executed in the
Gradle build by defining a new testNG task within the spring-test
configuration. The test task now depends on the new testNG task.
Furthermore, the testNG task makes use of Gradle 1.3's support for
generating test reports for TestNG tests alongside reports for JUnit
tests. The net effect is that all tests are executed and reportedly
properly in Bamboo builds on the CI server.

- Enabled both JUnit and TestNG tests for the spring-test module.
- Corrected bugs in FailingBeforeAndAfterMethodsTests introduced in
  commit 3d1b3868fe.
- Deleted the now obsolete SPR-9398.txt file.

Issue: SPR-9398
2013-01-10 16:42:44 +01:00
Phillip Webb 1386479d6c Merge branch 'SPR-10126' into cleanup-3.2.x
* SPR-10126:
  Replace EasyMock with Mockito in spring-orm
2013-01-09 17:43:25 -08:00
Phillip Webb ee1ddc90ec Replace EasyMock with Mockito in spring-orm
Issue: SPR-10126
2013-01-09 17:42:12 -08:00
Phillip Webb f92f58d0b3 Gradle 'api' task depends on 'jar' tasks
Update the gradle 'api' task to depend on the 'jar' task of all
subprojects. This intern ensures that the 'asmRepackJar' and
'cglibRepackJar' tasks run which is critical for JavaDoc
generation.
2013-01-07 13:10:22 -08:00
Glyn Normington 2df08bdfbd Rework split package detection code
Allow packages to be split across projects which will be merged into a
single JAR file.

Make split package detection a dependency of the 'check' task. This
is idiomatic gradle as well as allowing the 'test' task (another
dependency of 'check') to be executed without split packages being
detected.

Omit the project spring-instructment-tomcat from the check on the basis
of SPR-10150.

Issues: SPR-9990, SPR-10150

Conflicts:

	build.gradle
2013-01-07 13:49:44 +00:00
Rob Winch a27a3be76c Example SplitPackageDetectorPlugin 2013-01-07 13:48:17 +00:00
Glyn Normington 00a86c3722 Detect split packages at build time
Split packages are a well-known anti-pattern for OSGi and a blocker for
Eclipse Virgo (which prevents split packages being accessed via its
Import-Library construct).

Split packages are also unhelpful with a traditional linear classpath
as a split package name does not uniquely identify the Spring framework
JAR from which it came, thus complicating problem diagnosis and
maintenance.

Juergen Hoeller supports this position in the following comment in
SPR-9990:

>FWIW, I generally find split packages a bad practice, even without
>OSGi in the mix. For the Spring Framework codebase, I consider a
>split-package arrangement a design accident that we want to detect
>in any case - and that we're willing to fix if it happened.
>
>I'm actually equally concerned about the source perspective: After
>all, we want a package to be comprehensible from a single glance
>at the project, not requiring the developer to jump into several
>source modules to understand the overall layout of a package.

Split packages have crept into Spring framework twice in recent months
- see SPR-9811 and SPR-9988. Currently, they are only detected once
the Spring framework has been converted to OSGi bundles and these
bundles have been tested with Eclipse Virgo.

This commit adds a build-time check for split packages to the Spring
framework build.

Issue: SPR-9990

Conflicts:

	build.gradle
2013-01-07 13:47:44 +00:00
Chris Beams bd1db73a17 Merge branch 'share-test-classes' into cleanup-3.2.x
* share-test-classes:
  Polish test sourceSet dependencies
  Add test dependencies sources for testCompile
2013-01-04 09:55:19 +01:00
Phillip Webb 16a3a8bda8 Polish test sourceSet dependencies
Remove all direct sourceSets.test.output dependencies and instead rely
on the 'test-source-set-dependencies' plugin.

This commit also updates the api JavaDoc task to ensure that
dependencies are not resolved too early.
2013-01-04 09:39:27 +01:00
Chris Beams 1487b70394 Merge branch 'SPR-10124' into cleanup-3.2.x
* SPR-10124:
  Use unmodified 'version' when not on a topic branch
2013-01-03 23:56:31 +01:00
Chris Beams 7d6161f280 Use unmodified 'version' when not on a topic branch 2013-01-03 23:54:52 +01:00
Chris Beams 3b5e90d242 Merge branch 'SPR-8116' into cleanup-3.2.x
* SPR-8116:
  Enable execution of TestNG tests in spring-test
2013-01-03 22:14:30 +01:00
Chris Beams ab16af5c50 Merge branch 'SPR-10124' into cleanup-3.2.x
* SPR-10124:
  Polish support for topic branch-specific versions
2013-01-03 22:09:18 +01:00
Chris Beams 3cbb136861 Enable execution of TestNG tests in spring-test
Both JUnit- and TestNG-based tests are once again executed in the
spring-test module.

Note that two lines in FailingBeforeAndAfterMethodsTests had to be
commented out. See diff or `git grep 'See SPR-8116'` for details.

Issue: SPR-8116
2013-01-03 19:34:29 +01:00
Chris Beams 44a7e77e6d Polish support for topic branch-specific versions
Issue: SPR-10124
2013-01-03 19:31:51 +01:00
Chris Beams 830d73b4a7 Eliminate EBR dependencies and repository config
Swap the following EBR-specific dependencies for their equivalents at
Maven Central:

 - atinject-tck
 - jaxb
 - xmlbeans

Remove the /ebr-maven-external repository from the build script entirely
such that all dependencies are now resolved against a single repository:

    http://repo.springsource.org/libs-release
2013-01-03 19:19:25 +01:00
Chris Beams a2d80c6094 Polish build.gradle
- Consolidate shared test systemProperty declarations
 - Consolidate easymock dependency declarations
2013-01-03 19:08:48 +01:00
Phillip Webb c892b81852 Exclude spring-build-src from maven publish 2013-01-01 20:42:36 -08:00
Phillip Webb 65fb26f847 Move spring-build-junit into spring-core
Move code from spring-build-junit into spring-core/src/test along with
several other test utility classes. This commit removes the temporary
spring-build-junit project introduced in commit
b083bbdec7.
2013-01-01 19:49:45 -08:00
Phillip Webb 290aa5d647 Develop a gradle plugin to add test dependencies
Develop a gradle plugin to automatically update testCompile dependencies
to include the test source sets of project dependencies.

Allows the gradle build to more closely mirror the way that tests run
inside eclipse.
2013-01-01 17:30:28 -08:00
Phillip Webb 57d68b070e Expose Gradle buildSrc for IDE support
Create 'spring-build-src' Gradle module that exposes the buildSrc
folder as an IDE project.
2013-01-01 14:53:42 -08:00
Phillip Webb 9364043a64 Upgrade to xmlunit version 1.3 2013-01-01 13:26:49 -08:00
Phillip Webb b083bbdec7 Introduce 'spring-build-junit' subproject
Introduce new 'spring-build-junit' subproject containing shared
JUnit utilities and classes to be used by other test cases. This
project is for internal use within the framework, and therefore
creates no artifacts to be published to any repository.

The initial code includes support for JUnit Assumptions that can
be used to determine when a test should run. Tests can be skipped
based on the running JDK version, logging level or based on specific
'groups' that have activated via a Gradle property.

It is intended that sources within the spring-build-junit project be
folded into spring-core/src/test/java, pending some Gradle work that
will facilitate sharing test output across subprojects; therefore this
commit should be seen as a temporary solution.

Issue: SPR-9984
2012-12-28 23:08:37 +01:00
Phillip Webb d66c733ef4 Replace EasyMock with Mockito in test sources
Issue: SPR-10126
2012-12-28 23:07:04 +01:00
Chris Beams 6f0c7eb8c1 Update test source and target JDK compatibility
"test" source and target compatibility has been upgraded to 1.7 except
where noted, allowing us to use 1.7 language features such as
diamond-style (<>) generics declarations, automatic resource management
and multi-catch. More importantly, we will be able to upgrade to 1.8
once it is available in order to make use of lambda expressions, etc in
our test cases.

IDE configurations must be relaxed to allow 1.7 across the board, as
neither Eclipse nor IDEA are clever enough to allow for different
language levels across production and test resources. See [1] for a
feature request on that front.

spring-oxm is a special case here, and has been pinned at 1.6
compatibility even for its test sources in order to avoid a class
verification error that JibX throws when encountering 1.7-level
bytecode [2].

Likewise with spring-orm, toplink encounters a similar class
verification error, so has been pinned to 1.6 for the time being.
When we remove the (already deprecated since 3.2) Toplink support
we can restore compatibility to 1.7.

[1]: http://youtrack.jetbrains.com/issue/IDEA-97814
[2]: http://jira.codehaus.org/browse/JIBX-465

Issue: SPR-10129
2012-12-28 23:04:44 +01:00
Phillip Webb 3ac45547cf Update -Xlint compiler warning output
Enable output for the compiler warnings that have been eliminated so
far. 'rawtypes', 'deprecation', and 'unchecked' remain suppressed until
these warnings can be fully eliminated as well.
2012-12-28 22:53:48 +01:00
Chris Beams 426b099965 Support snapshot versions qualified by branch name 2012-12-28 13:15:21 +01:00
Juergen Hoeller b73a7a8410 Added MappingJackson2MessageConverter for JMS
Issue: SPR-10099
2012-12-19 20:10:42 +01:00
Chris Beams 57468aded9 Upgrade reference plugin to version 0.2.4
Pick up fix for regression in version 0.2.3 that caused project-specific
images, e.g. diagrams not to be copied into the images/ folder, thereby
causing broken image links online and in the PDF.
2012-12-13 15:21:57 +01:00
Rob Winch b16bf2d83e Rm buildSrc/src/main/groovy from Eclipse Sources
Previously buildSrc/src/main/groovy was a source folder within Eclipse.
This caused build errors due to missing dependencies for Gradle.

This commit removes buildSrc/src/main/groovy from the source folders
within Eclipse to prevent errors from being displayed.
2012-12-12 12:24:40 -06:00
Chris Beams 4badf2503b Upgrade to AspectJ 1.7.1
This change upgrades the spring-framework build to AspectJ 1.7.1 to
ensure compatibility. We remain backward-compatible to at least AJ
1.6.12 (the previous version), and likely back to 1.6.7.

AJ 1.7 allows for weaving Java 7 bytecode, particularly with regard
to invokedynamic instructions, and furthermore makes improvements to
the aspectj language itself to allow users to take advantage of Java 7-
style language features within aspects. See [1] for details.

[1]: http://eclipse.org/aspectj/doc/released/README-170.html

Issue: SPR-10079
2012-12-12 13:33:21 +01:00
Chris Beams f26534700a 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
2012-12-12 12:55:10 +01:00
Chris Beams 8f90b487e2 Rename API and reference doc output dirs
Prior to this change, aggregated javadoc has been written to an 'api'
dir and reference docs into a 'reference' dir. This shorter naming is
desirable, but is not compatible with historical naming under 3.1.x as
defined by the Ant+Ivy Spring Build.

For example, URLs are currently as follows:

http://static.springsource.org/spring-framework/docs/3.1.3.RELEASE/javadoc-api
http://static.springsource.org/spring-framework/docs/3.1.x/javadoc-api
http://static.springsource.org/spring-framework/docs/current/javadoc-api

Particularly with regard to the 'current' link, we do not want to
break this url scheme with the shortened 'api' directory naming. Of
course this compatibility can be preserved with symlinks, but this makes
the release process that much more complicated and fragile.

This commit ensures that the naming is 'javadoc-api' and
'spring-framework-reference', consistent with historical convention.
We can always add a symlinking scheme to add the shorter 'api' and
'reference' options after the fact if desired.
2012-12-12 12:54:28 +01:00
Phillip Webb 6fed79cb10 Ensure buildSrc is only added once to eclipse 2012-12-10 20:54:56 -08:00
Phillip Webb 809d62e318 Add buildSrc to generated eclipse project
Post process the generated 'spring' eclipse project to include the
buildSrc/src/main/groovy folder.
2012-12-10 13:09:23 -08:00
Phillip Webb 42bbcc3220 Move Merge plugin into a build package structure 2012-12-10 00:32:00 -08:00
Phillip Webb 9e790829d9 Upgrade reference plugin to version 0.2.3
Upgrade to the latest reference plugin, providing slightly refined
titlepage and admon graphics.
2012-12-09 21:33:35 -08:00
Phillip Webb 87f7ecf907 Refactor merge-artifacts script to a plugin
Refactor the existing merge-artifacts script to a full Gradle plugin.
The new plugin uses a 'merge' extension in favor of Gradle 'ext'
configuration and can be applied to all projects in a multi-module
build.

Any project that defines a 'merge.into' project will now implicitly
receive a dependency to that project. Furthermore other projects
with a dependency on 'merge.into' will receive a direct project
link within the IDE. For example: 'spring-webmvc-tiles3'
is merged into 'spring-webmvc' and 'spring-test-mvc' depends
on 'spring-webmvc'. Within the IDE 'spring-test-mvc' will show
dependencies to both 'spring-webmvc' and 'spring-webmvc-tiles'.

Issue: SPR-10042
2012-12-09 21:33:35 -08:00
Phillip Webb 4551cfcdfc Remove superfluous exclusions from Gradle build
Remove several dependency exclusions from the Gradle build that are
no longer required and were not present in Spring 3.1.
2012-12-09 21:33:34 -08:00
Phillip Webb 0751b2cbeb Convert Gradle build to use new propdeps-plugin
Replace existing 'optional' and 'provided' Spring specific build
extensions with a new Gradle propdeps-plugin. Optional and Provided
dependencies are now defined use dependency configurations.

The new plugin does not currently support the notion of optional
runtime dependencies. All optional dependencies are implicitly
part of the 'compile' scope. This is an intentional design decision
that aims to keep both the plugin and the build simple. Since optional
dependencies are non-transitive this restriction should not cause
any real problems for existing users. The only existing dependency
affected is 'commons-io' in the 'spring-beans' project, however, this
was an optional compile scope dependency in the previous Spring 3.1
release.

Both provided and optional dependencies are no longer exported from
generated eclipse .classpath files. This fixes several tests that
would previously fail when running within eclipse. The servlet-api
specific elements of ide.gradle are also no longer required.

Issue: SPR-9656, SPR-10070
2012-12-09 21:33:34 -08:00
Phillip Webb 7cc406ffc7 Depend on javax.servlet for version 3.0 API
Replace tomcat servlet-api 3.0 dependencies with the javax.servlet
versions that are now available in the Maven central repository.
2012-12-09 21:33:34 -08:00
Phillip Webb 6103a7f1c1 Upgrade log4j dependency to version 1.2.17
Upgrade to the latest stable release of log4j. The previous 'jms'
and 'jmx' exclusions are not longer required since these have now
been marked as optional dependencies in the upstream POM.
2012-12-09 21:33:34 -08:00
Phillip Webb dc708c5baa Removed unused gradle import
Remove the unused ProjectDependency import from the Gradle build file.
2012-12-09 21:33:17 -08:00
Phillip Webb 22741b1fdc Use consistent Gradle dependency style
Update all Gradle files to use a consistent style when specifying
dependencies. All dependencies are now specified using parentheses,
for example:

   scope("group:artifat:version")
or scope(project(":projectname"))
2012-12-09 21:32:28 -08:00
Phillip Webb 90cfdbb040 Polish quote styles in gradle files
Replace singe quote-marks with double quote-marks when possible for a
more consistent style.
2012-12-09 21:32:27 -08:00
Phillip Webb a268528726 Polish .gradle file formatting to use tabs
Replace spaces with tabs for consistency with Java source code
2012-12-09 21:32:27 -08:00
Rossen Stoyanchev 6e7df513f1 Exclude jcl-over-slf4j from tiles-core dependency
tiles-core-3 brings in a dependency on jcl-overl-slf4 which causes
an slf4j delegation loop as explained at [1] when tests run inside
Eclipse. Other modules that depend on tiles-core like
(tiles-servlet, tiles-jsp) have also had the exclusion added since
they seem to bring it in as well.

[1] http://www.slf4j.org/codes.html#jclDelegationLoop
2012-12-07 16:10:38 -05:00
Rossen Stoyanchev 3643d92cb8 Fix issue with creating ServletRequestAttributes
Prevously the FrameworkServlet created a new ServletRequestAttributes
instance for every request, unless the RequestContextHolder already
contained an instance whose type is not ServletRequestAttributes.
The main intent was that if RequestContextHolder contains a
PortletRequestAttributes, it should be left in place.

This change does an "instanceof" check against the request in
RequestContextHolder instead of an "equals" check on the type.
It still leaves PortletRequestAttributes in place but also allows
the previous request to be any sub-class of ServletRequestAttributes.

Issue: SPR-10025
2012-12-07 15:19:38 -05:00
Rossen Stoyanchev 31cb14e03a Remove Spring Security sample tests in spring-test-mvc
Those tests as well as Spring Hateoas tests will be added to respective
projects instead.
2012-12-05 19:10:13 -05:00
Sam Brannen 2b4ecfad12 Upgrade to JUnit 4.11
This commit upgrades the compile dependency on JUnit in the spring-test
module as well as the global test dependency on JUnit for the entire
test suite to 4.11 GA.

In addition, the spring-test module now depends on junit:junit instead
of junit:junit-dep since, as of JUnit 4.11, the "junit" Maven artifact
no longer inlines hamcrest-core.

Issue: SPR-10044
2012-12-05 11:29:50 +01:00
Fredrik Sundberg a8589bf035 Replace dependency to aspectjrt with aspectjweaver
Replace the gradle dependency on aspectjrt with aspectjweaver since
aspectjrt is a subset of aspectjweaver and the full jar is required
by Spring. SPR-8896 fixed the original code issue, this change
just relates to the generated maven pom.

Issue: SPR-10072
2012-12-04 14:16:33 -08:00
Phillip Webb 1352222ea6 Upgrade reference plugin and remove custom xsl
Upgrade to docbook-reference-plugin v0.2.2 and remove custom xsl
styles in favor of plugin defaults. Modify some docbook source
files to work with newer style.
2012-12-04 14:08:21 -08:00
Sam Brannen 19d7cedcf2 Fix classpaths regarding slf4j versions
- Defined global slf4jVersion as '1.6.1' in the Gradle build.

 - Replaced dependencies on slf4j-log4j12 with slf4j-jcl where possible;
   however, spring-test-mvc still depends on jcl-over-slf4j and
   slf4j-log4j12 (see SPR-10070).

 - Reenabled HibernateSessionFlushingTests.

 - Verified that the following tests pass in the Gradle build and within
   Eclipse:
   - HibernateSessionFlushingTests
   - HibernateTransactionManagerTests (Hibernate 3)
   - HibernateTransactionManagerTests (Hibernate 4)
   - RequestResponseBodyMethodProcessorTests

Issue: SPR-9421, SPR-10066
2012-12-04 19:52:37 +01:00
Sam Brannen 53726612ee spring-orm should not build against cglib-repack
The previous commit by Juergen Hoeller upgraded spring-orm's Hibernate 3
dependency to 3.3.2.GA, and this commit removes the now unnecessary
dependency on org.hibernate:hibernate-cglib-repack:2.1_3.

Issue: SPR-10066
2012-12-04 18:25:47 +01:00
Juergen Hoeller 4e442471e1 Hibernate 3 support builds against standard Hibernate 3.3.2.GA artifact from Maven 2012-12-04 16:06:07 +01:00
Sam Brannen a3e4f6cad4 Use EasyMock 2.5.2 consistently across the build
This commit ensures that EasyMock version 2.5.2 is used consistently
across the test suite. This applies to both the easymock and
easymockclassextension artifacts. Using the same version for both of
these artifacts helps to better align us for a future upgrade to
EasyMock 3.0 since the Class Extension artifact is deprecated in 3.x
releases of the library.

Issue: SPR-10069
2012-12-04 00:01:06 +01:00
Rossen Stoyanchev 42a928596f Remove tiles-request-servlet-wildcard dependency
The tiles-request-servlet-wildcard contained only one class that is an
implementation of the tiles-request ServletApplicationContext using a
Spring ApplicationContext to look up resources. It makes sense for this
class to be part of the Spring Tiles 3 integration.

Issue: SPR-10054
2012-12-03 15:11:13 -05:00
Sam Brannen ab886b82ea Polish Gradle build script
- fixed typo
 - spring-test-mvc now builds against Hibernate Validator 4.3
2012-12-03 19:59:09 +01:00
Rob Winch 149e6f6425 polish web.Mock* classpath
Previously when running the tests for spring-web, spring-webmvc,
spring-test-mvc, and spring-orm there were possible collissions in the
classpath due to the fact that each had its own copy of the web.Mock*
classes in it. This causes uncertainty for which class the code was
running against. Furthermore, the maintance of keeping the copies up to
date was tedious.

Now there are two copies of the web.Mock* classes. The ones that exist
in spring-test main sources and a copy that supports servlet 3 within
spring-web test sources. The copy in spring-web test sources has been
moved to a new package to avoid having the classes exist twice on the
classpath within Eclipse.
2012-11-30 11:15:58 -05:00
Juergen Hoeller edd8d148bb Upgraded to Joda-Time 2.1, Groovy 1.8.8, JRuby 1.6.5; removed unnecessary dependencies 2012-11-29 23:28:25 +01:00
Phillip Webb ce7fa8a98e Upgrade to Gradle 1.3 2012-11-28 09:15:52 -08:00
Phillip Webb dfdb31715f Fix -XX:MaxHeapSize setting for Windows 2012-11-27 10:51:53 -08:00
Chris Beams 2deeb54a9b Merge pull requests #183 and #190
# By Rob Winch
# Via Rob Winch
* gradle-1116:
  Make GRADLE-1116 workaround more generic

# By Rob Winch
* spring-test-mvc-classpath:
  Fix spring-test-mvc Eclipse classpath
2012-11-27 09:09:16 +01:00
Rob Winch e7b8cd58db Fix spring-test-mvc Eclipse classpath 2012-11-27 09:07:29 +01:00
Rob Winch 6e8eede0bf Make GRADLE-1116 workaround more generic
Previously the workaround for GRADLE-1116 only worked for the
merge-dist.gradle projects

Now the workaround is more generic and fixes errors that have since
been introduced when performing a fresh import into Eclipse.
2012-11-26 20:07:55 -06:00
Rob Winch d7bf56df49 Remove reflection usage in orm.hibernate4.*
Previously reflection was required when interacting with Hibernate 4 in
order to support both Hibernate 3 and Hibernate 4 since there were
non-passive changes in the APIs. Now that the Spring build uses Gradle
it is trivial to support multiple Hibernate versions.

This commit removes the reflection usage in orm.hibernate4.* by
creating a spring-orm-hibernate4 module that uses
gradle/merge-artifacts.gradle to build a single artifact but keep
distinct classpaths.

Issue: SPR-10039
2012-11-26 22:47:10 +01:00
Phillip Webb b1040af22e Update maximum width of reference HTML
This change upgrade the framework to consume the newly-published
docbook-reference-plugin version 0.2.1 containing a maximum width
for the HTML reference guide.
2012-11-26 11:29:12 -08:00
Rossen Stoyanchev f30d33d32e Add spring-test-mvc tests with Spring HATEOAS links
Issue: SPR-9886
2012-11-26 13:00:00 -05:00
Chris Beams 1394050ed2 Update reference docs to a more modern CSS style
This change upgrade the framework to consume the newly-published
docbook-reference-plugin version 0.2.0, which includes among other
improvements a revamped CSS approach designed to look as similar
as possible to the way markdown files are rendered by GitHub.

See associated commit [1] at SpringSource's gradle-plugins repo for
further details.

Issue: SPR-10036

[1]: b209c350ed
2012-11-26 13:37:17 +01:00
Juergen Hoeller e2f418ab4c Added "transactionAware" bean property to EhCacheCacheManager and JCacheCacheManager
In the course of this enhancement, the "cache.ehcache" and "cache.jcache" packages moved from spring-context to the spring-context-support module, expecting further transaction-related functionality. Also aligns with the presence of Spring's Quartz support in the spring-context-support module, since Quartz and EHCache are sort of sister projects at Terracotta now.

Issue: SPR-9966
2012-11-25 21:58:35 +01:00
Chris Beams 631f24bb32 Introduce jdiff Gradle task
The new jdiff task generates a report of API differences between the
current version (i.e. the value of `version` in gradle.properties) and
any older version of the framework, as specified by -DOLD_VERSION at
the command line, or defaulting to `previousVersion` in
gradle.properties.

Running the command requires a separate clone directory pinned to the
desired old version, as specified by -DOLD_VERSION_ROOT at the command
line. This creates challenges from a build automation perspective,
largely because Gradle doesn't (yet) have APIs for working with Git.

This task may be further automated and included in nightly CI runs, but
in the meantime, a number of reports back to 3.1.3.RELEASE have been
generated manually and uploaded to [1], where one can now find the
following entries in the directory listing:

 - 3.1.3.RELEASE_to_3.2.0.RC1
 - 3.2.0.M1_to_3.2.0.M2
 - 3.2.0.M2_to_3.2.0.RC1
 - 3.2.0.RC1_to_3.2.0.BUILD-SNAPSHOT

Ideally, the final entry there would be kept up-to-date on a daily
basis - again we may revisit doing so in the future. Going forward,
reports will be generated and uploaded manually on an as needed basis
and as part of the release process.

The goal of these reports are as follows:

 - to ease the process of ensuring backward compatibility

 - to aid in code reviews, particularly when reviewing large pull
   requests

 - to ease the process of creating migration guides for project
   maintainers, i.e. to help us remember what's changed

 - to allow ambitious end-users to discover what's been changing at the
   API level without without needing to wait for detailed "what's new in
   version X" and/or migration guide documentation

See documentation in jdiff.gradle for usage details.

Note that the jdiff-1.1.1 distribution as downloaded from [2] has been
added wholesale to the source tree under gradle/jdiff instead of
uploading JDiff jars to repo.springsource.org as we would normally do.
This is due to some unfortunate limitations in the implementation of the
jdiff ant task that require a phisical JDIFF_HOME directory. Checking in
the jars and various resources represents the simplest and most
pragmatic solution to this problem, though ambitious contributors are
free to do what's necessary to arrive at a more elegant arrangement.

[1]: http://static.springframework.org/spring-framework/docs
[2]: http://sourceforge.net/projects/javadiff/files/latest/download

Issue: SPR-9957
2012-11-22 21:05:58 +01:00
Chris Beams d4fb1c8d63 Refactor Gradle script naming and organization
- inline test-mvc and tiles3 .gradle files for clarity
 - rename merge-dist.gradle to merge-artifacts.gradle
 - polish Javadoc for merge-artifacts.gradle
 - move merge-artifacts.gradle into gradle subdirectory
 - move publish-maven.gradle into gradle subdirectory
2012-11-22 20:48:26 +01:00
Rossen Stoyanchev 2a11007a04 Add Spring Framework integration with Tiles 3
Tiles 3 has modified packages and classes as well as additional
dependencies, notably "tiles-request-api", which is a request/response
abstraction independent of Servlet and JSP APIs.

In order to have both Tiles 2 and Tiles 3 integrations, the source for
the Tiles 3 integration is in a separate project spring-webmvc-tiles3.
The build process merges the compiled Tiles 3 integration classes into
the spring-webmvc module so in effect it contains both the Tiles 2 and
the Tiles 3 integrations.

This change originated as a pull request at spring-framework-issues:
https://github.com/SpringSource/spring-framework-issues/pull/30

And was additionally updated:
1f64be4aa5

Issue: SPR-8825
2012-11-20 12:24:08 -05:00
Rossen Stoyanchev 92ca8b32fb Add DefaultMvcResultTests 2012-11-16 09:48:12 -05:00
Rossen Stoyanchev 4812fcccc4 Remove dependency on hamcrest-lib from spring-mvc-test
The change removes the use of concrete Matcher implementations and thus
the dependency on hamcrest-lib leaving hamcrest-core as the only
(optional) hamcrest dependency.

Issue: SPR-9961
2012-11-07 17:06:56 -05:00
Chris Beams a64b04afa4 Prefix zip archives with 'spring-framework'
Prior to this change, zip archives were named

   spring-${version}-${classifier}.zip

e.g.:
 - spring-3.2.0.RC1-dist.zip
 - spring-3.2.0.RC1-docs.zip
 - spring-3.2.0.RC1-schema.zip

This commit updates the Gradle build script to ensure that the fully-
qualified 'spring-framework' name is used consistently, such that names
follow the pattern

   spring-framework-${version}-${classifier}.zip

This includes the naming of the root-level directory within the -dist
zip.

Issue: SPR-9954
2012-11-05 10:21:01 +01:00
Phillip Webb 856fb2ccac Move JRuby dependency below Joda
JRuby includes a copy of joda classes with the same package names.
This commit changes the order of the loaded jars to load the original
joda classes first.
2012-11-03 16:55:22 -07:00
Rossen Stoyanchev de38c033e4 Make hamcrest dependency optional in spring-test
Users of Spring MVC Test will need to list a hamcrest dependency --
either hamcrest-library or hamcrest-all.

Issue: SPR-9940
2012-11-02 12:20:13 -04:00
Rossen Stoyanchev 242bf7c4e3 Refine hamcrest dependency in spring-test-mvc project
1) removed the hamcrest-all dependency requirement and replaced it with
the more focused hamcrest-library dependency

2) added MatcherAssertionErrors as a replacement of
org.hamcrest.MatcherAssert, which in hamcrest 1.1 is only available
through the hamcrest-all dependency (and not in hamcrest-core nor in
the hamcrest embedded in JUnit 4.4 through 4.8)

3) changed the required hamcrest version from 1.1 to 1.3 and made sure
the spring-test-mvc project does not rely on newer hamcrest
functionality without checking if it is available first

Applications that already depend on older versions of hamcrest
(in particular 1.1) via hamcrest-library, hamcrest-all or as part of
junit 4.4 through 4.8 should not be disrupted if they add spring-test
but may wish to exclude the hamcrest-library transitive dependency
from spring-test in order to avoid extra jars in the classpath

Applications that depend on hamcrest 1.3 should not have to do anything

Issue: SPR-9940
2012-11-01 23:58:50 -04:00
Phillip Webb 15b64ba601 Restore -XX:MaxHeapSize=256m for gradlew.bat
Restore the MaxHeapSize setting for the Windows build only.
2012-11-01 10:29:07 -07:00
Chris Beams bbe1301d63 Remove -XX:MaxHeapSize=256m from default GRADLE_OPTS
This setting was causing failures in the CI build, and was not present
prior to the recent updates to gradle wrapper generation.

This commit also simplifies the gradle wrapper customizations by placing
the logic in a doLast block within the original 'wrapper' task, as
to creating a second wrapper task and extending from the first.
2012-11-01 11:04:58 +01:00
Phillip Webb 23b091b786 Remove need to manually set wrapper GRADLE_OPTS
Replace the wrapper task with a variant that automatically adds the
appropriate GRADLE_OPTS to the shell and bat files.
2012-10-31 17:29:00 -07:00
Phillip Webb 39682b7d3f Upgrade to Hamcrest 1.3 2012-10-30 15:52:46 -07:00
Phillip Webb 3a1dd20de9 Upgrade to Gradle 1.2
Issue: SPR-9790
2012-10-28 12:11:43 -07:00
Chris Beams 61186b0b56 Rename ref doc PDF spring-{=>framework-}reference
- Upgrade to 0.1.6 snapshot of docbook plugin

 - Fully qualify PDF artifact name as 'spring-framework-reference.pdf'
   instead of former 'spring-reference.pdf'

Issue: SPR-9598
2012-10-26 17:56:00 +02:00
Phillip Webb 1858ef10ff Tests for DelegatingDataSource Wrappers 2012-10-10 15:49:03 -07:00