diff --git a/build.xml b/build.xml
index c28b90b5fda6d0782f2c01a5b299142f8b03e901..18eebc9aed874eaa100844dc7a1566e1d0e01335 100644
--- a/build.xml
+++ b/build.xml
@@ -138,7 +138,7 @@
         </pathconvert>
         <echo message="Running thrift generator on ${thrift.file.list}"/>
         <exec executable="thrift" dir="${basedir}" failonerror="true">
-            <arg line="--strict -v --gen java -o ${thrift.out.dir}/.. ${thrift.file.list}"/>
+            <arg line="--strict -v --gen java -o ${thrift.out.dir}/.. '${thrift.file.list}'"/>
         </exec>
         <!-- Get rid of annoying warnings in thrift java: at annotations -->
         <echo message="Adding @SuppressWarning annotations"/>