Gears managed resource store linker in GWT 1.6+

2 views
Skip to first unread message

Eric Ayers

unread,
Jul 28, 2009, 10:26:30 AM7/28/09
to Bob Vawter, gwt-google-apis
Bob,

While we are on the subject of the Gears linker, there is an issue
I've been meaning to get with you about.

The current GearsManifest linker does not work with the new .war style
layout. The problems are:

1) It can't find the resource for the hosted.html page
2) It can't find the overridden manifest template

When building with GWT 1.6 style project layout, those files are no
longer present in the list of artifacts. Both of these used to be
placed in the public path of the module, but in the war file format
you'd just plunk them down in the root of the war directory and I
assume the linker never sees them.

I was looking at a quick mod to GearsManifestLinker to scrape the top
level war dir:

http://code.google.com/p/gwt-google-apis/source/browse/trunk/gears/gears/src/com/google/gwt/gears/offline/linker/GearsManifestLinker.java

I didn't see a way to get at the war directory name until the last
step of the link. I Followed the path backward and couldn't see a way
to get (GearsManifsetLinker derives from AbstractLinker)

I followed the dataflow forward from Link.java and see that in
StandardLinkerContext there is still access to the war dir, and that
is passed to StandardLinkerContext.produceOutput(), but as far as I
can tell, these paths don't cross with the GearsManifset linker.

Stepping back for a moment, here is what I'd like to get into the
linker at a minimum:

- The start pages
- The GearsManifest.json override of the manifest temlplate.

Assuming scraping the war root dir isn't going to work out, we might
try something else. The host page(s) we might be able to get from the
web.xml file, (but then we have the same problem of finding the path,
don't we?) I was thinking that we could find the manifest file by
putting it in the source path and using an annotation on a class -
maybe the entry point for the module.

Comments? Suggestions?
--
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

Reply all
Reply to author
Forward
0 new messages