scalaxb with Scala 2.11

Starting scalaxb 1.2.0 it supports Scala 2.11.x. Since Scala 2.11 modularizes XML and parser combinators, it requires additional setup on your part. Here's using sbt 0.13's multi-project build.sbt syntax:

import ScalaxbKeys._
 
lazy val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.0.2"
lazy val scalaParser = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.1"
lazy val dispatchV = "0.11.2" // change this to appropriate dispatch version
lazy val dispatch = "net.databinder.dispatch" %% "dispatch-core" % dispatchV
 
lazy val root = (project in file(".")).
  settings(scalaxbSettings: _*).
  settings(
    name := "hello",
    organization := "com.example",
    scalaVersion := "2.11.1",
    libraryDependencies ++= Seq(scalaXml, scalaParser, dispatch),
    packageName in (Compile, scalaxb) := "com.paperstreet",
    packageNames in (Compile, scalaxb) := Map(uri("http://schemas.microsoft.com/2003/10/Serialization/") -> "microsoft.serialization"),
    dispatchVersion in (Compile, scalaxb) := dispatchV,
    async in (Compile, scalaxb) := true,
    sourceGenerators in Compile <+= scalaxb in Compile
    // logLevel in (Compile, scalaxb) := Level.Debug    
  )