title: extract out one file from zip in maven
body: <p>I have an <strong>zip</strong> file under a folder named <code>output</code>. The zip contains 3 files inside.</p>
  
  <pre><code>Project root/
      -output/
          -my.zip
      pom.xml
  </code></pre>
  
  <p>my.zip (contains names.txt, schools.txt, teachers.txt).</p>
  
  <p>How can I extract out only <strong>names.txt</strong> from zip &amp; put it under <code>output/</code> in <strong>maven</strong>? </p>
  
  <p><strong>===What I have tried:===</strong></p>
  
  <p>I can achieve it by running command from project root :</p>
  
  <pre><code>unzip -p output/my.zip names.txt &gt; output/names.txt 
  </code></pre>
  
  <p>But when I try to use <code>exec-maven-plugin</code> &amp; run maven:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;plugin&gt;
      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
      &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;1.4.0&lt;/version&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;get names.txt&lt;/id&gt;
              &lt;phase&gt;package&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;exec&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;executable&gt;unzip&lt;/executable&gt;
                  &lt;commandlineArgs&gt;-p output/my.zip names.txt &gt; output/names.txt&lt;/commandlineArgs&gt; 
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>I always get <strong>Failed to execute goal</strong> with exec-maven-plugin</p>
  
  <p>What is wrong with my <code>exec-maven-plugin</code> configuration, and any other ways to achieve it in maven?</p>