title: Maven dependency plugin - exclude directories when unpackaging jar file
body: <p>I am trying to un-package a jar file using the maven dependency plugin. But I only want one file inside the jar file and want to exclude the META-INF directory that's inside the jar. How would I do this?</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.0.2&lt;/version&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;unpack&lt;/id&gt;
              &lt;phase&gt;package&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;unpack&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;artifactItems&gt;
                      &lt;artifactItem&gt;
                          &lt;groupId&gt;...&lt;/groupId&gt;
                          &lt;artifactId&gt;...&lt;/artifactId&gt;
                          &lt;version&gt;...&lt;/version&gt;
                          &lt;type&gt;jar&lt;/type&gt;
                          &lt;outputDirectory&gt;${project.basedir}/src/test/&lt;/outputDirectory&gt;
                          &lt;excludes&gt;META-INF&lt;/excludes&gt;
                      &lt;/artifactItem&gt;
                  &lt;/artifactItems&gt;
                  &lt;excludes&gt;META-INF&lt;/excludes&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>