diff --git a/src/it/html-report/pom.xml b/src/it/html-report/pom.xml
index 55dfb9e7b..5d96e5749 100644
--- a/src/it/html-report/pom.xml
+++ b/src/it/html-report/pom.xml
@@ -40,6 +40,7 @@
true
true
+ target/test-output-directory
false
@spotbugsTestDebug@
High
diff --git a/src/it/html-report/verify.groovy b/src/it/html-report/verify.groovy
index 422b6a723..227a40978 100644
--- a/src/it/html-report/verify.groovy
+++ b/src/it/html-report/verify.groovy
@@ -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()
diff --git a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy
index 20bc5aff7..1358ce5c7 100644
--- a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy
+++ b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy
@@ -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)
}