Changed maven deprecated method to new one

- Working without warnings on maven 3.1 and java 1.7.0_45