This has been covered a couple of times at least in discussions, easily doable with velocity e.g.
have a look through here to start and look here and here too