title: Can maven profiles be used for migrating applications from one technology stack to another?
body: <p>I have a few applications that needs to be migrated from one technology stack to another.</p>
  
  <p>Please refer below for sample dependencies:</p>
  
  <p>Example:</p>
  
  <p><strong><em>Stack 1:</em></strong></p>
  
  <p>d1-stack1,
  d2-stack1,
  Java 7,
  Apache CXF,
  Spring 3,
  .....
  ..
  etc.</p>
  
  <p><strong><em>Stack 2:</em></strong></p>
  
  <p>d1-stack2,
  d2-stack2,
  Java 8,
  RESTEasy,
  Spring 4,
  .....
  ..
  etc.</p>
  
  <p>Here, d1-stack1, d2-stack1 etc. are maven projects that are used in these applications as dependencies and these dependencies also needs to be migrated to new stack.</p>
  
  <p>In order to migrate all the applications and their dependencies smoothly, I am thinking of abstracting out the applications' dependencies behind common interfaces (Facade, Adopter etc.) and then I am thinking of using maven profiles (stack-1 and stack-2) for adding the dependencies for respective technology stacks for build.</p>
  
  <p>Do you think this approach will be helpful in long term? Will there be any blockers?</p>
  
  <p>Please note dependencies like d1-stack* and d2-stack* will have different framework dependencies for both stacks.</p>