title: Pass properties to maven sub-module, which does not have current module as parent
body: <p>I have several maven-projects:</p>
  
  <ul>
  <li>commons-lib (<em>simple Java project</em>)</li>
  <li>user-service (<em>Spring-Boot-driven project</em>)</li>
  <li>composite-service (<em>Spring-Boot-driven project</em>)</li>
  <li>frontend-service (<em>Spring-Boot- / Angular2-driven project</em>)</li>
  <li>all-services-parent (<em>parent project building everything else</em>)</li>
  </ul>
  
  <p>While <strong>commons-lib</strong> is unlikely to ever be released separately, all other projects (except for the parent) might be released separately.</p>
  
  <p>If the first four in the list are sub-modules of the fifth, do they <strong>have to</strong> have their parent set to parent (e.g. all-services-parent) in return?</p>
  
  <p>Since I want to include <em>commons-lib</em> in the user- and composite-services I understand that I have to have it built first. However: each of the services above may be released separately - so which building structure is most proper for what I need?</p>
  
  <p>Would it be:</p>
  
  <pre><code>-- all-services-parent
     |-- (maven sub-module) commons-lib
     |-- (maven sub-module) user-service
     |-- (maven sub-module) composite-service
     |-- (maven sub-module) frontend-service
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>-- all-services-parent
     |-- user-service-parent
         |-- (maven sub-module) commons-lib
         |-- (maven sub-module) user-service
     |-- composite-service-parent
         |-- (maven sub-module) commons-lib
         |-- (maven sub-module) composite-service
     |-- frontend-service
  </code></pre>
  
  <p>The second building structure would allow me to build all the JARs by calling "mvn clean install" on all-services-parent while still being able to build separate projects properly by calling "mvn clean install" on the corresponding parent, but is it really how it's done?</p>
  
  <p>In my current setup I am trying to use the first building structure, but since e.g. composite-service has "spring-boot-starter-parent" set as its parent, I cannot access the properties or anything from the "all-services-parent"-module.</p>
  
  <p>I read into <a href="https://stackoverflow.com/questions/1992213/maven-parent-pom-vs-modules-pom">Maven parent pom vs modules pom</a> (a question that looked promising at first), but it did not apply to my case as much as I would like it to.</p>