Some of the other answers are useless because as soon as you re-import the IntelliJ IDEA project from the maven project, all changes will be lost.
The building of the jar needs to be triggered by a run/debug configuration, not by the project settings.
Jetbrains has a nice description of how you can accomplish this here:
https://www.jetbrains.com/help/idea/maven.html
Scroll down to the section called "Configuring triggers for Maven goals".
(The only disadvantage of their description is that their screenshots are in the default black-on-white color scheme instead of the super-awesome darcula theme. Ugh!)
So, basically, what you do is that you open the "Maven Projects" panel, you find the project of interest, (in your case, the project that builds your jar,) underneath it you find the maven goal that you want to execute, (usually the "package" goal creates jars,) you open up the context menu on it, (right-click on a Windows machine,) and there will be an "Execute before Run/Debug..." option that you can select and it will take you by the hand from there. Really easy.