Proper way to set up maven build

I’m confused how to properly set up a maven build in GitLab.

A build should be doable with one single command: mvn verify. This should compile, test, and compose all artifacts. The GitLab-CI maven template reflects this approach.

However there’re guides like GitLab simple maven who split the maven phases into jobs.

How is the proper way to implement a build ci, if each phase is creating artifacts? Could you point out some examples?