I have a few M1 examples that do that (even one in the docs I think), but no M2 one at present.
I do plan to add another sample that uses HSQL, JPA, JNDI, etc, but that won't help you right now, so here are some tips that might. First, the embedded Tomcat is 5.0.28 (that's what GWT uses), so you have to use the OLD style 5.0.x Tomcat setup to get Tomcat context stuff (context.xml) to work. Also, use a source context.xml and that will end up as the hosted mode ROOT.xml (http://gwt- maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/gwt- mojo.html#contextXml). So, put your JNDI and such in there, in 5.0.x Tomcat format, and put that file somewhere in source - src/main/ resources/context.xml (or something, but keep in mind that will end up in the classes dir too unless you filter it, or you can use another path), then define the "contextXml" property to point to it ${basedir}/ src/main/resources/context.xml. With that, and your own web.xml, and the right dependencies, you should be in business. Also note that if you need to copy any files to a particular location for the embedded Tomcat, like a Spring applicationContext.xml, you can do that do - a few ways (use the AntRun plugin - see the FAQ, or put in location that ends up somewhere Spring checks, like src/main/resources/WEB-INF/applicationContext.xml - though that has other caveats, as the expected location for the war plugin is src/main/webapp, of course). Sorry for not having an explicit example, but I just don't have one. Also, a lot of people just suggest using noserver once you get to needing stuff like that - but I prefer to tweak the hosted mode myself (GWT-Maven does support noserver though). On Sep 12, 2:21 am, browndar <[EMAIL PROTECTED]> wrote: > HI guys, > > I am using the latest version and and am very impressed. I have been > able to build a war that includes gwt and hits up the database and > works great. I am, however, having trouble getting the same jndi > setup to work in hosted mode. I imagine one of you folks has done > this exact thing. An example pom would be incredibly helpful! > > Take care, > > Darren --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "gwt-maven" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/gwt-maven?hl=en -~----------~----~----~----~------~----~------~--~---
