wro4j

The Web Resource Optimizer for Java (wro4j) is a Free and Open Source Java project which brings together almost all the modern web tools for compressing, building, and minifying your JavaScript and CSS assets: JsHint, CssLint, JsMin, Google Closure compressor, YUI Compressor, UglifyJs, Dojo Shrinksafe, Css Variables Support, JSON Compression, Less, Sass, CoffeeScript and much more.

You can add wro4j to your Scalatra project by using the xsbt-wro4j plugin.

See the xsbt-wro4j-plugin project documentation for details of how to do so.