From 47b8ec6c5b0bb54b90feb16abf7aa1a14488230c Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Sat, 21 Oct 2023 12:22:05 +0200 Subject: [PATCH] [MCHECKSTYLE-403] Goal checkstyle:checkstyle ignores testResources --- .../maven/plugins/checkstyle/CheckstyleAggregateReport.java | 4 ++-- .../org/apache/maven/plugins/checkstyle/CheckstyleReport.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleAggregateReport.java b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleAggregateReport.java index 79563e16..0419d283 100644 --- a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleAggregateReport.java +++ b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleAggregateReport.java @@ -65,10 +65,10 @@ protected CheckstyleExecutorRequest createRequest() throws MavenReportException .setExcludes(excludes) .setFailsOnError(failsOnError) .setIncludes(includes) - .setIncludeResources(includeResources) - .setIncludeTestResources(includeTestResources) .setResourceIncludes(resourceIncludes) .setResourceExcludes(resourceExcludes) + .setIncludeResources(includeResources) + .setIncludeTestResources(includeTestResources) .setIncludeTestSourceDirectory(includeTestSourceDirectory) .setListener(getListener()) .setProject(project) diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReport.java b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReport.java index 08d5835b..15f16e04 100644 --- a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReport.java +++ b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReport.java @@ -64,6 +64,7 @@ protected CheckstyleExecutorRequest createRequest() throws MavenReportException .setProject(project) .setSourceDirectories(getSourceDirectories()) .setResources(resources) + .setTestResources(testResources) .setStringOutputStream(stringOutputStream) .setSuppressionsLocation(suppressionsLocation) .setTestSourceDirectories(getTestSourceDirectories())