title: Maven antrun plugin. Passing all files in a directory as an argument
body: <p>I am using maven-antrun-plugin to generate classes using Apache Thrift. The plugin works when I specify one thrift file as an argument but fails when I try using a wildcard (*) to generate code for all thrift files. I executed thrift from the command line:</p>
  
  <pre><code>thrift --gen java:beans src/main/resources/*.thrift
  </code></pre>
  
  <p>And this works.</p>
  
  <p>But when I define this plugin in my pom.xml</p>
  
  <pre><code>            &lt;plugin&gt;
              &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;generate-sources&lt;/id&gt;
                      &lt;phase&gt;generate-sources&lt;/phase&gt;
                      &lt;configuration&gt;
                          &lt;tasks&gt;
                              &lt;mkdir dir="target/generated-sources" /&gt;
                              &lt;exec executable="${thrift.executable}" failonerror="true"&gt;
                                  &lt;arg value="--gen" /&gt;
                                  &lt;arg value="java:beans" /&gt;
                                  &lt;arg value="-o" /&gt;
                                  &lt;arg value="target/generated-sources" /&gt;
                                  &lt;arg value="${basedir}/src/main/resources/*.thrift" /&gt;
                              &lt;/exec&gt;
                              &lt;copy todir="src/main/java" overwrite="true"&gt;
                                  &lt;fileset dir="target/generated-sources/gen-javabean" /&gt;
                              &lt;/copy&gt;
                          &lt;/tasks&gt;
                      &lt;/configuration&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;run&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>The above fails with error "Could not open input file with realpath".</p>
  
  <p>How do I specify wildcards using maven-antrun-plugin?</p>