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
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.
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.
Finally, I selected my preferred sbt launcher and specified the actions I wanted to run. And that was all I had to do!
-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