title: Maven Versioning Submodules Dependencies
body: <p>We run multiple sites and build their code with Maven. </p>
  
  <p>Each site has its own pom.xml, several have submodules.</p>
  
  <p>Site B has a dependency on a submodule from site A.</p>
  
  <p>Site B finds this dependency in the .m2/repository.</p>
  
  <p>Currently, site B's pom.xml specifies the dependency name and version.</p>
  
  <p>We're wondering how to handle versioning of submodules in terms of our development and release process, as well as in relation to a site that depends on a submodule from another like site B does to site A.</p>
  
  <p>For the main site, should we increment the version of the submodules for every snapshot and release (keeping everything with the same version number), or only change submodule version if the submodule changes? </p>
  
  <p>Is there some way, other than by communicating the new version, and editing the pom.xml of site B, updating the dependency version, to tell site B there is a new version of the submodule to look for?</p>
  
  <p>We tried removing the version from the dependency specification in the site B pom.xml, but saw then that it looked for the dependency/submodule to have the same version as site B's code.</p>
  
  <p>I'm guessing we could setup something in Jenkins to update pom.xml dependencies when versions change ... but maybe there is a better way?</p>
  
  <p>I just saw this, which is very helpful (e.g. "release" and "latest") ...</p>
  
  <p><a href="https://stackoverflow.com/questions/30571/how-do-i-tell-maven-to-use-the-latest-version-of-a-dependency?rq=1">How do I tell Maven to use the latest version of a dependency?</a></p>