title: Include specific dependencies with maven assembly plugin
body: <p>I am using the maven assembly plugin so that I can include specific dependencies(basically I want to
  include specific transitive dependencies) class in my jar file. Here is my relevant code snippet from the <code>pom.xml</code> -</p>
  
  <pre><code>&lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;phase&gt;package&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;single&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;configuration&gt;
                  &lt;descriptorRefs&gt;
              &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
            &lt;/descriptorRefs&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;  
  
        &lt;/plugins&gt;
    &lt;/build&gt; 
  </code></pre>
  
  <p>Looks like it is possible from link <a href="http://maven.apache.org/plugins/maven-assembly-plugin/advanced-descriptor-topics.html" rel="nofollow">http://maven.apache.org/plugins/maven-assembly-plugin/advanced-descriptor-topics.html</a>
   But as soon as mention below code snippet to include two types of dependencies com.companyA.* and com.companyB.* ,<strong>except that
   I do not want to exclude all other dependencies</strong></p>
  
  <pre><code>&lt;dependencySets&gt;
      &lt;dependencySet&gt;
        &lt;includes&gt;
          &lt;include&gt;com.companyA.*&lt;/include&gt;
          &lt;include&gt;com.companyB.*&lt;/include&gt;
        &lt;/includes&gt;
      &lt;/dependencySet&gt;
    &lt;/dependencySets&gt;
  </code></pre>
  
  <p>But <code>pom.xml</code>  says <strong>invalid content for dependencySets</strong>. I don't know how to achieve objective here?</p>