diff --git a/solr/build.xml b/solr/build.xml
index 07c462abba8..015ee5f51ee 100644
--- a/solr/build.xml
+++ b/solr/build.xml
@@ -447,6 +447,7 @@
errorProperty="tests.failed"
failureProperty="tests.failed"
dir="src/test/test-files/"
+ tempdir="${junit.output.dir}"
>
diff --git a/solr/contrib/clustering/build.xml b/solr/contrib/clustering/build.xml
index b9cb9c12880..c5cb3af4548 100644
--- a/solr/contrib/clustering/build.xml
+++ b/solr/contrib/clustering/build.xml
@@ -136,6 +136,7 @@
errorProperty="tests.failed"
failureProperty="tests.failed"
dir="src/test/resources/"
+ tempdir="${junit.output.dir}"
>
diff --git a/solr/contrib/dataimporthandler/build.xml b/solr/contrib/dataimporthandler/build.xml
index 92fa79f9e87..9f295ab993e 100644
--- a/solr/contrib/dataimporthandler/build.xml
+++ b/solr/contrib/dataimporthandler/build.xml
@@ -135,6 +135,7 @@
errorProperty="tests.failed"
failureProperty="tests.failed"
dir="src/test/resources/"
+ tempdir="${junit.output.dir}"
>
diff --git a/solr/contrib/extraction/build.xml b/solr/contrib/extraction/build.xml
index e883926fc32..8c403ef3071 100644
--- a/solr/contrib/extraction/build.xml
+++ b/solr/contrib/extraction/build.xml
@@ -85,6 +85,7 @@
errorProperty="tests.failed"
failureProperty="tests.failed"
dir="src/test/resources/"
+ tempdir="${junit.output.dir}"
>
diff --git a/solr/contrib/velocity/build.xml b/solr/contrib/velocity/build.xml
index 97dbf5cf08d..94b50eb0607 100644
--- a/solr/contrib/velocity/build.xml
+++ b/solr/contrib/velocity/build.xml
@@ -83,6 +83,7 @@
errorProperty="tests.failed"
failureProperty="tests.failed"
dir="src/main"
+ tempdir="${junit.output.dir}"
>