title: Spring as parent of a child java project?
body: <p>I have an existing spring project, and I'd like to develop a different one, reusing some of the business logic. Especially I'd like to combine for the two projects:</p>
  
  <ul>
  <li><p>some of the maven pom dependency versions (hibernate, spring, validation, jmx, servlet, connection pooling). Stuff like database url and c3p0-settings could then be customized within each child project, but without having to redefine their setup.</p></li>
  <li><p>a basic applicationContext.xml that enables classpath scanning, annotations, transactions, async, schedulers. Ideally, I preconfigure this in some kind of parent project, and all inheriting/child projects could automatically us @Autowired without having to provide additional context.xml files.</p></li>
  <li><p>a spring ContextLoaderListener that takes care of shutting down the application orderly (like save terminating all db or currently running webservice requests)</p></li>
  <li><p>a spring managed tcp socket gateway that delegates to a service implementation</p></li>
  </ul>
  
  <p>All this stuff should be reused in my 2nd application. I could now of course copypast/dublicate all stuff that I want to reuse. But that has a significant drawback: I want to be able to change anything in a "shared" content, and it should have impact on both applications.</p>
  
  <p>Eg, if I update the <code>Spring.version</code> in maven pom, both apps should get the new version. Also if I change anything within the socket gateway, etc.</p>
  
  <p>Could you advise me how I could achieve this?</p>