Using a widget / module / entry point from another separate project

18 views
Skip to first unread message

archmisha

unread,
Mar 15, 2012, 8:42:42 AM3/15/12
to Google Web Toolkit
Hi,
I have 2 gwt web projects (separate maven projects).
I want from one project to be able to use a widget from another.

I create a separate entry point in the second project and tried
importing the javascript generated by second project into the first
one.
But it doesnt seem to work.

I am trying ti understand how can I do it.
If I could inherit the entrypoint it could help, but they are both web
projects I dont see a way to import them.

Thanks

Steve Moyer

unread,
Mar 26, 2012, 7:45:38 PM3/26/12
to Google Web Toolkit
That's not quite how it works ... your first project should produce a
JAR file that includes both the compiled classes AND the source
files. You'll include this library in your second project and GWT
will compile IT ALL from scratch in the second project.

smoyer

Joseph Lust

unread,
Mar 27, 2012, 9:22:50 PM3/27/12
to google-we...@googlegroups.com
Archmisha,

Check out the POMs in this GitHub fork of mine.
  • The first project builds a GWT module, and its docs & src.
  • They are installed into your local repo
  • The second project inherits it in the *.gwt.xml module
  • Now the second project can use the module and its sources. 
If you place them both in a parent project, then you can also build the whole thing all at once, but the real benefit here is that you don't need to keep building the first module.

Those POMs should given you a good start.

Sincerely,
Joseph
Reply all
Reply to author
Forward
0 new messages