Fix pmd

Upgrade java version to 1.7
Add a profile to have pmd and checkstyle check without failure