As answered, the Maven Release Plugin will take care of this, and also, you cannot use a var there.