in src/main/java/org/apache/maven/plugins/pmd/PmdViolationCheckMojo.java [142:157]
private String getFilename(String fullpath, String pkg) {
int index = fullpath.lastIndexOf(File.separatorChar);
while (pkg != null && !pkg.isEmpty()) {
index = fullpath.substring(0, index).lastIndexOf(File.separatorChar);
int dot = pkg.indexOf('.');
if (dot < 0) {
break;
}
pkg = pkg.substring(dot + 1);
}
return fullpath.substring(index + 1);
}