diff --git a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy index 72db342da..b5039b836 100644 --- a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy +++ b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy @@ -934,7 +934,7 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait { if (onlyAnalyze) { args << "-onlyAnalyze" args << Arrays.stream(onlyAnalyze.split(",")).map { - it.startsWith("file:") ? Files.lines(Paths.get(it.substring(5))).collect(Collectors.joining(",")) : it + it.startsWith("file:") ? Files.lines(resourceHelper.getResourceFile(it.substring(5)).toPath()).collect(Collectors.joining(",")) : it }.collect(Collectors.joining(",")) }