title: How to get the maven shade plugin to use local modules in a multi-module project?
body: <p>I'm trying to generate an uber jar in a multi module project with the maven-shade plugin with no success.<br>
  Versions: maven v3.9, maven-shade v3.0 <br></p>
  
  <p>The project looks as follow:</p>
  
  <pre><code>main
  |- library
  |- admin
  |- ...
  </code></pre>
  
  <p>The sub module "admin" inherits (dependency) the sub module "library" and contains the maven-shade plugin definition. During the building process the plugin doesn't seem to find the POM of the local sub module "library".</p>
  
  <p>Here are the poms</p>
  
  <pre><code>main pom.xml
  &lt;groupId&gt;tapmeppe.server&lt;/groupId&gt;
  &lt;artifactId&gt;tapmeppe-server&lt;/artifactId&gt;
  &lt;version&gt;2017.1&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;modules&gt;
      &lt;module&gt;library&lt;/module&gt;
      &lt;module&gt;admin&lt;/module&gt;
      &lt;module&gt;core&lt;/module&gt;
  &lt;/modules&gt;
  ...
  
  
  library pom.xml
  &lt;parent&gt;
      &lt;groupId&gt;tapmeppe.server&lt;/groupId&gt;
      &lt;artifactId&gt;tapmeppe-server&lt;/artifactId&gt;
      &lt;version&gt;2017.1&lt;/version&gt;
  &lt;/parent&gt;
  
  &lt;artifactId&gt;tapmeppe-server-library&lt;/artifactId&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
          &lt;version&gt;5.1.38&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;&lt;!--jdbc driver--&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
          &lt;version&gt;4.2.5.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;&lt;!--JSON parser--&gt;
          &lt;groupId&gt;com.typesafe.play&lt;/groupId&gt;
          &lt;artifactId&gt;play_2.11&lt;/artifactId&gt;
          &lt;version&gt;2.5.2&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  
  admin pom.xml
  &lt;parent&gt;
      &lt;groupId&gt;tapmeppe.server&lt;/groupId&gt;
      &lt;artifactId&gt;tapmeppe-server&lt;/artifactId&gt;
      &lt;version&gt;2017.1&lt;/version&gt;
  &lt;/parent&gt;
  
  &lt;artifactId&gt;tapmeppe-server-admin&lt;/artifactId&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;tapmeppe.server&lt;/groupId&gt;
          &lt;artifactId&gt;tapmeppe-server-library&lt;/artifactId&gt;
          &lt;version&gt;${project.version}&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;finalName&gt;admin-${project.version}&lt;/finalName&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;3.0&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;configuration&gt;
                          &lt;shadedArtifactAttached&gt;true&lt;/shadedArtifactAttached&gt;
                          &lt;minimizeJar&gt;true&lt;/minimizeJar&gt;
                          &lt;transformers&gt;
                              &lt;transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"&gt;
                                  &lt;mainClass&gt;tapmeppe.admin.Starter&lt;/mainClass&gt;
                              &lt;/transformer&gt;
                          &lt;/transformers&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>Here is the output of the build</p>
  
  <pre><code>[INFO] Scanning for projects...
  ...
  </code></pre>
  
  <blockquote>
    <p>[WARNING] The POM for
    tapmeppe.server:tapmeppe-server-library:jar:2017.1 is missing, no
    dependency information available</p>
  </blockquote>
  
  <pre><code>...
  </code></pre>
  
  <blockquote>
    <p>[ERROR] Failed to execute goal on project tapmeppe-server-admin: Could
    not resolve dependencies for project
    tapmeppe.server:tapmeppe-server-admin:jar:2017.1: Failure to find
    tapmeppe.server:tapmeppe-server-library:jar:2017.1 in
    <a href="https://repo.maven.apache.org/maven2" rel="nofollow noreferrer">https://repo.maven.apache.org/maven2</a> was cached in the local
    repository, resolution will not be reattempted until the update
    interval of central has elapsed or updates are forced -> [Help 1]</p>
  </blockquote>
  
  <pre><code>[ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
  </code></pre>
  
  <p>For some reason the plugin is looking for the dependency jar in the remote repository instead of using the sub module.
  What am I missing? Thanks for the help.</p>