title: Maven Multi-module dependency package not found
body: <p>I've got a multi module project: The parent POM.xml:</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;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;1.4.3.RELEASE&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;groupId&gt;be.bodyreset&lt;/groupId&gt;
      &lt;artifactId&gt;bodyreset-parent&lt;/artifactId&gt;
      &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
  
      &lt;name&gt;Bodyreset Parent&lt;/name&gt;
      &lt;description&gt;Manages the common properties and dependencies for the child modules&lt;/description&gt;
  
      &lt;modules&gt;
          &lt;module&gt;bodyreset-commons&lt;/module&gt;
          &lt;module&gt;messaging-contract&lt;/module&gt;
          &lt;module&gt;discovery-microservice&lt;/module&gt;
          &lt;module&gt;api-gateway-microservice&lt;/module&gt;
          &lt;module&gt;rest-client-microservice&lt;/module&gt;
          &lt;module&gt;email-commons&lt;/module&gt;
          &lt;module&gt;security-microservice&lt;/module&gt;
          &lt;module&gt;user-microservice&lt;/module&gt;
          &lt;module&gt;point-of-service-microservice&lt;/module&gt;
      &lt;/modules&gt;
  
      &lt;properties&gt;
          &lt;docker.image.prefix&gt;bodyreset&lt;/docker.image.prefix&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;powermock.version&gt;1.6.6&lt;/powermock.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              ...
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;build&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;com.spotify&lt;/groupId&gt;
                      &lt;artifactId&gt;docker-maven-plugin&lt;/artifactId&gt;
                      &lt;version&gt;0.4.11&lt;/version&gt;
                  &lt;/plugin&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.6.0&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;source&gt;${java.version}&lt;/source&gt;
                          &lt;target&gt;${java.version}&lt;/target&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                      &lt;version&gt;3.0.2&lt;/version&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>The POM.xml of the rest-client-microservice looks like this:</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;groupId&gt;be.bodyreset&lt;/groupId&gt;
          &lt;artifactId&gt;bodyreset-parent&lt;/artifactId&gt;
          &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;artifactId&gt;rest-client-microservice&lt;/artifactId&gt;
      &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;Rest Client Microservice&lt;/name&gt;
      &lt;description&gt;Manages the REST clients to use for inter-service communication&lt;/description&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
              &lt;artifactId&gt;lombok&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-hateoas&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-eureka&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-feign&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-hystrix&lt;/artifactId&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.spotify&lt;/groupId&gt;
                  &lt;artifactId&gt;docker-maven-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;build&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;imageName&gt;${docker.image.prefix}/${project.artifactId}&lt;/imageName&gt;
                      &lt;dockerDirectory&gt;${project.basedir}/src/main/docker&lt;/dockerDirectory&gt;
                      &lt;resources&gt;
                          &lt;resource&gt;
                              &lt;targetPath&gt;/&lt;/targetPath&gt;
                              &lt;directory&gt;${project.build.directory}&lt;/directory&gt;
                              &lt;include&gt;${project.build.finalName}.jar&lt;/include&gt;
                          &lt;/resource&gt;
                      &lt;/resources&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;test-jar&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;repackage&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>The POM.xml of the email-commons module looks as follows:</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;groupId&gt;be.bodyreset&lt;/groupId&gt;
          &lt;artifactId&gt;bodyreset-parent&lt;/artifactId&gt;
          &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;artifactId&gt;email-commons&lt;/artifactId&gt;
      &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;Email Commons&lt;/name&gt;
      &lt;description&gt;Enables sending emails via SMPT&lt;/description&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;be.bodyreset&lt;/groupId&gt;
              &lt;artifactId&gt;rest-client-microservice&lt;/artifactId&gt;
              &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;be.bodyreset&lt;/groupId&gt;
              &lt;artifactId&gt;rest-client-microservice&lt;/artifactId&gt;
              &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
              &lt;type&gt;test-jar&lt;/type&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
              &lt;artifactId&gt;lombok&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.powermock&lt;/groupId&gt;
              &lt;artifactId&gt;powermock-api-mockito&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.powermock&lt;/groupId&gt;
              &lt;artifactId&gt;powermock-module-junit4&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-mail&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-thymeleaf&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;test-jar&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>If I try to perform a <code>maven clean install</code> on the parent project, I get the following result:</p>
  
  <pre><code>[INFO] ------------------------------------------------------------------------
  [INFO] Building Email Commons 1.0.0-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ email-commons ---
  [INFO] Deleting /home/developer/ideaProjects/bodyreset/email-commons/target
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ email-commons ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] Copying 0 resource
  [INFO] Copying 2 resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ email-commons ---
  [INFO] Changes detected - recompiling the module!
  [INFO] Compiling 17 source files to /home/developer/ideaProjects/bodyreset/email-commons/target/classes
  [INFO] -------------------------------------------------------------
  [ERROR] COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/converter/UserDTOToRecipientConverter.java:[4,29] package be.bodyreset.rest.dto does not exist
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/converter/UserDTOToRecipientConverter.java:[16,63] cannot find symbol
    symbol: class UserDTO
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/converter/UserDTOToRecipientConverter.java:[22,30] cannot find symbol
    symbol:   class UserDTO
    location: class be.bodyreset.mail.converter.UserDTOToRecipientConverter
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/converter/UserDTOToSenderConverter.java:[4,29] package be.bodyreset.rest.dto does not exist
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/converter/UserDTOToSenderConverter.java:[5,29] package be.bodyreset.rest.dto does not exist
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/converter/UserDTOToSenderConverter.java:[15,60] cannot find symbol
    symbol: class UserDTO
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/converter/UserDTOToSenderConverter.java:[21,27] cannot find symbol
    symbol:   class UserDTO
    location: class be.bodyreset.mail.converter.UserDTOToSenderConverter
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/service/impl/SenderServiceImpl.java:[7,32] package be.bodyreset.rest.client does not exist
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/service/impl/SenderServiceImpl.java:[8,32] package be.bodyreset.rest.client does not exist
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/service/impl/SenderServiceImpl.java:[9,29] package be.bodyreset.rest.dto does not exist
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/service/impl/SenderServiceImpl.java:[10,29] package be.bodyreset.rest.dto does not exist
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/service/impl/SenderServiceImpl.java:[34,13] cannot find symbol
    symbol:   class PointOfServiceClient
    location: class be.bodyreset.mail.service.impl.SenderServiceImpl
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/service/impl/SenderServiceImpl.java:[37,13] cannot find symbol
    symbol:   class UserClient
    location: class be.bodyreset.mail.service.impl.SenderServiceImpl
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/service/impl/SenderServiceImpl.java:[63,13] cannot find symbol
    symbol:   class PointOfServiceDTO
    location: class be.bodyreset.mail.service.impl.SenderServiceImpl
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/service/impl/RecipientServiceImpl.java:[7,32] package be.bodyreset.rest.client does not exist
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/service/impl/RecipientServiceImpl.java:[8,29] package be.bodyreset.rest.dto does not exist
  [ERROR] /home/developer/ideaProjects/bodyreset/email-commons/src/main/java/be/bodyreset/mail/service/impl/RecipientServiceImpl.java:[32,13] cannot find symbol
    symbol:   class UserClient
    location: class be.bodyreset.mail.service.impl.RecipientServiceImpl
  [INFO] 17 errors 
  [INFO] -------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary:
  [INFO] 
  [INFO] Bodyreset Parent .................................. SUCCESS [0.690s]
  [INFO] Bodyreset Commons ................................. SUCCESS [7.444s]
  [INFO] Messaging Contract ................................ SUCCESS [1.751s]
  [INFO] Discovery Microservice ............................ SUCCESS [19.925s]
  [INFO] API Gateway Microservice .......................... SUCCESS [17.272s]
  [INFO] Rest Client Microservice .......................... SUCCESS [15.271s]
  [INFO] Email Commons ..................................... FAILURE [1.026s]
  [INFO] Security Microservice ............................. SKIPPED
  [INFO] User Microservice ................................. SKIPPED
  [INFO] Point Of Service Microservice ..................... SKIPPED
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 1:04.292s
  [INFO] Finished at: Thu Jan 19 11:53:25 CET 2017
  [INFO] Final Memory: 63M/656M
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>I've been breaking my head on this issue for several days now, but I don't have a clue why this isn't working.</p>