title: How to configure Maven shade plugin in a multi-module project?
body: <p>I have been trying to get jar using Maven Shade Plugin, but I still don't get a success.</p>
  <p>This is my project structure:</p>
  <pre><code>MainModule
    -Module1
      -src
      -pom.xml
    -Module2
      -src
      -pom.xml
    -pom.xml
  </code></pre>
  <p>Module1 (pom.xml):</p>
  <pre><code>&lt;parent&gt;
      &lt;artifactId&gt;MainModule&lt;/artifactId&gt;
      &lt;groupId&gt;com.plugintest&lt;/groupId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;/parent&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;artifactId&gt;Module1&lt;/artifactId&gt;
  </code></pre>
  <p>Module2 (pom.xml):</p>
  <pre><code>&lt;parent&gt;
      &lt;artifactId&gt;MainModule&lt;/artifactId&gt;
      &lt;groupId&gt;com.plugintest&lt;/groupId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;/parent&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;artifactId&gt;Module1&lt;/artifactId&gt;
  </code></pre>
  <p>MainModule (pom.xml):</p>
  <pre><code>&lt;groupId&gt;com.plugintest&lt;/groupId&gt;
  &lt;artifactId&gt;MainModule&lt;/artifactId&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;modules&gt;
      &lt;module&gt;Module1&lt;/module&gt;
      &lt;module&gt;Module2&lt;/module&gt;
  &lt;/modules&gt;
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.2&lt;/version&gt;
          &lt;executions&gt;
              &lt;execution&gt;
              &lt;phase&gt;package&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;shade&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  <p>According this code I get 2 jar-files (Module1-version.jar and Module2-version.jar). But it is not what I want. I wish to get 1 jar file (MainModule-version.jar), which would contain the other (Module1 and Module2).</p>
  <p>Why doesn't this Shade Plugin work?</p>