title: Copy specific artifacts with dependencies to the specific folder and rest of dependencies to another folder
body: <p>I have a maven project with 5 dependencies. Two of them (with its transitive dependencies) I need to have in a custom location, let's say in <code>client/plugins</code>. While rest of the project dependencies (also with transitive dependencies) I need in another location, let's say in <code>client/modules</code>. Following examples from Apache Maven documentation, here's my <code>&lt;build&gt;</code> block:</p>
  
  <pre><code>&lt;build&gt;
    &lt;plugins&gt;
      &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;copy-dependencies&lt;/id&gt;
                  &lt;phase&gt;package&lt;/phase&gt;
                  &lt;goals&gt;
                      &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                  &lt;/goals&gt;
              &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;configuration&gt;
              &lt;artifactItems&gt;
                  &lt;artifactItem&gt;
                      &lt;groupId&gt;my.groupid&lt;/groupId&gt;
                      &lt;artifactId&gt;my-artifactid-one&lt;/artifactId&gt;
                      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
                      &lt;outputDirectory&gt;client/modules&lt;/outputDirectory&gt;
                  &lt;/artifactItem&gt;
                  &lt;artifactItem&gt;
                      &lt;groupId&gt;my.groupid&lt;/groupId&gt;
                      &lt;artifactId&gt;my-artifactid-one&lt;/artifactId&gt;
                      &lt;version&gt;1.1-SNAPSHOT&lt;/version&gt;
                      &lt;outputDirectory&gt;client/modules&lt;/outputDirectory&gt;
                  &lt;/artifactItem&gt;
              &lt;/artifactItems&gt;
              &lt;outputDirectory&gt;client/plugins&lt;/outputDirectory&gt;
          &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>When I run <code>mvn -U clean package</code> command, Maven copies all project dependencies with its transitive dependencies to <code>client/plugins</code>. Thus, it ignores configurations I've set up for specific artifacts.</p>
  
  <p>How can I set it up?</p>