Montag, 3. März 2014

API documentation for SBT project

Laika can help you easily add documentation to your SBT project. Whole process is described here and following list contains necessary steps:
  1. Add a line to your project/plugins.sbt file
    addSbtPlugin("org.planet42" % "laika-sbt" % "0.5.0")
  2. These lines to build.sbt
    import laika.sbt.LaikaSbtPlugin.{LaikaPlugin, LaikaKeys}
    import LaikaKeys._
    LaikaPlugin.defaults
  3. If you want to redefine default settings
    sourceDirectories in Laika := Seq(new java.io.File("app/docs"))
    includeAPI in Laika := true
  4. Build documentation by executing following command from SBT console
    laika:site  

Change Jenkins default port on Mac

If you want to run Jenkins locally on Mac OS X and change default port 8080 you have to change httpPost parameter using following command:
sudo defaults write /Library/Preferences/org.jenkins-ci.plist httpPort 9000
 After that you have to restart Jenkins:
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
Thats it.