Welcome to another week in #Scala. We've been busy working on our open source projects here at Cake and have finally got spec2 spring published to Maven central and Sonatype. This week has been fairly quiet from a Scala point of view (compared to normal standards anyway) but there are still a few interesting posts and releases to tell you about.
We're pleased to release version 0.4 of Specs2 Spring!
0.4 follows the very short-lived Maven Central practice-release 0.3. We now include support for Spring 2.5, 3.0 and 3.1; for the latest verion of Spring, we include bean profiles and environment variables settable from the test annotations. We have also included support for raw SessionFactory and HibernateTemplate to work with the most popular ORM tool. The updates include:
Hey there! I've recently just started working with Cake Solutions, Scala and SBT. One of my first tasks was to improve the documentation in Specs2 Spring.
SBT and DocBook
As part of our Specs2 Spring project, we wanted to ensure users had access to Spec2 Spring's documentation in a format they know and love, we figured we'd use DocBook, the multiformat-generating, markup language.
As a logical next step of moving Specs2 Spring from Maven to SBT, I have now got Specs2 Spring building comfortably in our local Jenkins using the SBT goodness. The process was pretty straight forward!
First, I installed the sbt-plugin for Jenkins from the list of available plugins under Manage Plugin.
Spring 3.1 brings bean profiles, allowing you to name sets of beans that will be included in your ApplicationContext according to your specifications. For example, I could have bean profiles named UCI and ACU. In both profiles, I will have a bean that implements the LegalRegulations interface, but the implementations will be different. At runtime, I will specify which bean profiles I want to use and Spring will pick the appropriate beans for the given profile. Let me show you some code: