Change maven check to MAVEN_HOME dir.

Moves the maven download to just before analysis, where it will be
needed.

fix bug 1054557