Implemented Maven JAR compilation.

A lot of quirks exist with running terminal commands in here, and Maven
is equally picky with inputs. See comments for details.