title: Can Maven know when to install parent pom or tell me when it need it?
body: <p>What's the maven way to allow to build individual modules and ensure that changes to parent pom are uploaded into the local repository?</p>
  
  <p>Let's say I have three modules: one parent, two children (dbmod, appmod)</p>
  
  <ul>
  <li>parent:    dependencyManagement defines jdbc-foo 1.5</li>
  <li>dbmod:   dependencies defines jdbc-foo getting version from parent</li>
  <li>appmod: depens on dbmod</li>
  </ul>
  
  <p><strong>Situation</strong></p>
  
  <ol>
  <li>I build from parent getting parent-pom with jdbc-foo 1.5, dbmod using jdbc-foo 1.5 and appmod.</li>
  <li>I update source control and parent pom changes to jdbc-foo 1.6</li>
  <li>I build in dbmod directory</li>
  <li><p>I build in appmod directory</p>
  
  <p>appmod fetches dbmod from local repository and uses local repo version of parent pom
  maven issues: "[WARNING] The POM for ...dbmod:jar:3.5.0-SNAPSHOT is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for dbmod:3.5.0-SNAPSHOT"</p>
  
  <p>compilation fails because my code relied on access to jdbc-foo 1.6 changes</p></li>
  </ol>
  
  <p><strong>Options</strong></p>
  
  <p>I can resolve the problem these ways:</p>
  
  <ul>
  <li>install the parent pom file manually the problem, (mvn install-file ...)</li>
  <li>build from the parent <strong>Unnecessary Building: I build all modules all the time</strong></li>
  <li>build from the parent selecting the desired project and using also-make (mvn -am -pl :appmod  ...)    <strong>Unnecessary Building: I must build all deps all the time</strong></li>
  </ul>
  
  <p>First option's a problem because I need to know that I need to do it.  Second and third option also require me to figure out that I need to do it or to build all deps / all mods all the time which can be a problem in a large system.</p>
  
  <p>If there a config setting that would force parent install other than "-am -pl :mod" or is this the "maven way" to handle the situation?</p>
  
  <p>Thanks</p>
  
  <p>Peter</p>
  
  <p>(If maven can't do then then I can right a wrapper script which checks parent against local repo parent and forces install on difference)</p>