Maven Upgrade using Gitlab

I want to upgrade maven version on ubuntu using gitlab runner. please suggest what command I can use doe this in .gitlab_ci.yml