Skip to content

Commit

Permalink
Merge pull request #807 from exiahuang/fix-report-outputdirectory
Browse files Browse the repository at this point in the history
fix outputDirectory not work at running spotbugs:spotbugs goal
  • Loading branch information
hazendaz authored Jul 15, 2024
2 parents c86c55a + 9234e2a commit c6b6416
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/it/html-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<configuration>
<xmlOutput>true</xmlOutput>
<htmlOutput>true</htmlOutput>
<outputDirectory>target/test-output-directory</outputDirectory>
<failOnError>false</failOnError>
<debug>@spotbugsTestDebug@</debug>
<threshold>High</threshold>
Expand Down
2 changes: 1 addition & 1 deletion src/it/html-report/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
File spotbugsHtml = new File(basedir, 'target/spotbugs.html')
File spotbugsHtml = new File(basedir, 'target/test-output-directory/spotbugs.html')
assert spotbugsHtml.exists()
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {

log.debug("****** SpotBugsMojo executeSpotbugs *******")

File htmlTempFile = new File("${project.build.directory}/spotbugs.html")
File htmlTempFile = new File("${outputDirectory}/spotbugs.html")
if (htmlOutput) {
forceFileCreation(htmlTempFile)
}
Expand Down

0 comments on commit c6b6416

Please sign in to comment.