If you use gwtdesigner
there is an option to do it from eclipse: https://developers.google.com/web-toolkit/tools/gwtdesigner/wizards/gwt/library
But the normal way, is:
- create a normal GWT module with its
.gwt.xml
file, and remove the entry-point tag. - include the stuff you want to share in it: java code into the
client
folder, assets into thepublic
one, and server code into theserver
one. - compile and package as a
.jar
file. IMPORTANT: you must pack your source files in it. - Import the library in your other projects as you normally do.
- Finally, remember to include a line to inherit your library module in the
gwt.xml
of those gwt projects using your library.