title: Hot deployment / incremental Java deployment using Maven & Eclipse & Glassfish 4?
body: <p>I am developing a Web GWT application, using Eclipse, Glassfish 4 for the local server part. I just started using Maven for the build. </p>
  
  <p>My projects are structured like this:</p>
  
  <pre><code>* My core java classes (“ProjectCore”)
     Pom.xml =&gt; generates a JAR
  
  * My custom java classes (“ProjectCustom”)
     Pom.xml =&gt; generates a JAR
  
  * My web-app related java classes (“ProjectWeb”)
      Pom.xml =&gt; generates a JAR
  
  * My WAR project (“WARproject”)
      Pom.xml =&gt; generates a WAR
  
  * My EAR project (“EARproject”)
      Includes all of the above
      Pom.xml =&gt; generates an EAR
  </code></pre>
  
  <p>I managed to configure all the pom.xml files to generates all required JARs, WAR and EAR, and it successfully deploys to Glassfish (done by calling maven from command line)</p>
  
  <p>However, in a development mode, where I frequently modify files &amp; retest the app, the deployment takes too much time (1-2 minutes). Compiling and generating the JARs/WARs/EARs is still pretty fast but the actual undeployment + deployment on Glassfish takes more than 1 minute.</p>
  
  <p>I am wondering how I can do hot deployment to GlassFish4 (also called ‘directory’ deployment), skipping all JAR/WAR archive generation, and only copying to GlassFish whatever files have been modified. I'd like the complete cycle "modify source file - deploy to Glassfish" to take a few seconds only...</p>
  
  <p>I have been searching quite a lot but without success so far…</p>
  
  <p>Could someone give me some directions to follow?
  - using "maven glassfish" plugin?
  - should I go for M2E-WTP plugin?
  - anyone using "manik-hot-deploy" Maven plugin?</p>
  
  <p>Thanks in advance!</p>