How to keep client classes out of WEB-INF/classes?

Skip to first unread message

Feb 26, 2015, 11:02:05 AM2/26/15
My GWT client classes are all ending up in WEB-INF/classes and being published to the server. That doesn't seem particularly clean, and doesn't allow me to catch unwanted dependencies from server or shared to client code. To build, I use Maven 3.2.5, GWT 2.7 (w/ SuperDevMode) and gwt-maven-plugin 2.7.0.

Do client classes still even need to be in WEB-INF/classes during development when using SuperDevMode?

I also found this old thread about how people dealt with this back in 2011:!searchin/codehaus-mojo-gwt-maven-plugin-users/WEB-INF$2Fclasses/codehaus-mojo-gwt-maven-plugin-users/hfwTHFPrJy0/ZqmlyA2SU9oJ

Is this still the state of things?

Thomas Broyer

Feb 27, 2015, 6:11:58 AM2/27/15
You could use maven-war-plugin's packagingExcludes:
But the real solution, following The Maven Way™, is to split your project in separate modules.
See for the rationale (and note that my archetypes have recently moved to a new gwt-maven-plugin!)

Feb 27, 2015, 12:36:50 PM2/27/15
Ok, that helps a lot, I've done it with maven-war-plugin's packagingExcludes for now:


with a comment for later in case I come across some more benefits to modularization. For now, this was a lot easier than modularizing everything. :)
Reply all
Reply to author
0 new messages