Wednesday, January 7, 2009

Tapestry 5 with Scala - Get the code !

A Scala / Tapestry 5 blog

In the next days/weeks, I will try to see a little more precisely how Tapestry 5 and Scala get together. I chose to start with a little blog application (how imaginative I am ;)

If your are interested to see how it works, I've set-up a github repository to keep a trace of the evolution.

So, the repository is here:

Step one : an hello world application

The first step is to have the equivalent of the Tapestry 5 quickstart application, but with a Scala back end. That suppose:

  • to change Java class to scala one;

  • to add the correct dependencies and plugins (I used the scala-maven-plugin) for Maven, so that it will be able to compile Scala files.

I also renamed the standard directory structure for source classes from src/main/java to src/main/scala.

And that's it !

Test it yourself

So, if you want to see and test a Tapestry "hello world" application with Scala in place of Java, simply:

  • install Git if you don't have it already

  • get the source with the command:
    % git clone git://

  • Go to the scala-t5-blog directory, and switch to the tag for the "hello world" application with the command:
    % git checkout -b test helloworld-scala-t5 

  • You're done ! You can compile and run it with the standard "mvn jetty:run" command, or make a war to use it with your prefered web application with "mvn package"

That's it for this first step, next I will try to make a more beautiful, perhaps configurable skin for the blog.

Enjoy !


  © Blogger template 'Minimalist G' by 2008

Back to TOP