diff --git a/pom.xml b/pom.xml
index 29f099ea..c877ed31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,10 +78,10 @@ under the License.
1.4.1
9.3
1.7.36
- 2.0.0-M12
- 2.0.0-M19
+ 2.0.0
+ 2.0.0
3.20.0
- 3.4.0
+ 3.5.0
2024-08-19T15:41:42Z
@@ -132,12 +132,12 @@ under the License.
org.apache.maven.reporting
maven-reporting-api
- 4.0.0-M12
+ 4.0.0
org.apache.maven.reporting
maven-reporting-impl
- 4.0.0-M15
+ 4.0.0
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java b/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java
index 0193c549..ad25d6d5 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java
@@ -42,8 +42,6 @@
import org.apache.maven.model.Dependency;
import org.apache.maven.model.Plugin;
import org.apache.maven.model.PluginManagement;
-import org.apache.maven.model.ReportPlugin;
-import org.apache.maven.model.Reporting;
import org.apache.maven.model.Resource;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.plugins.annotations.Component;
@@ -489,45 +487,6 @@ protected List getReactorProjects() {
return reactorProjects;
}
- protected String constructXrefLocation(boolean test, boolean haveResults) {
- String location = null;
- if (linkXRef) {
- File xrefLocation = getXrefLocation(test);
-
- String relativePath = PathTool.getRelativePath(
- getReportOutputDirectory().getAbsolutePath(), xrefLocation.getAbsolutePath());
- if (relativePath == null || relativePath.isEmpty()) {
- relativePath = ".";
- }
- relativePath = relativePath + "/" + xrefLocation.getName();
- if (xrefLocation.exists()) {
- // XRef was already generated by manual execution of a lifecycle binding
- location = relativePath;
- } else {
- // Not yet generated - check if the report is on its way
- Reporting reporting = project.getModel().getReporting();
- List reportPlugins =
- reporting != null ? reporting.getPlugins() : Collections.emptyList();
- for (ReportPlugin plugin : reportPlugins) {
- String artifactId = plugin.getArtifactId();
- if ("maven-jxr-plugin".equals(artifactId) || "jxr-maven-plugin".equals(artifactId)) {
- location = relativePath;
- }
- }
- }
-
- if (location == null && haveResults) {
- getLog().warn("Unable to locate" + (test ? " Test" : "") + " Source XRef to link to - DISABLED");
- }
- }
- return location;
- }
-
- protected File getXrefLocation(boolean test) {
- File location = test ? xrefTestLocation : xrefLocation;
- return location != null ? location : new File(getReportOutputDirectory(), test ? "xref-test" : "xref");
- }
-
/** {@inheritDoc} */
public void executeReport(Locale locale) throws MavenReportException {
checkDeprecatedParameterUsage(sourceDirectory, "sourceDirectory", "sourceDirectories");
@@ -573,7 +532,6 @@ public void executeReport(Locale locale) throws MavenReportException {
CheckstyleResults results = checkstyleExecutor.executeCheckstyle(request);
- boolean haveResults = results.getFileCount() > 0;
CheckstyleReportRenderer r = new CheckstyleReportRenderer(
getSink(),
i18n,
@@ -581,8 +539,8 @@ public void executeReport(Locale locale) throws MavenReportException {
project,
siteTool,
effectiveConfigLocation,
- constructXrefLocation(false, haveResults),
- constructXrefLocation(true, haveResults),
+ linkXRef ? constructXrefLocation(xrefLocation, false) : null,
+ linkXRef ? constructXrefLocation(xrefTestLocation, true) : null,
linkXRef ? getTestSourceDirectories() : Collections.emptyList(),
enableRulesSummary,
enableSeveritySummary,