title: Maven 2 replace class implementation depending on profile?
body: <p>I have <code>MailTransport.java</code> and two classes extending it: <code>LiveMailTransport.java</code> and <code>TestMailTransport.java</code>.
  <code>LiveMailTransport</code> will really send emails while <code>TestMailTransprot</code> will only write them to the log for testing purpose.</p>
  
  <p>Somewhere I do <code>new MailTransport();</code> and I would like to replace every usage of <code>MailTransport</code> in my server-side code either with <code>Live-</code> or with <code>TestMailTransport</code> depending on the profile used for compiling (local, production, etc..).</p>
  
  <p>(Similar to gwts "replace-with" on client side...)</p>
  
  <p>How could I do that with maven?
  Thanks!</p>