On Thursday, May 17, 2012 8:16:24 PM UTC+2, Yannis Gonianakis wrote:
Dear GWT and Maven users,
Few weeks ago, Thomas Broyer open sourced his gwt-maven-archetypes project which helps GWT/Maven developers to generate modular GWT applications from a Maven archetype. The generated project contains two mutual exclusive profile definitions ('prod' and 'dev'). The difference between these two profiles is the 'prod' enables production quality settings for the GWT compiler while 'dev' enables settings that meant to speed up development (e.g. draftCompile, compile permutation for a single browser etc).
That's actually not exact: 'prod' is for GWT's "prod mode" (a.k.a. "web mode") and 'dev' for "dev mode". There's a third profile, 'draft', that can be activated at the same time as the 'prod' profile to enable draftCompile and use a more specific GWT module (by default, will limit compilation to only safari/chrome).
Because you run the server-side code in a dedicated Jetty server (using "mvn jetty:start") rather than the one embedded in GWT's DevMode, the 'dev' profile here loads the web ressources and server-side classes directly from the "client" and "shared" project respectively.
So, to sum up: 'dev' is to speed-up development (and work seamlessly with your IDE, with instant-reloads of the webapp without the need to run any "mvn" goal –provided the IDE puts the compiled classes in target/classes–) while 'prod' is for your "production-ready" deliverables, and 'prod+draft' allows you to speed-up GWT compilation for faster iterations while running GWT-compiled (prod mode) code.