You may have observed the following warnings when running the PMD or Checkstyle plugin:
[INFO] --- maven-pmd-plugin:3.2:pmd (default-cli) @ project-with-violations --- [WARNING] Unable to locate Source XRef to link to – DISABLED [INFO] --- maven-checkstyle-plugin:2.13:checkstyle (default-cli) @ project-with-violations --- [INFO] [INFO] There are 36 checkstyle errors. [WARNING] Unable to locate Source XRef to link to – DISABLED
The plugins attempt to link the violation to the specific lines in the cross-reference of the source. As they are unable to find this cross-reference, they display the warning.
To generate this cross-reference, we need to use the Maven JXR plugin.