PDA

View Full Version : Sharing images across mulitple GWT modules



bigmountainben
27 Apr 2009, 3:46 PM
I have 6 GWT modules with an inheritance hierarchy that goes something like this:

External Module (inherits from GXT)
Module 2 (inherits from External Module)
Module 3 (inherits from Module 2)
Module 4, 5 6 (inherit from Module 3)

Using GWT 1.6.4, I have a shared images and css directory that I'd like to use across the board here. It looks like whenever I compile, ALL my modules get images/{default,gray,gxt}. This adds up quickly to make a big - no make that very big - WAR. I prefer small WARs.

so to illustrate, my war ends up looking like this:

war/images/default/...
war/images/gray/...
war/images/gxt/...
war/images/my other images/...
war/css/...
war/module4.html
war/module5.html
war/module6.html
war/module2/images/default/...
war/module2/images/gray/...
war/module2/images/gxt/...
war/module2/other gwt-generated stuff
war/module3/images/default/...
war/module3/images/gray/...
war/module3/images/gxt/...
war/module3/other gwt-generated stuff
war/module4/images/default/...
war/module4/images/gray/...
war/module4/images/gxt/...
war/module4/other gwt-generated stuff
war/module5/images/default/...
war/module5/images/gray/...
war/module5/images/gxt/...
war/module5/other gwt-generated stuff
etc.

Any help much appreciated!
Thanks,
Ben

sven
28 Apr 2009, 1:45 AM
in GXT 1.2 the images are in the classpath in the public dir. So GWT copies them into each module.

Because of the new feature of GWT 1.6 we changed this for GXT 2.0.

You have do delete the images again and move them to a place where they are only once.