Avoid running mvn command twice.