title: HotSwaping code into "mvnDebug tomcat:run"
body: <p>Usually i start tomcat using <code>mvnDebug tomcat:run</code>.</p>
  
  <p>After Code-change i need to use <code>mvn tomcat:redeploy</code>. </p>
  
  <p>This is sub-optimal because i often only change content of existing method-bodys.</p>
  
  <p>Can I HotSwap the method's body into the runtime, and hot-redeploy as a fallback?</p>
  
  <p>I have unfortunatally nothing found like a <code>maven-hotswap-plugin</code>.</p>
  
  <h2>faces-config.xml</h2>
  
  <pre><code>... &lt;application&gt;
    &lt;view-handler&gt;com.sun.facelets.FaceletViewHandler&lt;/view-handler&gt;
    &lt;locale-config&gt;
     &lt;default-locale&gt;de_DE&lt;/default-locale&gt;
    &lt;/locale-config&gt;
    &lt;resource-bundle&gt;
     &lt;base-name&gt;Message&lt;/base-name&gt;
     &lt;var&gt;message&lt;/var&gt;
    &lt;/resource-bundle&gt;
    &lt;el-resolver&gt;org.springframework.web.jsf.el.SpringBeanFacesELResolver&lt;/el-resolver&gt;
   &lt;/application&gt;
  &lt;/faces-config&gt;
  </code></pre>
  
  <h2>web.xml:</h2>
  
  <pre><code>&lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  &lt;listener&gt;
      &lt;listener-class&gt;
          org.springframework.web.context.request.RequestContextListener
      &lt;/listener-class&gt;
  &lt;/listener&gt;
  </code></pre>
  
  <h2>pom.xml:</h2>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-envers&lt;/artifactId&gt;
          &lt;version&gt;4.3.0.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;net.java.dev.ajax4jsf&lt;/groupId&gt;
          &lt;artifactId&gt;ajax4jsf&lt;/artifactId&gt;
          &lt;version&gt;1.0.6&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
          &lt;version&gt;3.6.6.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-lang&lt;/groupId&gt;
          &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
          &lt;version&gt;2.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.myfaces.core&lt;/groupId&gt;
          &lt;artifactId&gt;myfaces-api&lt;/artifactId&gt;
          &lt;version&gt;1.2.10&lt;/version&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.myfaces.core&lt;/groupId&gt;
          &lt;artifactId&gt;myfaces-impl&lt;/artifactId&gt;
          &lt;version&gt;1.2.10&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.myfaces.tomahawk&lt;/groupId&gt;
          &lt;artifactId&gt;tomahawk12&lt;/artifactId&gt;
          &lt;version&gt;1.1.9&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.facelets&lt;/groupId&gt;
          &lt;artifactId&gt;jsf-facelets&lt;/artifactId&gt;
          &lt;version&gt;1.1.14&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
          &lt;version&gt;3.1.0.GA&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring&lt;/artifactId&gt;
          &lt;version&gt;2.5.6&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
          &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
          &lt;version&gt;9.2-1004-jdbc41&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;servletapi&lt;/groupId&gt;
          &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
          &lt;version&gt;2.4&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.tomcat.maven&lt;/groupId&gt;
              &lt;artifactId&gt;tomcat7-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;contextReloadable&gt;true&lt;/contextReloadable&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>