Maven fixes

Replacing PR #2595 to add an additional fix