title: best way extend an existing java/maven project
body: <p>I'm extending an existing java app, with both pure java modules and a war. For the war, I'm using the maven-war-overlay method, which automatically includes my own extension files over the existing files if they're named the same. </p>
  
  <p>Now for the java module, I was thinking that I could extend this separately, but what's the best way? I have created a new java module project, and included the original project jar as a dependency. Is there a way to change existing properties/methods in that jar without creating subclasses? if i subclass, the existing class won't know about it... </p>
  
  <p>I could exclude the files from the first project, but that will get a little cumbersome, there are many files that need small changes (different hibernate annotations for instance). </p>
  
  <p>What's the best way to leave the original source code alone, but make the changes I need?</p>