After reading at http://freemarker.org/docs/ref_directive_include.html the ignore_missing description of this <#include attribute
ignore_missing: When true, suppresses the error when the template to include is missing, instead <#include ...> will print nothing. When false, the template processing will stop with error if the template is missing. If you omit this option, then it defaults to false.
I thought that we could get rid of the empty files creation when building. But like Deepak here I found that it's not working.
So I agree that the proposed patch is the best solution so far. I have reopened
OFBIZ-7942 because I did not understood the problem there when I closed.
We need to report to Apache Freemarker (incubating) because as mentionned Deepak the ignore_missing attribute of the <#include directive does not work. When it will work we will use it and remove the need of creating empty files when running the build task.
I commit the proposed patch now, thanks for your patience