Fix maven build issues in 2.10 branch

Found some issues when locally testing maven.