Sbt Plugins: No Default Package Please

Usually people don't put sbt builds in a package (I'm talking about scala files here), especially for simple and small projects. And they easily can use all the sbt plugins. But there are other users who have bigger and more complex builds. So they put their builds in packages and then they discover they can »

Override a list property for Typesafe Config

Today I naively was trying to override a list property for a unit test with the following code System.setProperty("list.property", """[ "val1", "val2"]""") The tested code is reading the list property using typesafe config library val listProperty = config.getListString.asScala.toSet That was throwing com.typesafe.config.ConfigException$WrongType: system properties: list.property has »

ReactiveMongo, macros and NoSuchElementException: None.get

ReactiveMongo employs scala macros to generate readers(deserializers) and writers(serializers) for scala case classes. They work pretty good, but sometimes you can get a java.lang.NoSuchElementException with message None.get :( Let's say you have case class Person(fisrtName: String, lastName: String, age: Int) object readers { implicit val personReader = Macros.reader[Person] } and somewhere »

Akka: Stop Your Router Gracefully

Let's say you want to find an answer to Life, the Universe and Everything and you know it will take some time, so you want to do it in parralel while doing something else (DSE). You say to yourself "okay, I'll fire an actor and send him a message or bunch of messages, then DSE »

Debug an sbt plugin in IntelliJ IDEA

So you have your own sbt plugin (or someone's plugin if you are not so cool and sexy) and you want to debug it. It happens that there is nothing easier than that. If you run sbt through sbt-extras script (if you don't you should) just start your test sbt app with the plugin added »

CASTGC Cookie and HttpOnly Flag

Let's assume you employ CAS to be your single sign-on solution. Upon receiving correct credentials from the user CAS generates CASTGC cookie, which is marked with Secured flag. And assume you want to add HttpOnly flag to the cookie, to prevent accessing it via non-HTTP methods. CAS of version 3.5.0 depends on servlet-api »

Testing Security.Authenticated in Play 2.0 and 2.1

You have a Play application and let's say you want to add some simple authentication logic to restrict access to your actions. You want all your users to provide a ticket (e.g cas proxy ticket) in a request header, so you can use the ticket to authenticate them. Play's Security.Authenticated to the rescue! »

Camel and Scala 2.10

Camel and Scala is a good combination, but if you like to be on the bleeding edge and almost done converting your scala app to 2.10 you can find that camel still doesn't have a stable release supporting scala 2.10. So SNAPSHOT will do the trick in this case, but you know... it's »