Adding the latest release of Akka to an SBT project

A quick note how to create a SBT project with the latest release of Akka.

Create a build.sbt file:

name := "ScalaAkkaTest"

organization := "<Your organisation name>"

version := "0.1.0-SNAPSHOT"

scalaVersion := "2.11.2"

resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"

libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.3.6"

Continue reading

Yes you can: Diff with EGit in Eclipse!

In my previous post on how to quickly view all the changes between two branches in Git I ended with the statement “Is there away to do the same in Eclipse with EGit?“. I Googled around for the answer a bit, but with no success. By accident I just discovered how to compare the working version of a file to the commited version. Not entirely the same, but getting closer 🙂 For the purpose of being able to quickly check what changes I have made to write meaningful commit messages this is sufficient for me.

Anyway, these are the steps:

  • Open Git Staging (Window > Show view > Git > Git Staging)
  • Double click on a file in “Unstaged Changes” or “Staged Changes”

And voilà! There is a beautiful window with a side to side diff of the working version and commited version. Nice! I hope this is useful.

Wicked Shell is your friend: Using the shell from Eclipse

I am using the Git flow as my development model. It is very easy to understand and use. Keeps development nice, tidy and clear. See more information for links about Git flow.

When preparing a release the release or version number needs to be bumped (increased). This requires a shell script. I was switching to a command prompt to do this. Then I came across a nifty little plug-in for Eclipse, so I can execute the shell script from within Eclipse. It is called Wicked Shell. Continue reading

Easy way to quickly view all the changes between two branches in Git

I was commiting some changes in Git and needed to view all the changes between, so that I could write a meaningful commit message. I used the following command to view the changes in each changed file:

git difftool -v development

This command is viewing the active branch (checked out branch) with the development branch. It will open the changed files one by one.

Is there away to do the same in Eclipse with EGit?

Enabling task tags in Eclipse

In Eclipse you can add a comment using Task Tags like // TODO <task> or // FIXME. This should add that comment as a task to the Tasks. By default the Task Tags are disabled. Enable them as follows:

  • Window > Preferences
  • Type Task Tags
  • Select that Task Tags under General > Editors > Structured Text Editors
  • Check Enable searching for Task Tags

Awsome website to test jsoup

I am busy learning Scala. As an exercise I am rebuilding a web scraper that I previously developed in Java. I am using jsoup to handle the actual extracting of data. I came across an excellent website that you can use to test jsoup. Try jsoup is an interactive demo for jsoup that allows you to see how it parses HTML into a DOM and test CSS selector queries.

It even lets you load your own web page. Just hit the Fetch URL button, paste the URL you want to test and have fun testing your CSS selectors.

Give it a try!

Making a directory available to Eclipse

I was busy adding logging to a project today and added a logback.xml file to a resource directory under src/main. When running the application the logback.xml file was not being picked up. It turns out the resource directory must be added to the build path. A quick reminder how to do this:

  • Right click on the project
  • Select Build Path | Configure Build Path…
  • Select the Source tab
  • Click Add Folder…
  • Check the check box of the folder to add
  • Click OK
  • Click OK

Everything should be working now.