I'm trying to get into maven and started writing just a small library. As part of the library code I want to have a small demo java application one can use to see what the library is doing and how to use it. One thing that really annoys me right now is that in order to execute that demo I have to execute two commands: mvn package
and mvn exec:exec
or mvn package exec:exec
.
Is there any way to configure maven to automatically run "package" before "exec:exec"? So that I can run mvn exec:exec
on a fresh checkout and compilation will implicitly happen before execution?