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 d44028fd..4fd2a54f 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 @@ protected String constructXRefLocation(boolean test) { 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 = "."; }