Also check M2_HOME envvar - the most commonly used way to specify a maven version on the commandline.