Category Archives: Jan’s Blog

Scalaz monads in Spring

I won’t give you the category-theory based explanation of monads. Instead, I’m going to show you the application of monads, but not on Ints and Strings, but on ordinary domain instances; instances that we persist using Hibernate. Finally, we’ll run … Continue reading

Posted in Jan's Blog | Tagged , , , | Leave a comment

Specs2 Spring 0.4

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 … Continue reading

Posted in Jan's Blog | Tagged , , , , | Leave a comment

Publishing SBT projects to Nexus

Specs2 Spring is available on Sonatype OSS and Maven Central! But how did we get there and what should you do to get the hosting, synchronisation to Maven Central and how do you automate the deployment process? Let’s tackle one … Continue reading

Posted in Jan's Blog | Tagged , , , | 4 Comments

Specs2 Spring from sources

Specs2 Spring is going into Maven Central as soon as possible (I’ve submitted a request at https://issues.sonatype.org/browse/OSSRH-2760), which means that all you’ll have to do to use it in your projects is to add: <dependency> <groupId>org.specs2</groupId> <artifactId>spring_${scala.version}</artifactId> <version>0.3</version> <scope>test</scope> </dependency> … Continue reading

Posted in Jan's Blog | Tagged , | Leave a comment

Mixin composition using reflection

I wanted to be able to construct Scala beans in my Spring application context, but I also wanted to be able to specify the mixins to be included in the constructed bean: <?xml version=”1.0″ encoding=”UTF-8″?> <beans xmlns=”http://www.springframework.org/schema/beans” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:context=”http://www.springframework.org/schema/context” xmlns:scala=”http://www.springframework.org/schema/scala” … Continue reading

Posted in Jan's Blog | Tagged , , , | Leave a comment

What can Scala do for you?

There are many new languages on the Java platform alongside the official Java language. Many have heard about Scala and many are considering using it in their code. So, how can Scala make your systems better? Is it really incredibly … Continue reading

Posted in Jan's Blog | Tagged , , , , | Leave a comment

Maven to SBT

Find out how to move multi-module Maven projects into multi-project SBT projects, without sacrificing the plugins you were happily using in Maven. Continue reading

Posted in Jan's Blog | Tagged , , , , | 8 Comments

Spring I/O

I’ll be speaking at Spring IO in Madrid in 17th to 18th February 2012. My talk will be Spring in Scala, showing how to make the most of Scala in your Spring applications. If you can, escape the winter blues, … Continue reading

Posted in Jan's Blog | Tagged , | Leave a comment

Specs2 Spring 0.3

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 … Continue reading

Posted in Jan's Blog | Tagged , , | Leave a comment

Merry Christmas

import annotation.tailrec abstract class Tree(val left: Tree) { def o = new Ball(this) def x = new Spike(this) def * = new Candle(this) def oxo = new BigBall(this) def oo = new DoubleBall(this) def *** = new ElectricCandle(this) def / … Continue reading

Posted in Jan's Blog | Tagged | Leave a comment