title: Maven shade plugin not executing
body: <p>In my current project setup, the maven shade plugin is executing extremely inconsistently. The plugin looks like its executing after I build the parent module, however after executing in that instance it fails to execute when building the child modules independently.</p>
  
  <p>My parent pom is </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;groupId&gt;net.astronus&lt;/groupId&gt;
  &lt;artifactId&gt;commons-parent&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  
  &lt;modules&gt;
      &lt;module&gt;common&lt;/module&gt;
      &lt;!--&lt;module&gt;server-preparer&lt;/module&gt;
      &lt;module&gt;papi-placeholders&lt;/module&gt;
      &lt;module&gt;papi-base&lt;/module&gt;
      &lt;module&gt;server-template&lt;/module&gt;
      &lt;module&gt;message-replace&lt;/module&gt;
      &lt;module&gt;skyblock-addons&lt;/module&gt;--&gt;
      &lt;module&gt;lib-container&lt;/module&gt;
  &lt;/modules&gt;
  
  &lt;properties&gt;
      &lt;shade.basepattern&gt;net.astronus.thirdparty&lt;/shade.basepattern&gt;
  &lt;/properties&gt;
  
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;bungeecord-repo&lt;/id&gt;
          &lt;url&gt;https://oss.sonatype.org/content/repositories/snapshots&lt;/url&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
          &lt;id&gt;spigot-repo&lt;/id&gt;
          &lt;url&gt;https://hub.spigotmc.org/nexus/content/repositories/snapshots/&lt;/url&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
          &lt;id&gt;placeholderapi&lt;/id&gt;
          &lt;url&gt;http://repo.extendedclip.com/content/repositories/placeholderapi/&lt;/url&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
          &lt;id&gt;dmulloy2-repo&lt;/id&gt;
          &lt;url&gt;http://repo.dmulloy2.net/nexus/repository/public/&lt;/url&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
          &lt;id&gt;luck-repo&lt;/id&gt;
          &lt;url&gt;http://repo.lucko.me/&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  
  &lt;dependencyManagement&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
              &lt;artifactId&gt;guava&lt;/artifactId&gt;
              &lt;version&gt;23.4-jre&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
              &lt;artifactId&gt;gson&lt;/artifactId&gt;
              &lt;version&gt;2.8.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.spigotmc&lt;/groupId&gt;
              &lt;artifactId&gt;spigot-api&lt;/artifactId&gt;
              &lt;version&gt;1.8.8-R0.1-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-io&lt;/groupId&gt;
              &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;me.lucko.luckperms&lt;/groupId&gt;
              &lt;artifactId&gt;luckperms-api&lt;/artifactId&gt;
              &lt;version&gt;4.0-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;me.clip&lt;/groupId&gt;
              &lt;artifactId&gt;placeholderapi&lt;/artifactId&gt;
              &lt;version&gt;2.8.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.astronus&lt;/groupId&gt;
              &lt;artifactId&gt;common&lt;/artifactId&gt;
              &lt;version&gt;${version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.astronus&lt;/groupId&gt;
              &lt;artifactId&gt;papi-base&lt;/artifactId&gt;
              &lt;version&gt;${version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.astronus&lt;/groupId&gt;
              &lt;artifactId&gt;server-template&lt;/artifactId&gt;
              &lt;version&gt;${version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.comphenix.protocol&lt;/groupId&gt;
              &lt;artifactId&gt;ProtocolLib-API&lt;/artifactId&gt;
              &lt;version&gt;4.3.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.md-5&lt;/groupId&gt;
              &lt;artifactId&gt;bungeecord-api&lt;/artifactId&gt;
              &lt;version&gt;1.12-SNAPSHOT&lt;/version&gt;
              &lt;type&gt;jar&lt;/type&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;me.lucko&lt;/groupId&gt;
              &lt;artifactId&gt;helper&lt;/artifactId&gt;
              &lt;version&gt;4.1.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
              &lt;artifactId&gt;lombok&lt;/artifactId&gt;
              &lt;version&gt;1.16.18&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/dependencyManagement&gt;
  
  &lt;build&gt;
      &lt;sourceDirectory&gt;src/main/java&lt;/sourceDirectory&gt;
      &lt;testSourceDirectory&gt;src/test/java&lt;/testSourceDirectory&gt;
  
      &lt;resources&gt;
          &lt;resource&gt;
              &lt;directory&gt;${project.basedir}/src/main/resources&lt;/directory&gt;
              &lt;filtering&gt;true&lt;/filtering&gt;
          &lt;/resource&gt;
      &lt;/resources&gt;
  
      &lt;pluginManagement&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.7.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.google.code.maven-replacer-plugin&lt;/groupId&gt;
                  &lt;artifactId&gt;replacer&lt;/artifactId&gt;
                  &lt;version&gt;1.5.3&lt;/version&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;versions-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.5&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
  
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;versions-maven-plugin&lt;/artifactId&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;generate-sources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;update-parent&lt;/goal&gt;
                          &lt;goal&gt;update-child-modules&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;allowSnapshots&gt;true&lt;/allowSnapshots&gt;
                          &lt;generateBackupPoms&gt;false&lt;/generateBackupPoms&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;createDependencyReducedPom&gt;false&lt;/createDependencyReducedPom&gt;
                  &lt;shadedArtifactAttached&gt;false&lt;/shadedArtifactAttached&gt;
                  &lt;relocations&gt;
                      &lt;relocation&gt;
                          &lt;pattern&gt;com.google&lt;/pattern&gt;
                          &lt;shadedPattern&gt;${shade.basepattern}.com.google&lt;/shadedPattern&gt;
                      &lt;/relocation&gt;
                      &lt;relocation&gt;
                          &lt;pattern&gt;org.apache&lt;/pattern&gt;
                          &lt;shadedPattern&gt;${shade.basepattern}.org.apache&lt;/shadedPattern&gt;
                      &lt;/relocation&gt;
                  &lt;/relocations&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;shade&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>And the child pom</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;parent&gt;
      &lt;artifactId&gt;commons-parent&lt;/artifactId&gt;
      &lt;groupId&gt;net.astronus&lt;/groupId&gt;
      &lt;version&gt;0.0.1&lt;/version&gt;
  &lt;/parent&gt;
  
  &lt;artifactId&gt;lib-container&lt;/artifactId&gt;
  &lt;name&gt;AstroLibContainer&lt;/name&gt;
  &lt;description&gt;Bukkit/Spigot plugin containing libraries used by astronus bukkit/spigot projects&lt;/description&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  
  &lt;properties&gt;
      &lt;astronus.relocate&gt;true&lt;/astronus.relocate&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
          &lt;artifactId&gt;guava&lt;/artifactId&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-io&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;net.astronus&lt;/groupId&gt;
          &lt;artifactId&gt;common&lt;/artifactId&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;net.md-5&lt;/groupId&gt;
          &lt;artifactId&gt;bungeecord-api&lt;/artifactId&gt;
          &lt;type&gt;jar&lt;/type&gt;
          &lt;version&gt;1.12-SNAPSHOT&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.spigotmc&lt;/groupId&gt;
          &lt;artifactId&gt;spigot-api&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;finalName&gt;astro-lib-container&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;configuration combine.children="append"&gt;
                  &lt;artifactSet&gt;
                      &lt;includes&gt;
                          &lt;include&gt;com.google.guava:guava&lt;/include&gt;
                          &lt;include&gt;commons-io:commons-io&lt;/include&gt;
                          &lt;include&gt;net.astronus:common&lt;/include&gt;
                      &lt;/includes&gt;
                  &lt;/artifactSet&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>And the build output when running the "install" goal on the child module with the pom specified above</p>
  
  <pre><code>"C:\Program Files\Java\jdk1.8.0_131\bin\java" -Dmaven.multiModuleProjectDirectory=C:\Users\cneth\dev\astronus\commons\lib-container "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.4\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.4\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.4\lib\idea_rt.jar=56823:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.4\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.1.4 install
  [INFO] Scanning for projects...
  [WARNING] 
  [WARNING] Some problems were encountered while building the effective model for net.astronus:lib-container:jar:0.0.1
  [WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
  [WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
  [WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
  [WARNING] 
  [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
  [WARNING] 
  [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
  [WARNING] 
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building AstroLibContainer 0.0.1
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ lib-container ---
  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] Copying 2 resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ lib-container ---
  [INFO] Changes detected - recompiling the module!
  [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
  [INFO] Compiling 2 source files to C:\Users\cneth\dev\astronus\commons\lib-container\target\classes
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ lib-container ---
  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] skip non existing resourceDirectory C:\Users\cneth\dev\astronus\commons\lib-container\src\test\resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ lib-container ---
  [INFO] No sources to compile
  [INFO] 
  [INFO] --- maven-surefire-plugin:2.20.1:test (default-test) @ lib-container ---
  [INFO] No tests to run.
  [INFO] 
  [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ lib-container ---
  [INFO] Building jar: C:\Users\cneth\dev\astronus\commons\lib-container\target\astro-lib-container.jar
  [INFO] 
  [INFO] --- maven-install-plugin:2.4:install (default-install) @ lib-container ---
  [INFO] Installing C:\Users\cneth\dev\astronus\commons\lib-container\target\astro-lib-container.jar to C:\Users\cneth\.m2\repository\net\astronus\lib-container\0.0.1\lib-container-0.0.1.jar
  [INFO] Installing C:\Users\cneth\dev\astronus\commons\lib-container\pom.xml to C:\Users\cneth\.m2\repository\net\astronus\lib-container\0.0.1\lib-container-0.0.1.pom
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 1.998 s
  [INFO] Finished at: 2018-01-11T18:27:32+02:00
  [INFO] Final Memory: 18M/199M
  [INFO] ------------------------------------------------------------------------
  
  Process finished with exit code 0
  </code></pre>
  
  <p>As you can see, the maven shade plugin isn't executing despite the execution being defined in the <code>&lt;plugins&gt;</code> section of the parent pom.</p>