The source of the class:
The above class was copypasted from here. All credit is due to the original author. It's a clever tweak over the official documentation to point to the WAR file location.
To compile, Maven needs to download the dependencies. Easy:
The next task is to move the Launcher class to the root of the WAR (classloading behaves the same as a JAR file). Maven can't do this easily so Ant to the rescue.
And finally we are there! If you need a complete working example I've comitted the changes to OSSMoney which was my original intent anyway (distributing something that end users could execute in their machines without any knowledge of the Java ecosystem).