title: Exploded War deployment with IntelliJ Idea, Maven, Tomcat and JRebel
body: <p>I'm developing a web-based application with IntelliJ Idea 12, Maven, JRebel and Tomcat. In order to take advantage of JRebel, automatically reloading changes to Spring beans, I used the exploded war deployment provided by Intellij below</p>
  
  <p><img src="https://i.stack.imgur.com/35hT1.jpg" alt="IntelliJ exploded war deployment"></p>
  
  <p>Due to a Maven module, IntelliJ exactly followed Maven's convention to compile Java files into the output folder <strong>(target/classes)</strong> which is DIFFERENT to the exploded webapp directoy <strong>(target/spring-mvc-showcase/webapp/web-inf/classes)</strong>. As a result, Tomcat and JRebel can't reload changes of these new classes.</p>
  
  <p>At the moment, I temporarily configured IntelliJ's output folder pointed to the folder <strong>WEB-INF/classes</strong> so that changes could be reloaded. As I don't want to break Maven conventions, could anyone tell me a more elegant solution? </p>
  
  <pre><code>target (Maven generated artifact directory)
    |
     -- classes (compiled)
    |
     -- spring-mvc-showcase (exploded webapp directory)
             |
              -- WEB-INF
                   |
                     -- classes
  </code></pre>