<img height="1" width="1" src="https://www.facebook.com/tr?id=1076094119157733&amp;ev=PageView &amp;noscript=1">

Configuring Jenkins plugin for SBT

Posted by Anirvan Chakraborty on Thu, Jan 5, 2012

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.


Once the plugin installation completes and Jenkins is restarted, I verified that sbt-plugin is now available as one of the installed Jenkins plugins.

sbt-plging installed

Now that sbt-plugin is available on Jenkins, I had to configure a sbt launcher jar. I downloaded the very latest sbt launcher jar [0.11.2] from here, and saved it on our Jenkins build server. In order to complete the configuration, I had to specify the name and location of the sbt launcher jar under Jenkins configuration.

configure sbt plugin

Jenkins sbt plugin allows you to install multiple versions of sbt launcher jar files giving you the option of choosing the most appropriate one for your project.

All that remained now was to create a Jenkins build job which used sbt-launcher to build Spec2Spring. To do that I simply selected Build using sbt from Add build step.

add job step 1

Finally, I selected my preferred sbt launcher and specified the actions I wanted to run. And that was all I had to do!

add job step 2

-Dsbt.log.noformat=true sbt flag keeps the console output clean and tidy!

Note: To avoid frequent OutOfMemory errors, add something like the following JVM flags to your Jenkins build configuration (notice in particular the stack and perm gen size parameters):

-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m -Xmx512M -Xss16M

Need help on your next project?


Topics: Sbt, Specs2 Spring

Recent Posts

Posts by Topic

see all

Subscribe to Email Updates