diff --git a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy index 02fe741b..5e609050 100644 --- a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy +++ b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy @@ -857,10 +857,10 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait { } if(!sarifOutput) { - args << "-xml:withMessages" + args << "-xml:withMessages=" + tempFile.getAbsolutePath() } else { - args << "-sarif" + args << "-sarif=" + tempFile.getAbsolutePath() } args << "-auxclasspathFromInput" @@ -956,10 +956,6 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait { args << maxRank } - args << "-output" - args << tempFile.getAbsolutePath() - - if (classFilesDirectory.exists() && classFilesDirectory.isDirectory()) { log.debug(" Adding to Source Directory ->" + classFilesDirectory.absolutePath) args << classFilesDirectory.absolutePath