Consistently use MavenReport#getReportOutputDirectory()
diff --git a/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java b/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java
index d44028f..4fd2a54 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java
@@ -271,7 +271,7 @@
File xrefLoc = test ? xrefTestLocation : xrefLocation;
String relativePath =
- PathTool.getRelativePath(outputDirectory.getAbsolutePath(), xrefLoc.getAbsolutePath());
+ PathTool.getRelativePath(getReportOutputDirectory().getAbsolutePath(), xrefLoc.getAbsolutePath());
if (relativePath == null || relativePath.isEmpty()) {
relativePath = ".";
}