I am developing a Web GWT application, using Eclipse, Glassfish 4 for the local server part. I just started using Maven for the build.
My projects are structured like this:
* My core java classes (“ProjectCore”)
Pom.xml => generates a JAR
* My custom java classes (“ProjectCustom”)
Pom.xml => generates a JAR
* My web-app related java classes (“ProjectWeb”)
Pom.xml => generates a JAR
* My WAR project (“WARproject”)
Pom.xml => generates a WAR
* My EAR project (“EARproject”)
Includes all of the above
Pom.xml => generates an EAR
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)
However, in a development mode, where I frequently modify files & 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.
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...
I have been searching quite a lot but without success so far…
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?
Thanks in advance!