title: Best practices for inheritance structure of a Maven Project with modules
body: <p>I'm try to figuring out with the best way to define inheritance structure for a Maven Project organized in modules.<br>
  Let me introduce the scenario.<br></p>
  <p>I'm developing a Web Application which can be extended for different customer.<br>
  Each personalization contains custom GUI components, data warehouse logic, etc..</p>
  <p>I create the primary <strong>pom.xml</strong>, defined as <em>packaging</em>, which rappresent the main project container and includes shared dependencies and modules definition:</p>
  <ul>
  <li><em>Core Library</em> Module: artifactID: <strong>cms-core</strong></li>
  <li><em>Base Web Application</em> GUI Module artifcatId: <strong>cms-base-app</strong></li>
  <li>Customer 1 Web Application Module</li>
  <li>...</li>
  <li>Customer N Web Application Module</li>
  </ul>
  <p>Pom.xml has defined as following:<br></p>
  <pre><code>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;it.isipc&lt;/groupId&gt;
    &lt;artifactId&gt;cms-env&lt;/artifactId&gt;
    &lt;version&gt;0.0.0&lt;/version&gt;
    &lt;packaging&gt;pom&lt;/packaging&gt;
    &lt;name&gt;cms.env&lt;/name&gt;
    &lt;description&gt;...&lt;/description&gt;
    &lt;properties&gt;
      &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
    &lt;/properties&gt;
    &lt;build&gt;
      ...
    &lt;/build&gt;
    &lt;dependencies&gt;
          ...
    &lt;/dependencies&gt;
    
    &lt;modules&gt;
      &lt;module&gt;cms-core&lt;/module&gt;
      &lt;module&gt;cms-base-app&lt;/module&gt;
      ...
      &lt;module&gt;cms-customer1&lt;/module&gt;
      ...
    &lt;/modules&gt;
  &lt;/project&gt;
  </code></pre>
  <br>
  Basically, I usually make changes at Core Library and Base application module.<br>
  Everytime I release a new version on any of those modules, I need to update pom.xml of each customer's module in order to update them at the last released version of mentioned artifacts.<br><br>
  Following an example of a customer web application **pom.xml**:
  <pre><code>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;parent&gt;
      &lt;groupId&gt;it.isipc&lt;/groupId&gt;
      &lt;artifactId&gt;cms-env&lt;/artifactId&gt;
      &lt;version&gt;0.0.0&lt;/version&gt;
    &lt;/parent&gt;
    &lt;version&gt;1.11.05&lt;/version&gt;
    &lt;artifactId&gt;cms-customer1&lt;/artifactId&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;name&gt;cms-customer1/name&gt;
    &lt;description&gt;...&lt;/description&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;it.isipc&lt;/groupId&gt;
          &lt;artifactId&gt;cms-base-app&lt;/artifactId&gt;
          &lt;type&gt;war&lt;/type&gt;
          &lt;version&gt;1.11.05&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;it.isipc&lt;/groupId&gt;
          &lt;artifactId&gt;cms-core&lt;/artifactId&gt;
          &lt;version&gt;1.1.3&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  <hr />
  <p>At the moment I have to specify:</p>
  <ol>
  <li>Customer module's version (1.11.05 in the example above)</li>
  <li>cms-base-app module's verion (1.11.05 in the example above)</li>
  </ol>
  <p>Those two artifacts, in my idea, has to share the same version number because Customer Application extends Base Web Application.</p>
  <p>Everything works fine as expected but I'm sure there's a best way for doing that.<br></p>
  <p>There's a way to specify version number only on cms-base-app pom.xml file and make each customer's module inherit from that?
  <br><br>
  Thanks for your suggestions.</p>