My Apache Archiva setup for sbt

Posted on January 28, 2015 by Stefan Bleibinhaus (updated November 30, 2016)

This blog post describes my Apache Archiva setup with nginx on . I use it as a build artifact repository for my Scala projects built by sbt . This post also describes how I modify my sbt projects to deploy successfully to Archiva.

Read more

Scalaz for Dummies

Posted on December 20, 2014 by Stefan Bleibinhaus (updated November 30, 2016)

This post is just a copy. I published the original at Bench labs . The post gives an introduction to the Scala library Scalaz including a rationale. It explains some simple to use Scalaz features including Tagging, the Equal typeclass, Scalaz's take on Options, \/ ("the other Either") and Validation.

Read more

Drools with Scala

Posted on April 10, 2014 by Stefan Bleibinhaus (updated April 11, 2014)

This post is about the business rules engine Drools in combination with Scala . I have recently started to become interested in business rules engines and I am eager to find promising solutions in combination with the powerful programming language Scala. In this post I introduce the concept of business rules engines and the main motivations to use one. As a follow up in the post, I give a short overview of the rules engine Drools. In an example which can be found on Github, I show how Drools can be used in combination with Scala, explaining various implementation details. I also describe the problems I encountered by using Drools with Scala and how I fixed them.

Read more

Reactive Mongo and Spray

Posted on January 26, 2014 by Stefan Bleibinhaus

In this post I reflect on my first experiences with Reactive Mongo , a reactive Scala driver for MongoDB , in combination with Spray . For experimenting, I created an example project on Github, which is being used in this post to show some code examples. Furthermore I have decided to go with Sprest , a project which aims to build companion libraries for Spray, for the integration between Reactive Mongo and Spray in the example.

Read more

My first sbt plugin: sbt-fastpublish

Posted on January 11, 2014 by Stefan Bleibinhaus

This blog post describes my first sbt plugin: sbt-fastpublish . The plugin modifies the publishing process of sbt by disabling the publishing of the Scala docs and sources. This can speed up the development process, by essentially making the compile process faster. In one of the projects I am working on currently, the difference is up to 10%. The plugin is thanks to sbt-cross-building available for sbt 0.12 and sbt 0.13. In this blog post I describe how to compile and enable the plugin and give furthermore a very little introduction to writing sbt plugins.

Read more

ScalaTest and Mockito: Functions

Posted on November 16, 2013 by Stefan Bleibinhaus

This is the second part of my blog series which focuses on the mocking framework Mockito and its interaction with Scala and ScalaTest . This time its all about testing Scala functions. Personally I learned a lot of Scala's way of handling functions by testing them and I hope people learn something from this blog post as well. Aside from the previous mentioned libraries, ScalaCheck , a property-based testing tool for Scala, is also being used to verify some of the function's behaviour. As in the last part the example project on github is being used to illustrate the examples with actual code.

Read more

ScalaTest and Mockito: Exceptions

Posted on November 7, 2013 by Stefan Bleibinhaus

This is the start of a new blog series which focuses on the mocking framework Mockito and its interaction with Scala and ScalaTest . Each part of the series concentrates on one aspect of testing and explains how the mentioned frameworks facilitate testing in this area. An example project on github illustrates the corresponding code. The first part is an easy start and deals with exceptions.

Read more

Scala and Graph Databases with Gremlin-Scala

Posted on October 24, 2013 by Stefan Bleibinhaus

In this post, I give an introduction to Gremlin-Scala , which aims to be a thin Scala wrapper for Gremlin . Gremlin is a graph DSL for traversing a number of graph databases . The post includes a short introduction to graph databases in general and to the Gremlin project. The focus is Scala example code , which shows how Gremlin-Scala can be used to access the graph databases Neo4j , OrientDb and Tinkergraph and finding the shortest path in a graph.

Read more

Accessing the Hadoop Distributed Filesystem (HDFS) with Scala

Posted on September 16, 2013 by Stefan Bleibinhaus

This post shows how to access the Hadoop distributed Filesystem (HDFS) with Scala . It gives a short introduction to HDFS, explains how to get HDFS running locally and describes an example , which is hosted on Github and allows to save, retrieve and delete files in HDFS.

Read more

My Vim setup for Scala

Posted on August 31, 2013 by Stefan Bleibinhaus (updated April 24, 2014)

In this post, I give an overview of my current Vim setup. I use Vim as my main editor for text files, among them also code and especially Scala code. The post introduces the Vim plugins I use, my .vimrc configuration file and shows a way to combine Vim with Eclipse using Eclim . This post had a major update in January 2014. It has inspired a vim-scala-setup project available on Github.

Read more

Setting up a new Scala project with ScalaTest, JUnit and Mockito using the Scala build tool (sbt)

Posted on June 22, 2013 by Stefan Bleibinhaus

This post explains how to simply start a new Scala project with the Scala build tool (sbt) . Furthermore it describes how to integrate ScalaTest , JUnit and the mocking framework Mockito into the new project and gives some simple usage examples.

Read more

Admin login