Solution 1:

Add those export lines to your ~/.profile file.

If you want it to apply to all users on the system, put it in /etc/profile instead;

sudoedit /etc/profile

Once you've edited either, you'll see the effect next time you log in.

See also http://mywiki.wooledge.org/DotFiles

On a side-note, if you instead install maven via the software center or apt-get, you won't need to do any of the above.