ROL-2086 Build fails for source code that obtained from GitHub

git-svn-id: https://svn.apache.org/repos/asf/roller/trunk@1720877 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/app/pom.xml b/app/pom.xml
index c5e1125..75c1e92 100644
--- a/app/pom.xml
+++ b/app/pom.xml
@@ -520,6 +520,19 @@
             <plugin>
                 <artifactId>maven-antrun-plugin</artifactId>
                 <version>1.7</version>
+                <dependencies>
+                    <dependency>
+                        <groupId>ant-contrib</groupId>
+                        <artifactId>ant-contrib</artifactId>
+                        <version>1.0b3</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>ant</groupId>
+                                <artifactId>ant</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                </dependencies>
 
                 <executions>
                     <execution>
@@ -530,6 +543,16 @@
                         </goals>
                         <configuration>
                             <target>
+                                <!-- Workaround for git distribution that doesn't keep empty directories.
+                                     For detail check [ROL-2086] -->
+                                <taskdef resource="net/sf/antcontrib/antlib.xml" />
+                                <property file="${basedir}/src/main/resources/sql/dbscripts.properties" />
+                                <for list="${databases}" param="database" delimiter=" ">
+                                    <sequential>
+                                        <mkdir dir="${basedir}/target/dbscripts/@{database}" />
+                                    </sequential>
+                                </for>
+
                                 <taskdef name="texen"
                                          classname="org.apache.velocity.texen.ant.TexenTask"
                                          classpathref="maven.compile.classpath"/>