Fixed several warnings.
[JENKINS-21268] Don't reference maven classes if plugin is deactivated.